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

RelateOp fails for disjoint inputs with GeometryCollection #983

Open
dr-jts opened this issue Nov 3, 2023 · 0 comments
Open

RelateOp fails for disjoint inputs with GeometryCollection #983

dr-jts opened this issue Nov 3, 2023 · 0 comments
Labels

Comments

@dr-jts
Copy link
Contributor

dr-jts commented Nov 3, 2023

The relate operation fails when the inputs are disjoint and one input is a GeometryCollection:

bin/geosop -a "POINT(0 0)" -b "GEOMETRYCOLLECTION(POINT (1 1), LINESTRING (1 1, 2 2))" relate

Run-time exception: IllegalArgumentException: Operation not supported by GeometryCollection

Analysis

This occurs because GeometryCollection currently does not support the getBoundary method. This is because support for GeometryCollections as input to spatial predicates is a work-in-progress (e.g. see discussion on #982). Evaluating the IntersectionMatrix in a disjoint case requires computing the dimension of the boundary. This is currently implemented in a way which requires determining the boundary of the geometry (see BoundaryOp.hasBoundary), which fails for GeometryCollections.

The fix is probably to support determining the boundary dimension without materializing the actual boundary of the geometry. Note that if the "GC-Union-topology"semantic is to be used, determining the boundary dimension of a heterogeneous GeometryCollection requires handling special cases including:

  • LineStrings forming rings
  • LineString endpoint lying inside a Polygon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant