Global Mapper v24.0

contour areas not cropping to selected areas

JSL
JSL Global Mapper UserTrusted User

I have an irregular surface with many zero data areas, and a bounding box around the surface (indicated by black lines in figure below):

I wanted to create a contour map with isoheight areas, so I selected the bounding box layer and choose "Crop to selected areas" in the Contour Bounds tab of the Contour window. However, what I got was isoheight areas filling in the zero data areas:

Is there any way to just get isoheight areas in the selected polygons?

Answers

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I have been able to reproduce incorrect behavior when generating contours and cropping to areas with holes in them.

    I found that if I crop the layer itself to the desired area rather than cropping during contour generation, then I get correct results. Do this on the Cropping tab of the Options dialog of the terrain layer(s). Do NOT crop to areas during contour generation.

    I have created bug GM-13776 for fixing this issue when cropping during contour generation.

    Thanks,

    Mike

    Global Mapper Guru

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    Also, be sure not to check the option to 'Interpolate to Fill Small Gaps' when generating the contours, otherwise a lot of your no-data areas would end up filled.

  • JSL
    JSL Global Mapper User Trusted User

    Thanks for looking into this. I tried cropping the DEM and unchecking "Interpolate..." in the Contour Options window, but it still didn't work:

    Original DEM cropped to selected area, no polygon layers open:

    Contour options window:

    Result--blank areas still filled in:


  • JSL
    JSL Global Mapper User Trusted User

    Interestingly, the contour lines do crop to the DEM, just not the isoheight areas.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I have found and fixed the issue with cropping to polygons with holes in v23.1. Tomorrow's daily build at https://www.bluemarblegeo.com/products/global-mapper-daily-builds.php will have this fixed.

    Thanks,

    Mike

    Global Mapper Guru

  • JSL
    JSL Global Mapper User Trusted User

    Hi Mike, I downloaded the new build, but it still didn't work. Attached are the cropped DEM I'm trying to contour, along with the results when I contoured it after downloading the new build this morning. Thanks for your help.


  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    Your .zip file just had the .gmw file with the generated contour layer embedded, but the .grd file for the DEM is just referenced via path, so I don't have that to load.

    Thanks,

    Mike

  • JSL
    JSL Global Mapper User Trusted User

    I'm trying to attach a zipped ascii file but keep getting "Request failed with status code 400" error

  • JSL
    JSL Global Mapper User Trusted User

    It appears to work when I cut area polygons out of or crop to polygons in a dem, but when I start with a pre-existing DEM with blank areas, it fills them in.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    You can try emailing the .zip file to mikec@bluemarblegeo.com and I can take a look at it.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I am able to reproduce your issue and have created bug GM-13787 for handling it. This is a completely different issue than the one I found initially trying to replicate your problem.

  • JSL
    JSL Global Mapper User Trusted User

    Thank you so much--always appreciate Global Mapper's great support

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I believe the issue may be related to the 1-2 pixel tall strip of valid samples along the top and bottom, but I'm not entirely sure. If I reduce the Contour Bounds very slightly, just chopping up a couple of pixels at the top and bottom, everything is fine. I can also create a smaller subset that includes enclosed no-data areas and those work fine, so there's something specific in this no-data geometry that's causing the area / hole finding to mess up at the end.

    I used the Terrain Paint tool to break those small connecting lines at the top and bottom with No Data, and now everything is fine, so the issue does indeed seem related to that. I've attached a GMG with those changes for you to try.


  • JSL
    JSL Global Mapper User Trusted User

    Yes, it worked on your gmg. So in the future, I should make sure there's no small connecting lines around the DEM?


    Also, attached is the dem you sent and the resulting contours. I was wondering why there isn't complete isoheight coverage over the entire surface?


    Thanks again for your help...


  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    Oh wow, I didn't even notice that, but it's definitely wrong. There must be something else in this data set causing all the issues.

    One other way to get these iso-height areas is to use the Layer -> Create Area Features from Equal Areas menu command. Specify the desired area range (like 1000 feet) and you'll quickly get iso-height areas with no overlap. This doesn't have any issues with the holes in this data.

  • JSL
    JSL Global Mapper User Trusted User

    I tried the create area features, which, as you say, doesn't have issues with holes in the data, but when I input 3280 feet for a conversion to 1000m, the area features were not constrained to 3280 ft (1000m) isoheight areas.

    Below are standard 1000m contour lines on the dem:

    Here's the options I used in the Create Equal Areas window:

    And here's the result--I used the Options->Area Features window to see what elevation range the area features were classified by, and it's definitely not by 1000m--below, the 1000m contour lines are superimposed on the areas created by the Equal Area process:

    That would be a great hack if I could get use that process to create equal area features similar to contour generation.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    The iso-height areas work a bit differently for the equal-height stuff. If you specify an interval, like 1000 ft, that means 1000 ft to either side. So you will get areas that are centered on multiples of 2000 ft, like 0 ft - 2000 ft, 2000 ft to 4000 ft, etc. rather than 1000 ft to 2000 ft.

    You can use the Layer -> Vectorize Raster option to just get the areas in a certain range and then get say 1000 ft - 2000 ft.

    I think we need a new option on the dialog to allow making the elevation interval work so that you get a multiple that starts the range rather than on either side of the range to mimic the contour generation results.

  • JSL
    JSL Global Mapper User Trusted User

    I don't have a Pro license, so I need to use either contouring or Equal areas from elevation processes. It would be great to get the contouring fixed so I don't have missing isoheight areas like the results in the file I sent:

    Thank you very much for your help in this--I've already gotten one geologist friend to get GM based on its versatile functionality, and It would be great to get the contour isoheights working across the range.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    I have added a new checkbox option to the Setup Equal Value Area Creation dialog allowing you to start the areas at even multiples of the Maximum Match Distance rather than centering them on multiples. If you do this with a value of 50, you would get ranges like:

    [0,50)

    [50,100)

    [100,150)

    ...

    This update will be in tomorrow's v24.0.x daily build at https://www.bluemarblegeo.com/products/global-mapper-daily-builds.php .

    Thanks,

    Mike

    Global Mapper Guru

Sign In or Register to comment.