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

Correct bounding box logic for GeometryCollection type #9550

Merged
merged 1 commit into from Feb 9, 2015

Conversation

nknize
Copy link
Contributor

@nknize nknize commented Feb 3, 2015

"The OpenGIS Abstract Specification: An Object Model for Interoperable Geoprocessing" published by the OGC defines "The boundary of a geometric object is a set of geometric objects of the next lower dimension." The bounding box of a GeometryCollection is therefore the set of bounding rectangles derived from the geometric objects of the next lower dimension. This commit updates the computeBoundingBox and relate methods for the ShapeCollection base class to correctly determine the prefixTree detail level used in Lucene's FilterCellIterator.

closes #9360

@nknize nknize added v1.4.4 v1.5.0 v2.0.0-beta1 :Analytics/Geo Indexing, search aggregations of geo points and shapes >bug review labels Feb 3, 2015

@Override
public SpatialRelation relate(Shape other) {
SpatialRelation bboxRelation;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be a local inside the loop?

@rjernst
Copy link
Member

rjernst commented Feb 3, 2015

I left a couple comments. The only important one is about the relates logic.

@nknize nknize removed the review label Feb 5, 2015
@nknize nknize added the review label Feb 5, 2015
@nknize
Copy link
Contributor Author

nknize commented Feb 5, 2015

Updated this PR per comments. Relate logic can be removed as per comment in latest commit 7a3bc2e

@rjernst
Copy link
Member

rjernst commented Feb 8, 2015

@nknize LGTM. There is still a reference to relate in the javadocs of XGeometryCollection. Also, is the plan to add something called GeometryCollection to spatial4j with this modified behavior, or to modify ShapeCollection? If the latter, then I think this should be called XShapeCollection.

"The OpenGIS Abstract Specification: An Object Model for Interoperable Geoprocessing" published by the OGC defines "The boundary of a geometric object is a set of geometric objects of the next lower dimension." The bounding box of a GeometryCollection is therefore the set of bounding rectangles derived from the geometric objects of the next lower dimension. This commit updates the computeBoundingBox and relate methods for the ShapeCollection base class to correctly determine the prefixTree detail level used in Lucene's FilterCellIterator.

closes elastic#9360
@nknize nknize removed the review label Feb 9, 2015
@nknize nknize merged commit c9893ba into elastic:master Feb 9, 2015
@spinscale spinscale added v1.4.3 and removed v1.4.4 labels Feb 11, 2015
@clintongormley clintongormley changed the title [GEO] Correct bounding box logic for GeometryCollection type Geo: Correct bounding box logic for GeometryCollection type Feb 11, 2015
@clintongormley clintongormley changed the title Geo: Correct bounding box logic for GeometryCollection type Correct bounding box logic for GeometryCollection type Jun 7, 2015
@nknize nknize deleted the fix/9360 branch May 27, 2016 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug v1.4.3 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

geo_shape query matches shapes inside hole of complex polygon
3 participants