use of net.opengis.gml.v_3_1_1.LineStringType in project ddf by codice.
the class Wfs20JTStoGML321Converter method convertToRingType.
public static RingType convertToRingType(LinearRing line, String srsName) {
RingType ringType = GML320_OBJECT_FACTORY.createRingType();
CurvePropertyType curvePropertyType = GML320_OBJECT_FACTORY.createCurvePropertyType();
LineStringType curve = convertToLineStringType(line, srsName);
JAXBElement<LineStringType> lineStringTypeJAXBElement = GML320_OBJECT_FACTORY.createLineString(curve);
curvePropertyType.setAbstractCurve(lineStringTypeJAXBElement);
ringType.getCurveMember().add(curvePropertyType);
return ringType;
}
use of net.opengis.gml.v_3_1_1.LineStringType in project ddf by codice.
the class Wfs20JTStoGML321Converter method createGeometryPropertyType.
private static GeometryPropertyType createGeometryPropertyType(Geometry geometry, String srsName) {
final GeometryPropertyType geometryPropertyType = GML320_OBJECT_FACTORY.createGeometryPropertyType();
if (geometry instanceof Point) {
PointType pointType = convertToPointType((Point) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertPointTypeToJAXB(pointType));
} else if (geometry instanceof LineString) {
LineStringType lineStringType = convertToLineStringType((LineString) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertLineStringTypeToJAXB(lineStringType));
} else if (geometry instanceof Polygon) {
PolygonType polygonType = convertToPolygonType((Polygon) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertPolygonTypeToJAXB(polygonType));
} else if (geometry instanceof MultiPoint) {
MultiPointType multiPointType = convertToMultiPointType((MultiPoint) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertMultiPointTypeToJAXB(multiPointType));
} else if (geometry instanceof MultiLineString) {
MultiCurveType multiCurveType = convertToMultiLineStringType((MultiLineString) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertMultiCurveTypeToJAXB(multiCurveType));
} else if (geometry instanceof MultiPolygon) {
MultiSurfaceType multiSurfaceType = convertToMultiSurfaceType((MultiPolygon) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertMultiSurfaceTypeToJAXB(multiSurfaceType));
} else if (geometry instanceof GeometryCollection) {
MultiGeometryType multiGeometryType = convertToMultiGeometryType((GeometryCollection) geometry, srsName);
geometryPropertyType.setAbstractGeometry(convertMultiGeometryTypeToJAXB(multiGeometryType));
} else {
throw new IllegalArgumentException();
}
return geometryPropertyType;
}
use of net.opengis.gml.v_3_1_1.LineStringType in project ddf by codice.
the class Wfs20JTStoGML321Converter method convertGeometryType.
private static LineStringType convertGeometryType(LineString lineString) {
final LineStringType resultLineString = GML320_OBJECT_FACTORY.createLineStringType();
for (DirectPositionType directPosition : convertCoordinates(lineString.getCoordinates())) {
final JAXBElement<DirectPositionType> pos = GML320_OBJECT_FACTORY.createPos(directPosition);
resultLineString.getPosOrPointPropertyOrPointRep().add(pos);
}
return resultLineString;
}
use of net.opengis.gml.v_3_1_1.LineStringType in project ddf by codice.
the class WfsFilterDelegate method createLineString.
private JAXBElement<LineStringType> createLineString(Geometry geometry) {
LineStringType lineStringType = gmlObjectFactory.createLineStringType();
String coordinatesValue = coordinateStrategy.toString(geometry.getCoordinates());
CoordinatesType coordinatesType = gmlObjectFactory.createCoordinatesType();
coordinatesType.setValue(coordinatesValue);
coordinatesType.setDecimal(".");
coordinatesType.setCs(",");
coordinatesType.setTs(" ");
lineStringType.setCoordinates(coordinatesType);
return gmlObjectFactory.createLineString(lineStringType);
}
use of net.opengis.gml.v_3_1_1.LineStringType in project ddf by codice.
the class WfsFilterDelegate method createLineString.
private JAXBElement<LineStringType> createLineString(Geometry geometry) {
LineStringType lineStringType = gml320ObjectFactory.createLineStringType();
lineStringType.setSrsName(GeospatialUtil.EPSG_4326_URN);
lineStringType.setCoordinates(createCoordinates(geometry));
return gml320ObjectFactory.createLineString(lineStringType);
}
Aggregations