use of org.openforis.idm.model.Coordinate in project collect by openforis.
the class GeoToolsCoordinateOperations method convertTo.
public Coordinate convertTo(Coordinate coordinate, String toSrsId) {
if (toSrsId.equals(coordinate.getSrsId())) {
return coordinate;
} else {
Position position = toPosition(coordinate.getX(), coordinate.getY(), coordinate.getSrsId(), toSrsId);
DirectPosition directPosition = position.getDirectPosition();
return new Coordinate(directPosition.getOrdinate(0), directPosition.getOrdinate(1), toSrsId);
}
}
Aggregations