Your geographic information model, exported to valid GeoJSON
A GeoFeature describes a container of layers. Each of these layers may contain a set of geographic elements.
- Building a linestring
GeoFeature[] parsePath(Node[] path){
//Generate GeoJson objects
GeoFeature pathLayer = new GeoFeature();
GeoPolyline path = new GeoPolyline();
for (Node node : path) {
float lat = node.getLat();
float lng = node.getLng();
path.addCoordinate(lat, lng);
}
pathLayer.setGeometry(path);
return new GeoFeature[]{pathLayer};
}
-
jackson-core-asl
-
jackson-mapper-asl
For more information visit: www.geojson.com.ar