cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Import lat/lng from CSV to point

eric1
Node Link

I have a CSV file with 2 columns, 1 with latitude and 1 with longitude. I want to create a node with a point type property using the Cypher LOAD CSV command. How do I structure the script?

Thanks

2 REPLIES 2

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:/path/nameOfCSV.csv" as line
MERGE (o:Object { location: point({latitude:toFloat(line.lat), longitude:toFloat(line.lon), crs:'WGS-84'})})
RETURN o

How to do with the neo4j-admin import tool?