Search in sources :

Example 1 with CoordinateSequenceDimensions

use of org.apache.jena.geosparql.implementation.jts.CoordinateSequenceDimensions in project jena by apache.

the class GMLWriter method write.

public static String write(GeometryWrapper geometryWrapper) {
    Geometry geometry = geometryWrapper.getParsingGeometry();
    CoordinateSequenceDimensions dimensions = geometryWrapper.getCoordinateSequenceDimensions();
    String srsName = geometryWrapper.getSrsURI();
    Element gmlElement = expand(geometry, dimensions, srsName);
    String output = XML_OUTPUT.outputString(gmlElement);
    return output;
}
Also used : Element(org.jdom2.Element) CoordinateSequenceDimensions(org.apache.jena.geosparql.implementation.jts.CoordinateSequenceDimensions)

Example 2 with CoordinateSequenceDimensions

use of org.apache.jena.geosparql.implementation.jts.CoordinateSequenceDimensions in project jena by apache.

the class WKTWriter method write.

public static final String write(GeometryWrapper geometryWrapper) {
    StringBuilder sb = new StringBuilder();
    SRSInfo srsInfo = geometryWrapper.getSrsInfo();
    if (!srsInfo.isWktDefault()) {
        sb.append("<").append(geometryWrapper.getSrsURI()).append("> ");
    }
    Geometry geometry = geometryWrapper.getParsingGeometry();
    CoordinateSequenceDimensions dimensions = geometryWrapper.getCoordinateSequenceDimensions();
    String wktText = expand(geometry, dimensions);
    sb.append(wktText);
    return sb.toString();
}
Also used : Geometry(org.locationtech.jts.geom.Geometry) SRSInfo(org.apache.jena.geosparql.implementation.SRSInfo) CoordinateSequenceDimensions(org.apache.jena.geosparql.implementation.jts.CoordinateSequenceDimensions) MultiLineString(org.locationtech.jts.geom.MultiLineString) LineString(org.locationtech.jts.geom.LineString)

Aggregations

CoordinateSequenceDimensions (org.apache.jena.geosparql.implementation.jts.CoordinateSequenceDimensions)2 SRSInfo (org.apache.jena.geosparql.implementation.SRSInfo)1 Element (org.jdom2.Element)1 Geometry (org.locationtech.jts.geom.Geometry)1 LineString (org.locationtech.jts.geom.LineString)1 MultiLineString (org.locationtech.jts.geom.MultiLineString)1