Search in sources :

Example 6 with MultiPoint

use of org.locationtech.jts.geom.MultiPoint in project arctic-sea by 52North.

the class GmlEncoderv321 method createMultiPointFromJtsGeometry.

private void createMultiPointFromJtsGeometry(MultiPoint geom, MultiPointType xbMultiPoint, String id) throws EncodingException {
    for (int i = 0; i < geom.getNumGeometries(); i++) {
        Geometry geometry = geom.getGeometryN(i);
        if (geometry instanceof Point) {
            PointType pt = xbMultiPoint.addNewPointMember().addNewPoint();
            pt.setId(id + "_" + i);
            createPointFromJtsGeometry((Point) geometry, pt);
        }
    }
}
Also used : EnvelopeOrGeometry(org.n52.shetland.util.EnvelopeOrGeometry) Geometry(org.locationtech.jts.geom.Geometry) AbstractGeometry(org.n52.shetland.ogc.gml.AbstractGeometry) MultiPointType(net.opengis.gml.x32.MultiPointType) PointType(net.opengis.gml.x32.PointType) MultiPoint(org.locationtech.jts.geom.MultiPoint) Point(org.locationtech.jts.geom.Point) MultiPoint(org.locationtech.jts.geom.MultiPoint) Point(org.locationtech.jts.geom.Point)

Aggregations

MultiPoint (org.locationtech.jts.geom.MultiPoint)6 Point (org.locationtech.jts.geom.Point)4 MultiPointType (net.opengis.gml.x32.MultiPointType)2 PointType (net.opengis.gml.x32.PointType)2 Geometry (org.locationtech.jts.geom.Geometry)2 AbstractGeometry (org.n52.shetland.ogc.gml.AbstractGeometry)2 EnvelopeOrGeometry (org.n52.shetland.util.EnvelopeOrGeometry)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 CurvePropertyType (net.opengis.gml.x32.CurvePropertyType)1 DomainSetType (net.opengis.gml.x32.DomainSetType)1 GeometryPropertyType (net.opengis.gml.x32.GeometryPropertyType)1 LineStringDocument (net.opengis.gml.x32.LineStringDocument)1 LineStringType (net.opengis.gml.x32.LineStringType)1 MultiCurveDocument (net.opengis.gml.x32.MultiCurveDocument)1 MultiCurveType (net.opengis.gml.x32.MultiCurveType)1 MultiPointDocument (net.opengis.gml.x32.MultiPointDocument)1 MultiPointDomainDocument (net.opengis.gml.x32.MultiPointDomainDocument)1 PointDocument (net.opengis.gml.x32.PointDocument)1 PolygonDocument (net.opengis.gml.x32.PolygonDocument)1