I tried this snippet: GeometryFactory gf = layer.getGeometryFactory(); Geometry geom = gf.toGeometry(envelope); List<Node> nodes = GeoPipeline.startWithinSearch(layer, geom).toNodeList();
but the result still contains nodes which are not fully inside the envelope. What am I missing? Thanks, Alireza On Tuesday, September 2, 2014 10:35:38 AM UTC+2, Craig Taverner wrote: > > Hi, > > I can see two ways in the Java API to do this. One is the 'within' filter > in the GeoPipeline. > > - See example usage in the test code at > - See the implementation using JTS in the code at > > https://github.com/neo4j-contrib/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterWithin.java#L47 > > > And the other is the older, but still functional use of CQL for within > queries: > > - See an example using dynamic layers at > > https://github.com/neo4j-contrib/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java#L138 > > - And the implementation at > > https://github.com/neo4j-contrib/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/filter/SearchCQL.java#L56 > > A direct usage of the SearchCQL class is also possible, but I did not see > a test case for it. It was used by the GeoServer integration though. > > Regards, Craig > > > On Mon, Sep 1, 2014 at 5:15 PM, Alireza Rezaei Mahdiraji < > alire...@gmail.com <javascript:>> wrote: > >> >> Hi All, >> >> I would like to find nodes of the graph which are completely (not >> partially) contained in a given >> Envelope. I tried several GeoPipeline methods but it seems they all >> consider partial containment. >> Any idea? >> >> Thanks, >> Best, >> Alireza >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.