Global Mapper v25.0

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?
Tagged:

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. 

    1. Select all the islands (holes)
    2. Right Click > Crop/Combine/Split Functions > Cut Selected Area(s) from Another Area (Add Islands)
    3. Now click within the outer area
    4. Yes
    5. 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.
    6. Go to the Options of the raster layer > Cropping
    7. 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.