Spatial Additions to H2 - #1
Open
JakeSchmitz wants to merge 4 commits into
Open
JakeSchmitz wants to merge 4 commits into
JakeSchmitz wants to merge 4 commits into
Conversation
…to Covers from JTS
…er geometries to support 'near' conditions in the future
… as this is a more logical place. At this point we can support intersection, within (covers) and near queries (using expand).
…rations because results are too inaccurate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will track the work necessary for supporting a couple additional operations on Geometry types in H2. Currently, H2 supports Geometry columns in WKT format, and supports an "envelope intersection" operation. We want to add support for 2 additional operations in query conditions:
"COVERS": This operator should return true if the first geometry completely contains the second (boundary inclusive).
"EXPAND": This operator should take a geometry and a distance (radius), and return a geometry that contains all points within distance of the input geometry.
COVERS will allow us to query for points in polygons, and that, in conjunction with EXPAND will allow for queries that select points within a distance of a polygon.
So far, we've got rough drafts of Covers and Expands, however this is incomplete, especially with regards to the handling of index conditions for these new operators (which is after all why we are adding these functions to H2, to leverage H2s internal Spatial Indexes on queries for geometries near or within other geometries).