use of org.geotoolkit.gml.xml.Polygon in project geotoolkit by Geomatys.
the class GeoSpatialBound method extractBoundary.
private void extractBoundary(final AbstractGeometry geom) {
if (geom instanceof Point) {
final Point p = (Point) geom;
if (p.getPos() != null) {
addXCoordinate(p.getPos().getOrdinate(0));
addYCoordinate(p.getPos().getOrdinate(1));
}
} else if (geom instanceof LineString) {
final LineString ls = (LineString) geom;
final Envelope env = ls.getBounds();
if (env != null) {
addXCoordinate(env.getMinimum(0));
addXCoordinate(env.getMaximum(0));
addYCoordinate(env.getMinimum(1));
addYCoordinate(env.getMaximum(1));
}
} else if (geom instanceof Polygon) {
final Polygon p = (Polygon) geom;
AbstractRing ext = p.getExterior().getAbstractRing();
// TODO
}
}
Aggregations