I can elaborate a little on what Peter says. The DynamicLayer support is
indeed the only way to do what you want right now, but I think it is
actually quite a good fit for your use case. When defining a dynamic layer
you are actually just defining a 'returnable evaluator', which will be
applied to the nodes during the RTree spatial search. This means that the
primary search is spatial, but for each leaf node (geometry) the dynamic
layer query is applied as a filter.
If you use CQL for the query, then all geometries are converted into JTS
geometry classes for the filter (which adds a little overhead, so if the
spatial query is not your limited factor, this can affect performance). If
you use JSON for the query, it is applied directly to the graph as a pattern
match. So JSON should be faster, but does also require that you know the
structure of the graph, which the CQL approach does not.
Peters pointer to the TestDynamicLayers class is the best place to start for
seeing how to use both CQL and JSON filter syntaxes.
On Mon, Aug 29, 2011 at 11:59 AM, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
Hi there,
well, spatial querying is not something that can be easily stuck into an
iterator. If you want more than casual querying, I think you need to use
the
GeoTools APIs, we provide support for CQL as a query lang there, see
https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java#L60for
some examples. Basically, you define a dynamic layer witha CQL query,
which will return the subset of the full layer (e.g. a SimplePointLayer)
that matches that query.
Would that help?
Cheers,
/peter neubauer
GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer
http://www.neo4j.org - Your high performance graph database.
http://startupbootcamp.org/- Ă–resund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
On Mon, Aug 29, 2011 at 1:37 AM, faffi obscurredbyclo...@gmail.com
wrote:
Hey guys,
I'm seeing some kind of disconnect between the spatial and the regular
graph
traversing query. I can't find a way of executing a spatial query like in
SimplePointLayer but also providing something like a ReturnEvaluator.
My use case is essentially for all nodes within a 10km radius, return all
with name foo. Do I actually have to iterate through all the nodes
returned by the query in a list and individually check them?
Thanks,
faffi
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Spatial-query-with-property-filter-tp3291410p3291410.html
Sent from the Neo4j Community Discussions mailing list archive at
Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user