Skip to content

Instantly share code, notes, and snippets.

@datablend
Created January 4, 2012 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save datablend/1559893 to your computer and use it in GitHub Desktop.
Save datablend/1559893 to your computer and use it in GitHub Desktop.
Setup spatial db
// Create the graph db
graphDb = new EmbeddedGraphDatabase("var/geo");
// Wrap it as a spatial db service
spatialDb = new SpatialDatabaseService(graphDb);
// Create the layer to store our spatial data
runningLayer = (EditableLayer) spatialDb.getOrCreateLayer("running", SimplePointEncoder.class, EditableLayerImpl.class, "lon:lat");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment