use of com.vividsolutions.jts.geom.MultiPoint 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;
}
use of com.vividsolutions.jts.geom.MultiPoint in project ddf by codice.
the class TestWfs10JTStoGML200Converter method testGeometryToMultiPointGML.
@Test
public void testGeometryToMultiPointGML() throws JAXBException, SAXException, IOException, ParseException, NullPointerException {
MultiPoint multiPoint = (MultiPoint) getGeometryFromWkt(MULTIPOINT);
assertThat(multiPoint == null, is(Boolean.FALSE));
String multiPointGML = Wfs10JTStoGML200Converter.convertGeometryToGML(multiPoint).replaceAll("\n", "");
assertThat(StringUtils.isEmpty(multiPointGML), is(Boolean.FALSE));
Diff diff = XMLUnit.compareXML(multiPointGML, MULTIPOINT_GML);
assertTrue(XMLUNIT_IDENTICAL, diff.identical());
assertTrue(XMLUNIT_SIMILAR, diff.similar());
}
Aggregations