How to save polygon data in neo4j and query if a latitude and longitude is within the polygon using Java

51 views
Skip to first unread message

hema

unread,
May 7, 2018, 5:07:01 AM5/7/18
to Neo4j
Hi,


I am very new to neo4j database. Just started trying out neo4j spatial plugin.
Excuse me if my doubts are silly. As it is very new for me facing little difficult to start.


I want to save a list of polygon data to neo4j database and then query with some latitude and longitude to check whether the location is within the polygon.

Link to my question on stackoverflow : https://stackoverflow.com/q/50152029/6756805

Any help is greatly thankful.

Hema

Michael Hunger

unread,
May 7, 2018, 5:12:31 AM5/7/18
to ne...@googlegroups.com
Please check out William Lyons Blog as a great example: http://www.lyonwj.com/2016/08/09/neo4j-spatial-procedures-congressional-boundaries/

Cheers, Michael

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

hema

unread,
May 7, 2018, 8:22:12 AM5/7/18
to Neo4j
Thank you so much, for your response.

Please find the attachements

I want it to be done using Java. I found through some documentation we can do it using GraphRepository and SpatialRepository.

I am trying to do using neo4j-spatial dependency.But i am unable to add GraphRepository and SpatialRepository to my project. 
I have attached pom.xml of my project .Please help me with this issue.


Regards,

Roja V A
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
pom.xml

Michael Hunger

unread,
May 7, 2018, 11:33:44 AM5/7/18
to ne...@googlegroups.com
That was old code in the 4 year old version of Spring Data Neo4j which is no longer maintained.

For now you'll have to use the procedures.

It's also better to go with a Neo4j server.

Michael


To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

hema

unread,
May 8, 2018, 4:16:33 AM5/8/18
to Neo4j
Hi Michael,

Thanks a lot for your time.

Can you please be more clear as  i am very new to neo4j database and i want to explore it more . I am using Spring boot with neo4j.

*Should i remove spring-data-neo4j...?

What are all the dependencies i need for saving polygon wkt data beacause i am messed up with different versions mismatch.

Apologies for asking in brief.
Reply all
Reply to author
Forward
0 new messages