I didn't know that. Then, how can I create a spatial index using REST API?
--
Sent using a cell-phone, so sorry for the typos and wrong auto-corrections.
--
I see, maybe I was misunderstanding the concept behind. Then, if a
node isn't on a SpatialIndex, can't be spatially queried, isn't? I
think this is a bit different than other systems work. So, if I
already have nodes with properties that represent coordinates, there
is no way to get the distance between.
What about SRID and projection systems?
Can I put all nodes with spatial information in the same spatial index
and do any kind of queries with them, like distance, or which ones of
them are inside this area defined in this another node?
Sorry for all the questions, but I am thinking about applications in
archaeology.
Node n = (Node)result.iterator().next().values().iterator().next();
for(Map<String,Object> row:result) {for(String column: row.keySet()){Node value = (Node)row.get(column);System.out.println("\t"+column+":\t"+value);}}
// Search for nearby locations |
Coordinate myPosition = new Coordinate(13.76, 55.56); |
List<SpatialDatabaseRecord> results = |
layer.findClosestPointsTo(myPosition, 10.0); |
Craig,
We're new to Neo4j-spatial and have been trying to determine how to chain a distance query on the spatial layer with a secondary filter on the base nodes in our graph. The goal is to run one query to get the number of office locations within a provided distance, and within that result set from the spatial layer, additionally filter on both office properties(type of office) and relationships(provides a service) on the base node graph. I've seen this discussed in a few places but we have not been able to figure out the syntax. Starting with this Java query that was posted, could you advise on how to expand this and chain the result set of the spatial nodes query down to the underlying nodes that have the relationships we need to filter on?
ExecutionResult result = engine.execute("start n=node:layer3('withinDistance:[44.44, 33.32, 5.0]') return n");
Thank you.
Bob
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group, send email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
W
|
e are trying to use the Traversal API to retrieve, for a given set of company nodes, only the company nodes that provide all the products that are contained in the product Nodes list. In this example: Company 1 provides product A and B -> Company 2 provides product A and B and C -> Company 3 provides product A and C If all 3 companies are included in company list query, and product A and C are in product list in query, we would want returned only Company 2 and 3 since they provide product A and C. Here is our query:
If we use the Evaluator.includeWhereEndNodeIs(productNodes) we get back all the companies that provide ANY of the products in the productNodes list(all 3 companies in above example). If we use the Evaluators.includeIfContainsAll(productNodes) evaluator, we don't get any company nodes back if there is more than one product in the product nodes list. We were looking at the BiDirectionalTraversal approach but have not been able to get that working either. Any suggestions appreciated. |