Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
1.2.0
-
spark-2.4.5-bin-hadoop2.7
java version "1.8.0_60"
Description
类 RangeQuery 里边方法 RangeQuery.SpatialRangeQuery(U originalQueryGeometry, SpatialRDD<T> spatialRDD, boolean considerBoundaryIntersection, boolean useIndex) 方法当传入参数useIndex=false 时查询结果不正确,会返回spatialRDD的所有行作为查询结果。
错误复现方式如下:
SpatialRDD 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);
Attachments
Issue Links
- links to