I have csv files with latitude and longitude data.

I load the place tables.

USING PERIODIC COMMIT

LOAD CSV WITH HEADERS FROM "file:/place.csv" AS row

Create (g :GeoCoordinates {latitude: row.Latitude, 
longitude: row.Longitude, postalCode: row.zip})

Then I want to link with event tables.


USING PERIODIC COMMIT

LOAD CSV WITH HEADERS FROM "file:/event.csv" AS row

Match (g :GeoCoordinates {latitude: row.Latitude, longitude: row.Longitude, 
postalCode: row.zip})

Create (e :Event)-[r :location]->(g)


But I got problem from precision.

For example, assume a latitude is -75.0715026855469

and it become -75.07150269 in GeoCoordinates node.


Then I got nothing because  -75.0715026855469 and -75.07150269 not match


I try the following approach


USING PERIODIC COMMIT

LOAD CSV WITH HEADERS FROM "file:/place.csv" AS row

Create (g :GeoCoordinates {latitude: *toFloat*(row.Latitude), longitude: 
*toFloat*(row.Longitude), postalCode: row.zip})

USING PERIODIC COMMIT

LOAD CSV WITH HEADERS FROM "file:/event.csv" AS row

Match (g :GeoCoordinates {latitude: *toFloat*(row.Latitude), longitude: 
*toFloat*(row.Longitude), postalCode: row.zip})

Create (e :Event)-[r :location]->(g)


Still not work.

How to fix this?


Thanks



Joseph

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