use of net.opengis.gml.x32.DomainSetType in project arctic-sea by 52North.
the class AbstractMultiPointCoverageTypeEncoder method encodeMultiPointDomain.
private void encodeMultiPointDomain(DiscreteCoverageType dct, PointValueLists pointValues) throws EncodingException {
MultiPointDomainDocument mpdd = MultiPointDomainDocument.Factory.newInstance();
DomainSetType mpdst = mpdd.addNewMultiPointDomain();
GeometryFactory factory = pointValues.getPoints().get(0).getFactory();
MultiPoint multiPoint = factory.createMultiPoint(pointValues.getPoints().toArray(new Point[0]));
EncodingContext ec = EncodingContext.of(XmlBeansEncodingFlags.GMLID, JavaHelper.generateID(multiPoint.toString())).with(XmlBeansEncodingFlags.PROPERTY_TYPE, true);
XmlObject encodedGeometry = encodeGML(multiPoint, ec);
mpdst.addNewAbstractGeometry().set(encodedGeometry);
substitute(mpdst.getAbstractGeometry(), encodedGeometry);
dct.setDomainSet(mpdst);
}
Aggregations