Global Mapper v25.0

Divides area into sub-areas using lines

Syrett
Syrett Global Mapper UserTrusted User
I'm looking for a simple way to divide an area into smaller areas, using lines as dividers. A basic way to do this is to select both the lines and the parent area, then right-click and select the Crop submenu command to split the area against the lines. 

But here's the catch: The lines I'm using originate in a draw program, and any "islands" import to Global Mapper as unclosed lines. Any attempt to import "islands" separately as areas just adds another array of complications.

I've looked into other possibilities suggested in the past on this Forum (such as https://www.globalmapperforum.com/discussion/12052/create-area-features-from-existing-line-and-area-features ) but none gives a simple, clean operation in which new areas are created from lines (the way you would color areas in a coloring book).

QGIS has a tool called "Polygonize" which seems to do this....but who wants to use Q when Global Mapper is so much easier? http://confound.me.uk/maps/ppv4.pdf 

Is there some obscure tool in Global that I've missed? Or procedure?

Thanks!

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    I think this will do what you want.
    1. Start the Digitizer
    2. Select the area features and the lines you want to use to divide the areas.
    3. Right-click and choose Crop/Combine/Split Functions | Crop Selected Area(s) to Selected Lines(s)
    Cheers,
    Bob
  • Syrett
    Syrett Global Mapper User Trusted User
    Thanks, Bob, but I already mentioned that method in my first paragraph. It doesn't allow for "island" features, because -- being lines like the other imported lines -- they don't create separate areas of their own. This default method only works for the simplest collection of lines and areas.
  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    Did you try first converting your "island" line features to area features, then cutting them from the areas that enclose them to create islands? Once you do that, cropping the areas by line features will take the islands into account.

    Cheers,
    Bob
  • Syrett
    Syrett Global Mapper User Trusted User
    OK, here's what I did. 

    First, I made sure that there is only one area: a bounding rectangle. 



    Second, I converted all other areas into lines. From what I could see, all the lines connect in some way; even the features that had originally been unclosed "islands" had been converted to areas and then back into lines (and therefore now closed).



    Third, I used the tool mentioned above (Right-click and choose Crop/Combine/Split Functions | Crop Selected Area(s) to Selected Lines(s)).

    In my understanding, theoretically there should be a "coloring book" result, i.e. each area that is visibly enclosed by lines should now be a selectable area.

    Instead, this is what I get:



    Suggestions?

  • Did the original data originate from AutoCAD? Can you share the data as it's hard to understand which lines are islands from your screenshots?
  • Syrett
    Syrett Global Mapper User Trusted User
    The original lines were drawn in Adobe FreeHand, then exported as shapefiles using Avenza MAPublisher. I "laundered" the resulting shapefiles in Global Mapper (see my post above), then used the GM process. I've attached the shapefiles.

    I also ran them through Manifold 8 and got a similar, and actually cleaner, result:



    My hunch, just doing a visual check of these results, is that these divide functions (both GM and Manifold) only process lines that either close on themselves, or on the bounding rectangle.

  • As far as I can see the problem is due to some of the lines not terminating at the boundaries they intend to meet. This leaves small gaps and therefore GM is unable to form the enclosed areas that you are expecting. Also note that there are gaps in between your area features that will also cause problems. You might be able to fix the latter using Right-click > Move Reshape Feature(s) > Close Gaps Between Adjacent Features. 




  • Syrett
    Syrett Global Mapper User Trusted User
    Thanks - I'll revisit this!