Skip to content

Instantly share code, notes, and snippets.

@datablend
Created January 4, 2012 13:02
Show Gist options
  • Save datablend/1559954 to your computer and use it in GitHub Desktop.
Save datablend/1559954 to your computer and use it in GitHub Desktop.
Create coordinates
// Create a new coordinate for this point
Coordinate to = new Coordinate(track.getTrkpt(i).getLon().doubleValue(),track.getTrkpt(i).getLat().doubleValue());
// Add the new coordinate
torecord = runningLayer.add(runningLayer.getGeometryFactory().createPoint(to));
// Set the data accordingly
torecord.setProperty("speed", analyzer.getHorizontalSpeed(track.getTrkpt(i).getTime()));
torecord.setProperty("occurences", 1);
// Add relationship
Relationship next = fromrecord.getGeomNode().createRelationshipTo(torecord.getGeomNode(), RelTypes.NEXT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment