Open fithisux opened 11 years ago
Hi I deploy on an 1.9.1 neo4j server on ubuntu x64 13.04 with latest server plugin
neo4j-spatial-0.11-neo4j-1.9-server-plugin.zip
I put data with parameters both lat/lon equal to 5
and I do a query within distance with x=y=5 and radius 10
The snippet of creation of index
Index<Node> spatialindex; if(!index.existsForNodes("layer1")) { spatialindex = index.forNodes("layer1",SpatialIndexProvider.SIMPLE_POINT_CONFIG); } else { spatialindex=index.forNodes("layer1"); } The snippet of addition Node v = this.bgr.gds.createNode(); //creation v.setProperty("lat", pkg.latitude); v.setProperty("lon", pkg.longitude); this.spatialindex.add(v,"dummy","value"); The snippet for searching public Iterator<Node> queryPackagesSpatial(BiopolisSpatialQuery sq) { HashMap<String, Object> params = new HashMap<String, Object>(); params.put(LayerNodeIndex.POINT_PARAMETER, new Double[]{sq.longitude,sq.latitude} ); params.put(LayerNodeIndex.DISTANCE_IN_KM_PARAMETER, sq.radius); return this.bgr.pkg_mgmnt.spatialindex.query(LayerNodeIndex.WITHIN_DISTANCE_QUERY,params); }
It returns nothing. The snippets work on the client side
A fully running failing test would be great. With correct example data.
Hi I deploy on an 1.9.1 neo4j server on ubuntu x64 13.04 with latest server plugin
neo4j-spatial-0.11-neo4j-1.9-server-plugin.zip
I put data with parameters both lat/lon equal to 5
and I do a query within distance with x=y=5 and radius 10
The snippet of creation of index
It returns nothing. The snippets work on the client side