Search code examples
datastaxdatastax-enterprise

DSE Graph Loader geospatial data


The docs don't provide examples of importing geospatial data (e.g. points) using Graph Loader. Is this possible? For example, I want to load some vertices, each of which has a property coordinates of type Geo.point.


Solution

  • What I figured out is that you can use the WKT, so e.g. for a point property, in JSON:

    // MyVertex.json
    {"name": "foobar", "coordinates": "POINT (45, 45)"}
    

    With a mapping file like this:

    load(myVertexInput).asVertices {
        label "MyVertex"
        key "name"
    }
    

    I think with this example that the coordinates property needs to be defined already in the schema.