Skip to content
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

RFC: Bag semantics for operations on GeometryCollections #761

Closed
dr-jts opened this issue Jul 29, 2021 · 2 comments
Closed

RFC: Bag semantics for operations on GeometryCollections #761

dr-jts opened this issue Jul 29, 2021 · 2 comments

Comments

@dr-jts
Copy link
Contributor

dr-jts commented Jul 29, 2021

GeometryCollections are not supported as inputs for many useful JTS operations (e.g. overlay, spatial predicates, boundary). This is because the JTS design philosophy in the past has been that GeometryCollections should have full topological semantics. This requires substantial processing for all topological operations (e.g. overlay, predicates, boundary), which has essentially prevented them from being implemented.

However, there seems to be a general consensus that "bag" semantics are sufficient for GeometryCollections. This substantially simplifies their semantics, and allow all the above methods to be provided.

Bag semantics means that operations are evaluated piecewise on the collection(s), and the results are returned as collections. No attempt is made to "condense" the result into a simpler, topologically valid geometry.

See #539, NTS-213 comment.

For prior art, it seems like MS-SQL provides these semantics for at least some operations. I'm not aware of any normative OGC semantics for GeometryCollections.

Questions

  • Buffer currently works with GeometryCollections. Its semantics should not change, I think.
@dr-jts dr-jts changed the title Implement bag semantics for GeometryCollections RFC: Implement bag semantics for GeometryCollection operations Jul 29, 2021
@dr-jts dr-jts changed the title RFC: Implement bag semantics for GeometryCollection operations RFC: Implement bag semantics for operations on GeometryCollections Jul 29, 2021
@dr-jts dr-jts changed the title RFC: Implement bag semantics for operations on GeometryCollections RFC: Bag semantics for operations on GeometryCollections Oct 12, 2022
@dr-jts
Copy link
Contributor Author

dr-jts commented Oct 25, 2022

While implementing bag semantics is relatively simple, there is also a good argument for providing "point-set-topology" semantics for overlay operations and predicates. Probably this is the most natural way to extend the current Geometry methods.

A step in this direction is #915, which provides overlay support for simple GeometryCollections.

@dr-jts
Copy link
Contributor Author

dr-jts commented Dec 19, 2024

The two main operations of overlay and relate now handle GeometryCollections using Point-Set Topology semantics. So this design choice is no longer an issue.

@dr-jts dr-jts closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant