You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by "chenpengchuan (Jira)" <ji...@apache.org> on 2021/06/02 04:07:00 UTC
[jira] [Created] (SEDONA-41) RangeQuery.SpatialRangeQuery(U originalQueryGeometry, SpatialRDD spatialRDD, boolean considerBoundaryIntersection, boolean useIndex) 方法当传入参数useIndex=false是查询结果不正确
chenpengchuan created SEDONA-41:
-----------------------------------
Summary: RangeQuery.SpatialRangeQuery(U originalQueryGeometry, SpatialRDD<T> spatialRDD, boolean considerBoundaryIntersection, boolean useIndex) 方法当传入参数useIndex=false是查询结果不正确
Key: SEDONA-41
URL: https://issues.apache.org/jira/browse/SEDONA-41
Project: Apache Sedona
Issue Type: Bug
Affects Versions: 1.2.0
Environment: spark-2.4.5-bin-hadoop2.7
java version "1.8.0_60"
Reporter: chenpengchuan
Fix For: 1.2.0
类 RangeQuery 里边方法 RangeQuery.SpatialRangeQuery(U originalQueryGeometry, SpatialRDD<T> spatialRDD, boolean considerBoundaryIntersection, boolean useIndex) 方法当传入参数useIndex=false 时查询结果不正确,会返回spatialRDD的所有行作为查询结果。
错误复现方式如下:
{code:java}
PointRDD pointRDD = new PointRDD(sc, "arealm-small.csv", 0, FileDataSplitter.CSV,true);
Coordinate[] coordinates = new Coordinate[5];
coordinates[0] = new Coordinate(-90.01, 30.01);
coordinates[1] = new Coordinate(-90.01, 40.01);
coordinates[2] = new Coordinate(-80.01, 40.01);
coordinates[3] = new Coordinate(-80.01, 30.01);
coordinates[4] = coordinates[0];
GeometryFactory geometryFactory = new GeometryFactory();
Polygon queryGeometry = geometryFactory.createPolygon(coordinates);
JavaRDD<Geometry> rdd = RangeQuery.SpatialRangeQuery(queryGeometry, spatialRDD, false, false);
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)