How do I crop raster data to a shapefile that includes islands?
I have a closed area/shapefile of a shoreline that includes islands. So the outside line is the edge of the bay and there are islands within it; all are closed areas. When I attempt to crop the raster of bay depths (grd) to the edge (select the outside area, select the raster layer, select Options>Cropping, Crop to Currently Selected Polygon(s)) it doesn't clip the islands, and when I invert the layer selection to the islands, then crop to select Cut Out Currently Selected Polygon(s)) it doesn't maintain the previously clipped bay edge.
So I can't get all the clipping to occur on the raster so all edges and islands clip the raster in one move or multiple moves.
How do I do this?
So I can't get all the clipping to occur on the raster so all edges and islands clip the raster in one move or multiple moves.
How do I do this?
Answers
-
If I understand you correctly, you have an outer boundary that follows a coastline, and several islands (inland holes) that you want to use to crop a raster with. If so you will need to create a single Area Feature that has the holes cut out of it; as opposed to using separate area features.
- Select all the islands (holes)
- Right Click > Crop/Combine/Split Functions > Cut Selected Area(s) from Another Area (Add Islands)
- Now click within the outer area
- Yes
- Using the Digitizer Tool click anywhere within the area (but not within an island) to select the new area feature. It should appear cross-hatched everywhere except the holes.
- Go to the Options of the raster layer > Cropping
- Crop to Currently Selected Polygon(s)
-
Thanks for your response, sphillips.
I run into a problem on step 2. After Right Click > Crop/Combine/Split Functions I don't see the option for Cut Selected Area(s) from Another Area (Add Islands). I see Combine..., Resample/Split Selected Feature(s)..., and Insert Vertices.... -
sphillips,
I'll edit my response above, but I'm still having trouble with step 3. I have the single Area Feature of the bay shoreline with islands as holes, and I select the option you refer to in step 2, however, I cannot select anything with the digitizer tool (inside or out of the selected area). It just doesn't select anything at all. I get this warning:
This error message doesn't seem to address my problem. Any ideas? -
Are you sure the feature you are using are Area Features and not Lines? A quick check is to select them and see if they are cross-hatched when selected. The square on the left is an Area Feature and then one on the right is a Line Feature.
If they are lines just select them all and Right-Click > Advanced Feature Creation Options > Create New Area Feature(s) from Selected Line(s). Then try my procedure again to see if it resolves your issue.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website