Search in sources :

Example 6 with PointPropertyType

use of org.geotoolkit.gml.xml.v321.PointPropertyType in project ddf by codice.

the class Wfs20JTStoGML321Converter method convertToMultiPointType.

public static MultiPointType convertToMultiPointType(MultiPoint multiPoint, String srsName) {
    MultiPointType multiPointType = GML320_OBJECT_FACTORY.createMultiPointType();
    for (int i = 0; i < multiPoint.getNumGeometries(); i++) {
        Point point = (Point) multiPoint.getGeometryN(i);
        PointPropertyType pointPropertyType = GML320_OBJECT_FACTORY.createPointPropertyType();
        pointPropertyType.setPoint(convertToPointType(point, srsName));
        multiPointType.getPointMember().add(pointPropertyType);
    }
    multiPointType.setSrsName(srsName);
    return multiPointType;
}
Also used : Point(org.locationtech.jts.geom.Point) MultiPoint(org.locationtech.jts.geom.MultiPoint) PointPropertyType(net.opengis.gml.v_3_2_1.PointPropertyType) MultiPointType(net.opengis.gml.v_3_2_1.MultiPointType) Point(org.locationtech.jts.geom.Point) MultiPoint(org.locationtech.jts.geom.MultiPoint)

Example 7 with PointPropertyType

use of org.geotoolkit.gml.xml.v321.PointPropertyType in project arctic-sea by 52North.

the class AbstractCVDiscretePointCoverageTypeEncoder method encodeGeometry.

/**
 * Encode {@link Point} to {@link PointPropertyType}
 *
 * @param point
 *            The {@link Point} to encode
 * @param gmlId
 *            The gml id for the point
 * @return The encoded {@link Point}
 * @throws UnsupportedEncoderInputException
 *             If an element can not be encoded
 * @throws EncodingException
 *             If an error occurs
 */
private PointPropertyType encodeGeometry(Point point, String gmlId) throws EncodingException {
    PointPropertyType ppt = PointPropertyType.Factory.newInstance(getXmlOptions());
    ppt.setPoint((PointType) encodeGML(point, EncodingContext.of(XmlBeansEncodingFlags.GMLID, gmlId)));
    return ppt;
}
Also used : PointPropertyType(net.opengis.gml.x32.PointPropertyType)

Aggregations

PointPropertyType (org.geotoolkit.gml.xml.v321.PointPropertyType)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 PointPropertyType (net.opengis.gml.x32.PointPropertyType)2 AbstractGeometry (org.geotoolkit.gml.xml.AbstractGeometry)2 AbstractSurface (org.geotoolkit.gml.xml.AbstractSurface)2 CurveProperty (org.geotoolkit.gml.xml.CurveProperty)2 MultiCurve (org.geotoolkit.gml.xml.MultiCurve)2 MultiSurface (org.geotoolkit.gml.xml.MultiSurface)2 SurfaceProperty (org.geotoolkit.gml.xml.SurfaceProperty)2 ArcByCenterPointType (org.geotoolkit.gml.xml.v321.ArcByCenterPointType)2 PointType (org.geotoolkit.gml.xml.v321.PointType)2 Coordinate (org.locationtech.jts.geom.Coordinate)2 Geometry (org.locationtech.jts.geom.Geometry)2 DirectPosition (org.opengis.geometry.DirectPosition)2 AbstractMap (java.util.AbstractMap)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1