Cut polyline by polygon
fireballit
Global Mapper User
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
-
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 -
Your solution worked well. Thank you for the assistance.
-
Is there any way to use this 'hidden' functionality through the script?
-
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
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website