-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to combine overlapping layers and preserve holes? #586
Comments
I can give you a sequence of commands to merge the two layers in the way you described, but I'd like you to consider a slightly more complex example first. What if the "A" dataset had two polygons that both partially overlapped the "B" donut-shaped polygon. What should the output look like in that case? I'm attaching a .zip archive, the new file is called "poly_c.geojson" |
That, fortunately, is not a case I need to worry about. |
I see, it sounds like you are using mapshaper to merge two individual polygons. I can give you a series of commands that will merge "A" and "B", and then add the holes in the original "B" shape to the merged shape (see below). Mapshaper's commands are designed to work on layers of one or more shapes. To create a more user-friendly command for this transformation, I'd have to understand how it would behave when applied to two layers containing multiple shapes.
|
poly_a.geo.json.txt
poly_b.geo.json.txt
I have these two geojson files. The polygon defined in poly_b contains a hole and is contained within the polygon defined by poly_a.
What I would like to do is merge these two polygons together, but preserve the hole in poly_b.
Is that possible using mapshaper?
If it is not possible, then this can be considered a feature request for the boolean operations needed to accomplish this.
The text was updated successfully, but these errors were encountered: