0
votes

Im using the last version of datastax dse graph. I need to load geo point from text file into the graph.

Is it ok to write POINT(12.3 34.5) for geo point in the text data file?

or POINT(X,Y)? or Geo.point(x,y)?

2

2 Answers

0
votes

There is an example in the documentation that shows how to load geo data - https://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/reference/refDSEGraphDataTypes.html?hl=graph,geo,data

graph.addVertex(label,'author','name','Jamie Oliver','gender','M','point',Geo.point(1,2))
0
votes

you can convert the longitude and latitude values into a Point using a transform with DSE GraphLoader (https://docs.datastax.com/en/datastax_enterprise/latest/datastax_enterprise/graph/dgl/dglTransform.html)

geoPointInput = geoPointInput.transform { it['location'] = new com.datastax.driver.dse.geometry.Point(Double.parseDouble(it['longitude']),Double.parseDouble(it['latitude'])); it }