Global Mapper Pro Coming Soon

Creating area features out of another areas

vaxvax Global Mapper UserPosts: 123Trusted User
edited January 2010 in Technical Support
Hi,

I have question regarding the following scenario.

I have a set of areas, representing some scrub in a highland area. Type is 'Scrub' in short. Scrub is on top of rocky terrain, that is represented by an area of type 'Rock'.

'Scrub' is somehow sparce-scattered over the rocky terrain so I draw only the 'Scrub' areas as large spots. Later I need to fill all the inter-spaces between the 'Scrub' with 'Rock' areas.

The drawing of 'Rocks' will be much time-consuming as the 'Scrub' spots are a great lot, very scattered, and have a lot of vertices. There I found a trick but I do not know will it be possible to be done in GM:

Is there a way to draw a large area of type 'Rock' around the 'Scrub' spots and somehow subtract the areas in such a way, that all 'Scrub's make holes in the large 'Rock' area, and eventually break the single large 'Rock' area into multiple holeless 'Rock' areas ???

This way I will have 'Rock' terrain completely surrounding the 'Scrub' spots.

Best regards,
vax

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Vax,

    You can select your scrub areas once you have created them with the Digitizer Tool, then right-click and select to add them as holes/islands in an existing feature, then select the surrounding rock layer as the parent. This will create holes in the rock features wherever the scrub features are.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    Ok, I tried it this way and it almost worked. Unfortunately after making islands in 'Rock', all overlapping 'Scrubs' changed type to 'Rock'.

    Here's an example image. Scrub is green, rocks is blue. The large rock area in the centre was used as a parent. Initially all areas were green exept the centre large rock. After selecting all scrub area they became islands in rock (holes with scrub visible). Unexpectedly all selected scrub outside rock became rock also (blue).

    ex.jpg
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Were the scrub areas that you selected completely inside the rock areas that you tried to assign them to? When asked if you wanted to mark the original areas as deleted after adding them as islands, what did you select? In this case you need to select No since you want the scrub areas to still be there after they are added as holes in the enclosing rock areas. You also need to make sure that the scrub areas completely fit within the rock areas that you are putting them in.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    Actually choosing Yes or No do not make such as difference because my original intention was to export just the rock area an to split it in pieces in an external application (I do not want areas with holes, btw it's would be a good feature if I can do this splitting directly in GM)

    The problem here is revealed in your last sentence. My scrub areas DO NOT completely fit within the rock areas and obvoisuly it will be too difficult or even impossible to do so.

    I actually find it absolutely logical if the scrub island do not fit entirely in rock, just to trim the parent using the shape of the island where they overlap - let's say it to bite the apple :-)

    Regards,
    vax
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Vax,

    I see what you mean. You really want an operation to subtract a group of areas (the scrub areas) from some parent area (the rock area). There is not currently a way to do this, but I think I can add it rather easily as area joining and intersection is already present and our polygon library supports subtraction as well. I will try and get this added and point you at a new build when it is ready.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Vax,

    I have completed updating the existing option to make areas islands in another area to actually be a more generic cut operation, so now the operation will actually allow non-enclosed areas to be used to cut the boundary of a larger "parent" area. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    Thanks Mike, It seems to work as expected, great work!

    What about the option to slice an area with holes into multiple areas that contain no holes? It's not related to the area subtraction problem that you solved, but it would be a useful option I think .

    Cgpsmapper sometimes produces unexpected results when there are polygons with holes. So I have to load the subtracted resulting area into MapEdit and use it's 'Merge Inner polygons' function. The latter does not produce multiple areas, i.e. no real slicing, but rearranges vertices to eliminate holes.

    Sorry for my impudence but all these tweaks regarding visual editing are quite important for me because I try to make GM my only workload horse and all requested features and changes speed-up my work a lot...

    Best regards,
    vax.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Vax,

    There is already a kind of way to do the slice that you are describing. What you need to do is draw an area feature that cuts through your area to be sliced where you want to cut it and then goes outside of that area. Then, select both areas with the Digitizer Tool, right-click, then select the option to find the intersection of the two areas. When prompted choose to also keep the subtracted results outside of the intersection. Then you should end up with new areas sliced at the selected location. You can just delete the portion of the slice area that you don't need.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    Hi Mike,

    it seems that the function that you implemented behaves strangely. I get unexpected "One or both of the selected polygons are invalid" and "Error clipping polygons" errors. There are no invalid areas in the cut operation nor the clipping error says something for clue ...
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Can you provide a screenshot with what you are trying to combine that results in the error?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    GM02.jpg

    GM03.jpg
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    On the images above I just selected dragging all objects around and including the pink area, then deselected it using SHIFT+click. After that right-click + cut op and selected the pink area as parent. Clicked NO to the 'mark as deleted' prompt ...

    I must say that cut op sometimes behaves as expected and I can't find a clue when things go OK and when go wrong.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Can you provide the data that results in this error? It is hard for me to tell what-is-what from the screenshots.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    OK, I'll send you the GMW via a message.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2010
    Ok I was able to reproduce what you are seeing. Unfortunately the polygon clipping library that we are using can have strange errors in some cases that I have still not figured out, but I was able to significantly improve this so at least most of the work will still be done, and you can easily clean up what is left (at least for your usage scenario).

    I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • vaxvax Global Mapper User Posts: 123Trusted User
    edited January 2010
    Thanks,
    now it seems to work somehow better despite the error mesage and the strange artefacts that are left after the cut op - e.g. some lonely points left out that have to be removed.
Sign In or Register to comment.