use of ogc.schema.opengis.gml.v_2_1_2.PointType in project ddf by codice.
the class TestWfs10JTStoGML200Converter method extractPointMemberTypeCoordinates.
private String extractPointMemberTypeCoordinates(JAXBElement<? extends GeometryAssociationType> jaxbElement1) throws JAXBException, SAXException, IOException, ParseException, NullPointerException {
assertThat(Wfs10Constants.POINT_MEMBER.getLocalPart().equals(jaxbElement1.getName().getLocalPart()), is(Boolean.TRUE));
PointMemberType pointMemberType1 = (PointMemberType) jaxbElement1.getValue();
JAXBElement<? extends AbstractGeometryType> geometry1 = pointMemberType1.getGeometry();
assertThat(Wfs10Constants.POINT.getLocalPart().equals(geometry1.getName().getLocalPart()), is(Boolean.TRUE));
return ((PointType) geometry1.getValue()).getCoordinates().getValue().replaceAll("\n", "").trim();
}
use of ogc.schema.opengis.gml.v_2_1_2.PointType in project ddf by codice.
the class TestWfs10JTStoGML200Converter method testGMLToGeometryCollectionType.
@Test
public void testGMLToGeometryCollectionType() throws JAXBException, SAXException, IOException, ParseException, NullPointerException {
String geometryCollectionGML = Wfs10JTStoGML200Converter.convertGeometryToGML(getGeometryFromWkt(GEOMETRYCOLLECTION));
GeometryCollectionType geometryCollectionType = (GeometryCollectionType) Wfs10JTStoGML200Converter.convertGMLToGeometryType(geometryCollectionGML, Wfs10Constants.GEOMETRY_COLLECTION);
assertFalse(geometryCollectionType == null);
List<JAXBElement<? extends GeometryAssociationType>> geometryMembers = geometryCollectionType.getGeometryMember();
assertThat(CollectionUtils.isEmpty(geometryMembers), is(Boolean.FALSE));
assertThat(geometryMembers.size() == 2, is(Boolean.TRUE));
GeometryAssociationType geometryAssociationType = geometryMembers.get(0).getValue();
JAXBElement<? extends AbstractGeometryType> jaxbElement = geometryAssociationType.getGeometry();
assertThat(Wfs10Constants.POINT.getLocalPart().equals(jaxbElement.getName().getLocalPart()), is(Boolean.TRUE));
PointType pointType = (PointType) jaxbElement.getValue();
assertThat(pointType == null, is(Boolean.FALSE));
assertThat(GEOMETRYCOLLECTION_POINT_COORD.equals(pointType.getCoordinates().getValue().trim()), is(Boolean.TRUE));
GeometryAssociationType geometryAssociationType2 = geometryMembers.get(1).getValue();
JAXBElement<? extends AbstractGeometryType> jaxbElement2 = geometryAssociationType2.getGeometry();
assertThat(Wfs10Constants.LINESTRING.getLocalPart().equals(jaxbElement2.getName().getLocalPart()), is(Boolean.TRUE));
LineStringType lineStringType = (LineStringType) jaxbElement2.getValue();
assertThat(lineStringType == null, is(Boolean.FALSE));
assertThat(GEOMETRYCOLLECTION_LINESTRING_COORD.equals(lineStringType.getCoordinates().getValue().trim()), is(Boolean.TRUE));
}
Aggregations