-
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
Add Snap-Rounding Overlay option #2
Comments
@strk I'm wondering if the global rounding caused by using SR will be an issue for users? It seems like a small price to pay for robustness, but I can imagine some situations where changing every coordinate might not be desirable. |
Yes it may be an issue. At least I know a person who complained about
this specific drift, he reported, is also enforced by some known
proprietary tool.
Me I think a global grid may be defined by a specific authority for
a specific bounding box and be done with it, but as I said I've heard
someone complain. Will try to have him comment here to know more :)
|
@dr-jts so the |
@strk That's a good point. However, this should not create issues when using SR for internal computation, as long as the SR grid is finer than all the "external" grids being used. (All that is needed for SR to prevent robustness errors is a few digits of precision, so the grid can be quite fine.) Another alternative is to use the finest grid of all the ones which will be used (assuming the others are multiples of it). It's worth noting that snapping to grids itself may introduce topology invalidity (collapses, self-intersection), unless it is done using SR. Is this handled appropriately? |
It's not a matter of how much things are moved, even a single bit
can be a problem when you move datasets from a center to another
for a specific computation.
But maybe I'm being over paranoid.
Note GEOS can already do precision reduction as a possible
workaround to topology exceptions, so snaprounding wouldn't
be worst than that.
|
Yes, I've seen this kind of constraint before as well. It's going to be difficult or impossible to provide full robustness while maintaining full precision, I think. Maybe the best that can be done is to not change the coordinates during an overlay op if there is no interaction between the inputs. This will require a special check, though. And yes, SR should be basically the same impact as precision reduction. At least that's my working hypothesis - will need to be confirmed by testing. |
Using Snap-Rounding for noding in Overlay should provide full robustness. TopologyExceptions will never be thrown!
Design Aspects
Design Issues
The code is in branch https://github.com/dr-jts/jts/tree/overlay-sr-classic
The text was updated successfully, but these errors were encountered: