use of org.geotoolkit.gml.xml.LineString in project geotoolkit by Geomatys.
the class OMUtils method buildSamplingCurve.
public static SamplingFeature buildSamplingCurve(final String identifier, final List<DirectPosition> positions) {
final LineString geom = SOSXmlFactory.buildLineString("2.0.0", null, "EPSG:4326", positions);
final SamplingFeature sp = SOSXmlFactory.buildSamplingCurve("2.0.0", identifier, null, null, null, geom, null, null, null);
return sp;
}
use of org.geotoolkit.gml.xml.LineString 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