DatasetVector dataset_world = (DatasetVector) datasource.getDatasets().get("JSYDBP");
String coords="382191.8350,3135364.8694,383074.6488,3135250.3422,382745.3831,3134128.9301,382077.3078,3134367.5285,382191.8350,3135364.8694";
Point2Ds point2Ds=new Point2Ds();
String [] coordsAry = coords.split(",");
for (int i = 0; i < coordsAry.length; i+=2) {
double x = Double.parseDouble(coordsAry[i]);
double y = Double.parseDouble(coordsAry[i+1]);
Point2D point2d = new Point2D(x, y);
point2Ds.add(point2d);
}
GeoRegion geoRegion= new GeoRegion(point2Ds);
QueryParameter parameter = new QueryParameter();
//parameter.setAttributeFilter("");
parameter.setCursorType(CursorType.DYNAMIC);
parameter.setSpatialQueryMode(SpatialQueryMode.INTERSECT);
parameter.setSpatialQueryObject(geoRegion);
Recordset queryResultRecordset = dataset_world.query(parameter);
传入一个面进行空间相交查询,但是查询结果丢失一条数据,不知道是怎么原因,蓝色部分是查询的结果集,
丢失了标红地块的数据