[
https://issues.apache.org/jira/browse/SEDONA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614895#comment-17614895
]
Jia Yu commented on SEDONA-177:
-------------------------------
[~Kontinuation] I think this is a good idea. Thank you very much!
To maintain the backward compatibility, please also keep this API (just a
wrapper around the new API you introduce) and mark them as "deprecated"
JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD, usingIndex,
considerBoundaryIntersection)
> Support spatial predicates other than INTERSECTS and COVERS/COVERED_BY in
> RangeQuery.SpatialRangeQuery and JoinQuery.SpatialJoinQuery
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SEDONA-177
> URL: https://issues.apache.org/jira/browse/SEDONA-177
> Project: Apache Sedona
> Issue Type: Improvement
> Reporter: Kristin Cowalcijk
> Priority: Major
>
> 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{}}}:
> {code:java}
> public enum SpatialPredicate {
> CONTAINS,
> INTERSECTS,
> WITHIN,
> COVERS,
> COVERED_BY,
> TOUCHES,
> OVERLAPS,
> CROSSES,
> EQUALS
> }
> {code}
> {*}Spatial Range Query{*}:
> User can specify one of the spatial predicates in
> RangeQuery.SpatialRangeQuery.
> {code:java}
> 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)
> {code}
> {*}Spatial Join Query{*}:
> User can specify one of the spatial predicates in JoinQuery.SpatialJoinQuery.
> {code:java}
> val usingIndex = false
> var result = JoinQuery.SpatialJoinQuery(objectRDD, queryWindowRDD,
> usingIndex, SpatialPredicate.COVERS)
> // 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)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)