-
Notifications
You must be signed in to change notification settings - Fork 447
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
Support equalsTopo for GeometryCollections #539
Comments
The problem is that components of I'm not sure how the proposal handles this situation? [EDIT] Based on comment below I realized that my analysis above is based on my own conception of how GC topology could work. I'm not sure if this is supported by any wider opinion (such as the OGC/ISO standard). So this needs further discussion. |
Your example on the NTS issue is interesting. There does seem to be a conflict between the semantics of GeometryCollection boundary, and the semantic suggested above of the collection essentially being topologically equal to the union of the components. I'm not sure which definition should take priority. The idea that a GeometryCollection functions just as an independent collection of Geometries has some appeal. The implementation for equalsTopo is then straightforward as you suggest. Does this generalize to other predicates? The predicates are just names for DE-9IM patterns - how would that work for collections? Is there any clue for GC semantics in the standards docs? |
I wasn't going to comment on this when opening the issue, because I'm not 100% on what the standards have to say about GC semantics in such cases, either. My thought was that, as long as we can assume that each individual component of a GC is valid by itself, then we can start by doing
Well, A more general solution seems within the realm of possibility, but probably a lot harder than going case-by-case and considering how to apply it to the next specific predicate... |
If you mean that UnaryUnion is applied to each entire GeometryCollection input, then the above doesn't happen. A covered point would not be present in the "topologically-reduced" output of the union. This seems like the definition most in line with the general "point-set topology" basis for the OGC semantics. And in case it isn't obvious, this is NOT the definition that was proposed in the opening comment of this issue.
The point-set topology definition makes a general solution simple, because it follows the exact same logic as currently in place. |
Note that if the point-set topology definition is accepted, then the current semantics of |
i have to say that the original use case for the NTS issue seems questionable to me. I don't see why you would use topological equality as the criteria for deciding whether to update a database record. |
Another note: I'm working on an idea to provide a completely new implementation of the spatial predicates. It will operate in a way which is closer to the concept of point-set topology; i.e. it will evaluate the topology only at "significant points". The full topological relationship is determined by the sum of the topologies at each point. This has the following advantages:
I mention this because it works well with the point-set topology approach suggested above. |
To give some context, this is for an automatic change tracking mechanism, where an ORM detects whether a value changed or not. My mental mode here was to think of different representations which are equal topologically as different "non-canonicalized" representations, and for the reasonable user expectation to be to want updates only if the geometry changed topologically. I'd be happy to hear arguments to the contrary, and possibly to change the implementation to do exact instead of topological equality if that makes more sense. But in any case, the question goes beyond database change tracking etc. |
A further remark on the original proposal: to build a |
A further comment on NTS 213: Looking at this more closely, I see that the contradiction in MSSQL arises because apparently MS-SQL has already defined a semantic for |
Actually, I think any To resolve the particular example that I brought up, I guess we need a definitive answer to the question: "If two polygonal components of a GC share a line segment that is covered by no other polygonal components in that same GC, then is that line segment part of the GC's interior or its boundary?"
Edit to add: notably, if the answer is "part of the GC's interior", then it seems that a |
Is there a rough ETA when this issue will be resolved? |
@airbreather does RelateNG (#1052) fix this issue? |
See also: NetTopologySuite/NetTopologySuite#213
We think that there's a reasonably straightforward way to do
equalsTopo
forGeometryCollection
s, by comparing the polygon, line, and point components on each side.@FObermaier had this idea:
On the NTS side of things, this is a major blocker for some folks, so I figured I'd raise this up here.
The text was updated successfully, but these errors were encountered: