Global Mapper v25.0

Cut polyline by polygon

fireballit
fireballit Global Mapper User
edited February 2012 in Vector Data
Is there a method to erase polylines within a polygon using Global Mapper? For example, if I wanted to remove contour lines generated by a structure on a DEM surface, could I use a custom polygon to cut away the unwanted line segments, like a cookie cutter?

Comments

  • global_mapper
    global_mapper Administrator
    edited August 2011
    What you can do is select the area and the lines to cut, then right-click and select the option to split/crop the lines against the area. Select to split them, then you will have the pieces of the line both inside and outside the area. Just select those on the inside and marked them as deleted.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • fireballit
    fireballit Global Mapper User
    edited August 2011
    Your solution worked well. Thank you for the assistance.
  • ikabott
    ikabott Global Mapper User Trusted User
    edited February 2012
    Is there any way to use this 'hidden' functionality through the script?
  • global_mapper
    global_mapper Administrator
    edited February 2012
    If you have a polygon covering the entire thing with the area to cut out as an island you could use the GENERATE_CONTOURS script command and provide the polygon via a file using the POLYGON_CROP_FILE attribute to specify with file containing the polygon to crop to, then the contours should only be in the desired covered portion.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • 1.First split the layer into various categories. Turn on the specific polygon to select lines in that.

    2.Select all line features in it. It also selects the line crossing the boundary hence giving us wrong lengths. But we just need the lengths within a polygon.

    3. Right-click and split selected lines into a line for each segment.This now splits the lines just within the polygon.

    4. Now select all line features again and delete. This just deletes the lines within the polygon


    Thanks,

    Sneha