Search in sources :

Example 21 with PointType

use of net.opengis.gml.x32.PointType 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

PointType (net.opengis.gml.v_3_1_1.PointType)9 Test (org.junit.Test)7 DistanceBufferType (net.opengis.filter.v_1_1_0.DistanceBufferType)4 MultiPointType (ogc.schema.opengis.gml.v_2_1_2.MultiPointType)4 PointType (ogc.schema.opengis.gml.v_2_1_2.PointType)4 LineString (com.vividsolutions.jts.geom.LineString)3 MultiLineString (com.vividsolutions.jts.geom.MultiLineString)3 JAXBElement (javax.xml.bind.JAXBElement)3 AnyValueType (net.opengis.cat.wrs.v_1_0_2.AnyValueType)3 DirectPositionType (net.opengis.gml.v_3_1_1.DirectPositionType)3 PointType (net.opengis.gml.v_3_2_1.PointType)3 Query (ddf.catalog.operation.Query)2 QueryImpl (ddf.catalog.operation.impl.QueryImpl)2 QueryRequestImpl (ddf.catalog.operation.impl.QueryRequestImpl)2 ArrayList (java.util.ArrayList)2 Map (java.util.Map)2 ValueListType (net.opengis.cat.wrs.v_1_0_2.ValueListType)2 FilterType (net.opengis.filter.v_1_1_0.FilterType)2 EnvelopeType (net.opengis.gml.v_3_1_1.EnvelopeType)2 MultiPointType (net.opengis.gml.v_3_2_1.MultiPointType)2