Open nvtin opened 6 years ago
There are a few ways you might be able to accomplish this.
new ABC(lang_long: [56.7, 12.78, 'wgs-84'])
@thefliik Thanks for your reply. I have stored it as string to resolve this issue.. But I will back to find a good solution to store it with Point type. Thanks so much.
@nvtin Have you found a solution to save latitude and longitude as point type? I've been trying to define custom converters for point
type, but I did not make it. Have you got any idea about how to do this?
@iloveivyxuan Not yet. I have stored it as string and leave it until now.
Hey guys, I want to store location with latitude and longitude is a point type on Database to use spatial functions to get the distance between location. https://neo4j.com/docs/developer-manual/current/cypher/functions/spatial/#functions-distance
I know I can store latitude, longitude on model as String type like below code:
But for some reason, we want to store 2 that properties in one field called location with Point type. Maybe it look like on this article https://medium.com/neo4j/whats-new-in-neo4j-spatial-features-586d69cda8d0 So the location should be like this:
point({longitude: 56.7, latitude: 12.78, crs: 'wgs-84'})
I have tried to google but I have not found solution to do that or it might have not support by neo4j yet. Any one know about this, can you help me?
Runtime information:
Neo4j database version:
neo4j
gem version: 9.3.0neo4j-core
gem version: 8.1.4Ruby
gem version : 2.5.1Rails
gem version: 5.2.0