Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
This is an RDD API improvement which will be helpful for fixing SEDONA-119. The major changes are:
Spatial Predicates:
We'll define 9 commonly used spatial predicates in enum SpatialPredicate:
public enum SpatialPredicate { CONTAINS, INTERSECTS, WITHIN, COVERS, COVERED_BY, TOUCHES, OVERLAPS, CROSSES, EQUALS }
Spatial Range Query:
User can specify one of the spatial predicates in RangeQuery.SpatialRangeQuery.
val rangeQueryWindow = new Envelope(-90.01, -80.01, 30.01, 40.01) val usingIndex = false var queryResult = RangeQuery.SpatialRangeQuery(spatialRDD, rangeQueryWindow, SpatialPredicate.COVERED_BY, usingIndex) // this is equivalent to // RangeQuery.SpatialRangeQuery(rangeQueryWindow, spatialRDD, SpatialPredicate.COVERS, usingIndex) // or // val considerBoundaryIntersection = false // RangeQuery.SpatialRangeQuery(spatialRDD, rangeQueryWindow, considerBoundaryIntersection, usingIndex)
Spatial Join Query:
User can specify one of the spatial predicates in JoinQuery.SpatialJoinQuery.
val usingIndex = false var result = JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD, usingIndex, SpatialPredicate.COVERED_BY) // this is equivalent to // val considerBoundaryIntersection = false // JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD, usingIndex, considerBoundaryIntersection) var result = JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD, usingIndex, SpatialPredicate.INTERSECTS) // this is equivalent to // val considerBoundaryIntersection = true // JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD, usingIndex, considerBoundaryIntersection)
Attachments
Issue Links
- fixes
-
SEDONA-119 ST_Touches join query returns true for polygons whose interiors intersect
- Resolved
- links to