Global Mapper Pro

Contour generation - adaptive resolution

vax
vax Global Mapper UserTrusted User
edited April 2011 in Suggestion Box
Hello Mike,

can contour generation resolution be made adaptive, according to the top level DEM at a given area?

I tried to generate contours using a couple of DEMs - one with high resolution (1 m per pixel), the other far-less detailed (90m per pixel). The 1m DEM is a small patch and it is on top of the 90m DEM. The 90m DEM is significantly larger (~10 000 km2).

If I try generating contrours with 1 m resolution on the whole area, it takes around 5 days to do the calculations. This is OK for the 1 m DEM because details are finely reproduced, but useless for the rest 90 m DEM area. If I do 90 m resolution generation, it's fine for the 90 m DEM but I surely lose a lot of detail in the area, covered by the 1m DEM.

A fine workaround will be to add a radio button in the contour generation dialog -something like "set resolution equal to each DEM's resolution".

Even better workaround will be to have a field in the DEM's options dialog, dedicated to contour generation - eg. x & y resolution values for contour generation. This way contour resolution can be adjusted precisely for each DEM that is currently displayed.

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2011
    The problem is that DEMs of any number of resolutions could be arranged in any type of shape and some kind of regular connected grid needs to be laid on top of the arrangement of DEMs. What you could do is generate contours from the 90m data with a hole cut out for where the 1m DEM data lives, then separately generate the contours from the 1m DEM data. They wouldn't match at the edges, but that should be the only seam of no matches.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vax
    vax Global Mapper User Trusted User
    edited April 2011
    Thanks Mike.

    I did this test. First made an area in the bigger 90m DEM, put a hole matching the smaller DEM, then made an island in the bigger area. Finally generated/cropped the 90m DEM contours on the area+island. Second - generated/cropped the 1 m DEM using the hole.

    Unfortunately the seam was very anoying because the area was a rotated rectangle and the cropping introduced saw-like pattern at the contour edges, and the step of the saw was different - 90 m vs 1 m.

    I made the test again, using a non-rotated rectangle area. This time I succeedded to match both contour sets acceptably - i.e. no saw-like pattern was introduced while cropping.

    Anyway - the overhead for such a simple task is significant to me. So - is there any chance that you could introduce such a feature in GM, or it doesn't worth the effort ?
  • redbeard
    redbeard Global Mapper User Trusted User
    edited April 2011
    I dont think there is an easy way around that - the best I can think of is make a hole in the 90m data that is larger than the 1m data - and generate those contours. Then overlay your 1m over the 90m, and feather it to some extent, and generate contours in the hole -

    I think- if the hole you use is larger - then GM should use the 90m and the 1m to generate contours on the smaller area - and at the edge it should match pretty closely. In most every case I've heard you need to edgematch contours when using two quite different elevation datasets.

    Basically do what you did before, but use a larger hole - and that should help with the edges. Would this work?
  • global_mapper
    global_mapper Administrator
    edited April 2011
    I basically don't think there is going to be a reasonable way (at least not with the current contour generation algorithm) to generate seamless contours at different resolutions. You could maybe compromise and do the contour generation at some resolution in between the 2, say maybe 5 meter resolution, which would speed things up by a factor of 25 over the full 1m resolution but still generate a much more resolute result.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vax
    vax Global Mapper User Trusted User
    edited April 2011
    redbeard, thanks for the hint. In fact I use the same sequence - first feather both DEMs using an area, exactly matching the smaller DEM. Then I draw a larger area to contain entirely the smaller DEM, and use it as a hole.

    The trick works unless you don't rotate the hole-area. If you rotate it - you introduce a saw-like pattern at both contour edges because of the different processing step - 90m vs 1m, and the seam looks totally ugly.
  • vax
    vax Global Mapper User Trusted User
    edited April 2011
    It appears that this task reveals a whole lot of problems :-) Cropping on the fly does not crop precisely the contours but leaves a gap (unacceptable) around the island area. This gap size is close to the DEM's pixel size in meters.

    I tried to cheat this behavior in another way. I generated the 90 m DEM contours entirely, without cropping. Then exported contours in a DXF using cropping with the area-with-island. Unfortunately it seems that such a croping doesn't work as expected as the cropping is done only outside the area but not within the island.

    I suppose that both behaviors are somehow buggy, especially the second one.
  • global_mapper
    global_mapper Administrator
    edited April 2011
    I suspect the gap size has to do with where the samples for the contouring land relative to the crop area as it's not very likely that the crop area lines up perfectly with the 90m samples and the cropping is done not to the generated contour lines but instead to the elevation samples that are used generate the contours.

    The vector cropping is currently limited to only the outer boundary of a crop polygon, cropping to areas with islands is not supported. However there is a workaround for this. If you first select the crop area with island with the Digitizer Tool, then right-click and select the option under the Advanced Feature Creation submenu to Create a Single Vertex List from the Selected Area then you should get a single outer boundary that includes the island through an invisible line. You should then be able to crop to that and get what you need.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.