-
Notifications
You must be signed in to change notification settings - Fork 6
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
Snapped difference result: Linestring or Empty? #7
Comments
JTS returns This is expected, since (currently and by design) polygon edges which collapse due to snapping are not included in the output. The rationale is that if the inputs were snapped prior to running the operation, those edges would disappear anyway. And it avoid having portions of polygons turn into lines, which might be "surprising" to subsequent processing. So chalk this one up as a difference in semantics between OverlayNG and classic overlay. (Open to discussion, of course) |
Yeah, a big proportion of the other failures in the XML suite are of this category. The outputs from the old overlay are GEOMETRYCOLLECTION(LINESTRING, POLYGON), and the outputs of the NG overlay are MULTIPOLYGON. |
This does seem (in this case quite clearly) to violate the principle of least surprise though. It's surprising that the clear something outside of B turns into nothing in the difference result. |
Sigh... I suppose so. It may be a bit tricky to reintroduce output of collapsed edges, since I remember dropping this semantic made the coding easier. Will need some research to see. |
The test of GEOS 350 in the TestOverlay-geos-350.xml file is an areaoverlay test. But GEOS has a test that actually includes the resultant. And the resultant is basically a line. When this "exact" test is run in GEOS using OverlayNG, the result is this:
The two shapes look like this.
The difference should be something, either a POLYGON with a very narrow base (the GEOS result using the old overlay engine) or snapped down to a LINESTRING. GEOS OverlayNG returns EMPTY, does JTS?
The text was updated successfully, but these errors were encountered: