use of org.openstreetmap.osmosis.pgsimple.common.NodeLocation in project voltdb by VoltDB.
the class WayPolygonGeometryBuilder method createRing.
public LinearRing createRing(Way way) {
List<Point> points = new ArrayList<Point>();
for (WayNode wayNode : way.getWayNodes()) {
NodeLocation nodeLocation;
double longitude;
double latitude;
nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId());
longitude = nodeLocation.getLongitude();
latitude = nodeLocation.getLatitude();
if (nodeLocation.isValid()) {
Point point = new Point(longitude, latitude);
points.add(point);
}
}
return new LinearRing(points.toArray(new Point[0]));
}
Aggregations