Inverse of Add Islands
pjp
Global Mapper UserTrusted User
Is there a way to cut an area out of a shape leaving the balance of the parent shape behind? I think of it as the inverse to "add island" and instead "add mainland".
Comments
-
What you are describing sounds like the existing 'add island' option. Maybe I'm misunderstanding you?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
I am running into this issue as well. This is the way I understand it.
1. There are three concentric circles each a different size - Circle 1 > Circle 2 > Circle 3. Imagine a bullseye.
2. Circle 1 is a regular polygon. Circle 2 is an island of Circle 1. Circle 3 is a regular polygon within Circle 2.
In a subsequent process after output it is important that Circle 3 is not overlayed by the entire Circle 2 island. Instead, it is preferred that Circle 2 be a doughnut shape island of Circle 1, Circle 3 being the center.
Perhaps there needs to be more done in our subsequent process to better capture this, but if you know of a method to circumvent this issue, please let me know.
Thanks,
Keith -
Keith,
To do that, just select Circle 2 with the Digitizer Tool, then right-click and select the Crop submenu option to subtract/add island, then select Circle 1 to add it as a hole in Circle 1. Select Yes to mark Circle 2 as deleted. This should give you Circle 2 as a hole in Circle 1 and Circle 3 left as a "parent".
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
Thanks, I had been using the method you suggest, but in our subsequent process the exported vector data (text) will not work. The issue lies in determining to which polygon the island belongs to. Again any thoughts are appreciated otherwise this will be sorted out external of GM.
Keith -
Keith,
What is the problem with the text? Is the text for Circle 1 not in the right spot (i.e. in the middle)? We just fixed an issue last week where the label placement could stick the label in an island, so in this case you would get it in the middle of Circle 3 and not somewhere in the covered part. A new build will fix that. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
The new build also has an option in the Digitizer Tool to chop up areas until there are no more islands. You could use this after adding the island. This would create 2 halves with no island, then circle 3 would be intact.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/products/global-mapper.php -
Mike,
To be specific, we are exporting the vector data of the 3 polygons (circles) in a text format. There is no text inherent in the example. For our purposes it is how we read the vector information contained in the exported text file. Specifically, it would be nice to know which parent the island belongs to - that is, can the information be written into the text file?
In our example above the text file would look like...
NAME=Circle 1
...
NAME=Circle 2
ISLAND=YES
CHILDOF=Circle 1
...
NAME=Circle 3
We could then read in the exported data and apply it as required.
Keith -
Keith,
The islands are always written out immediately after their parent. So if you encounter ISLAND=YES then the last area feature with ISLAND=NO is the parent of that island.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/products/global-mapper.php -
Mike,
Another way we can address this is to chop up the polygons until there are no islands. To avoid floating point rounding issues that result in gaps they are then buffered slightly (~1cm), without combining the result. This last step frequently produces the error described in this post.
http://www.globalmapperforum.com/forums/bug-report/5164-create-buffer-error.html
If either of the two issues above can be addressed then we can develop a solution.
Thanks,
Keith -
Keith,
The latest v14 builds (v14.1) have fixed many of the issues in buffering, so hopefully that error would no longer be an issue. Get that from the links at the beginning of the thread and I think you will be ok.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/products/global-mapper.php -
Mike,
I had been using v14, but used the build you posted above just to be sure. The issue is still present with details below. It seems by chopping the polygon until there are no islands, that invalid polygons are created.
Error creating buffer for feature
Error joining areas for buffer
Polygon join failed due to an invalid polygon. Join will not occur.
PolygonUtils.cpp - 138
Version: v14.1.0 (64-bit)
Build Time: Jan 30 2013 23:28:17
I will send you the shapefile in question in the hopes you can duplicate the error. The steps used to produce the error are as follows.
1. On vector with islands, create single vertex List (Chop until no islands).
2. Select pieces and BUFFER by 0.1m ensuring the "combine" toggle box is not selected.
Thanks in advance,
Keith -
Keith,
Thanks for the files. I was able to reproduce the error and track down the problem, so now you can buffer the areas with no problems. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Hello Mike,
Is is possible when splitting vectors so that no islands remain, that every segment that is created to cut the polygon overlaps?
As before, consider two concentric circles whose areas are C1 > C2. C2 is an island of C1, i.e. a doughnut. When splitting this shape so that no islands exist, a horizontal (or vertical) line is generated so that we have two halves of the doughnut. It would be nice to have a feature that created two lines so that the two halves overlapped by some user defined distance.
Is this possible?
Keith -
If not, perhaps the lines that were created to split the polygon could be exported in a separate process.
-
Could you perhaps create buffers from the 2 area halves after splitting them if you want them to overlap? While saving the cut boxes could be possible, in more complex cases it could end up being a big mess of crop rectangles. I'm not sure what someone would do with those.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
You're correct, the two halves could just be buffered, but then you would be increasing the size of Circle 1 by the buffered amount. That, and when there are hundreds of polygons to apply this to, it takes quite a lot of processing time to buffer every polygon segment. We will be working on a work around for this if it isn't a trivial issue.
Thanks,
Keith -
Keith,
The overlap would also increase the size of the areas, although not as much as buffering the hole thing. What is the purpose of having the overlap? As it is now you should have exactly the same coverage as before splitting up the features. The areas should also join back up if necessary since they will have the common segments where they were cut.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
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