use of net.opengis.gml.v_3_1_1.PolygonPropertyType in project ddf by codice.
the class WfsFilterDelegate method createMultiPolygon.
private JAXBElement<MultiPolygonType> createMultiPolygon(Geometry geometry) {
MultiPolygonType multiPolygon = new MultiPolygonType();
if (geometry.getNumGeometries() > 0) {
List<PolygonPropertyType> geometryMembers = multiPolygon.getPolygonMember();
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry currentGeo = geometry.getGeometryN(i);
PolygonType currentPolygon = createPolygon(currentGeo.getCoordinates());
PolygonPropertyType member = new PolygonPropertyType();
member.setPolygon(currentPolygon);
geometryMembers.add(member);
}
return gmlObjectFactory.createMultiPolygon(multiPolygon);
} else {
throw new IllegalArgumentException("Unable to parse Polygon coordinates from WKT String");
}
}
Aggregations