Hi Jenny,

yes, it's tricky, getting all pieces together to have a working database with spatial. But it can be done.

Question is, do you want to create the app by coding everything from the ground up (which is fun, and you learn a lot about spatial/Neo4j), or do you want to get a working web/mobile app as quick as possible? If option one, I and the Neo4j community can help you by answering your questions. If option two, you might have a look at our framework Structr (http://structr.org, https://github.com/structr/structr). It has a built-in distance search based on Neo4j Spatial, and we can support you creating a web app, or a RESTful backend for mobile apps (or both).

BTW, in which language do plan to code your app?

Cheers,
Axel

Am 31.03.2014 22:06, schrieb Jenny Pettersson:
Hi!

Trying to build a social network app with Neo4j 2.0 but unfortunately the spatial plugin is giving me a hard time. It's difficult to find documentation/samples and my trial and error approach is rather frustrating and time consuming so I would really appreciate clarification to a couple of questions a lot!

A short simplified description of my domain is that I have Places and Users which both have the properties lat and lon. I have managed to add a simple point layer and a spatial index geom to my db. Then I have created user and place nodes and added them to the index and after that to the point layer. Using the web interface the nodes and relationships look correct but I am having problems quering and updating the data:

1. My most common use case is that I want to return nearby users and places from a users given position. Using cypher and the withinDistance query START n=node:geom('withinDistance:[60.0, 15.0, 100.0]') RETURN n; I am only able to get the nearest node even though there are multiple nodes situated within the given distance. Have I misunderstood that withinDistance should return all nodes within the given distance ordered by distance? Is there any way to return the distance metric too? I really would like to tell UserA that UserB is only 200 metres away.

2. Another thing is that I would like to differentiate between the node type User and Place, is it possible to filter the withinDistance query just to return my Users för example?

3. My users location will be updated every 10 minutes or so. When I tried to only update the User nodes lat and lon property I get a "NotFoundException: NODE[28] has no property with propertyKey=\"bbox\"."}System.Exception {Neo4jClient.NeoException} the next time I execute the withinDistance query. What is the correct way to update a location, should I remove the node from the point layer and add it again if the lat and lon change and how do I do that, the manual at http://neo4j.github.io/spatial/ which I have been following only tells how to add a node to a layer.

4. Another thing I would like to do is set the nearest City for every logged in User. Is there any way to get the nearest Place from a given point without specify a distance?

Many thanks,
Jenny.

--
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 <mailto:neo4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.


--

Axel Morgner
CEO Structr (c/o Morgner UG) · Hanauer Landstr. 291a · 60314 Frankfurt · Germany
Twitter: @amorgner <https://twitter.com/amorgner>
Phone: +49 151 40522060
Skype: axel.morgner

Structr <http://structr.org> - Award-Winning Open Source CMS and Web Framework based on Neo4j Structr Mailing List and Forum <https://groups.google.com/forum/#%21forum/structr> Graph Database Usergroup "graphdb-frankfurt" <http://www.meetup.com/graphdb-frankfurt>

--
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.

Reply via email to