Search in sources :

Example 1 with PointPropertyType

use of net.opengis.gml.x32.PointPropertyType in project arctic-sea by 52North.

the class PointPropertyTypeEncoder method encode.

@Override
public PointPropertyType encode(Point point, EncodingContext ec) throws EncodingException {
    PointPropertyType ppt = PointPropertyType.Factory.newInstance();
    ppt.setPoint(encodePointType(point, ec));
    return ppt;
}
Also used : PointPropertyType(net.opengis.gml.x32.PointPropertyType)

Example 2 with PointPropertyType

use of net.opengis.gml.x32.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(com.vividsolutions.jts.geom.Point) MultiPoint(com.vividsolutions.jts.geom.MultiPoint) PointPropertyType(net.opengis.gml.v_3_2_1.PointPropertyType) MultiPointType(net.opengis.gml.v_3_2_1.MultiPointType) Point(com.vividsolutions.jts.geom.Point) MultiPoint(com.vividsolutions.jts.geom.MultiPoint)

Example 3 with PointPropertyType

use of net.opengis.gml.x32.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 (net.opengis.gml.x32.PointPropertyType)2 MultiPoint (com.vividsolutions.jts.geom.MultiPoint)1 Point (com.vividsolutions.jts.geom.Point)1 MultiPointType (net.opengis.gml.v_3_2_1.MultiPointType)1 PointPropertyType (net.opengis.gml.v_3_2_1.PointPropertyType)1