Search in sources :

Example 26 with JTSLineString

use of org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSLineString in project geotoolkit by Geomatys.

the class CurveLineAdapter method unmarshal.

@Override
public OrientableCurve unmarshal(final CurveLineAdapter v) throws Exception {
    if (v != null && v.lineString != null && v.lineString.getValue() != null) {
        LineStringPosListType posList = (LineStringPosListType) v.lineString.getValue();
        JTSLineString line = posList.getJTSLineString();
        JTSCurve curve = new JTSCurve(null);
        curve.getSegments().add(line);
        return curve;
    }
    return null;
}
Also used : JTSCurve(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.primitive.JTSCurve) JTSLineString(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSLineString)

Aggregations

JTSLineString (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSLineString)26 GeneralDirectPosition (org.apache.sis.geometry.GeneralDirectPosition)23 JTSCurve (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.primitive.JTSCurve)23 DirectPosition (org.opengis.geometry.DirectPosition)19 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)17 JTSRing (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.primitive.JTSRing)14 JTSPolygon (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPolygon)12 Ring (org.opengis.geometry.primitive.Ring)12 JTSSurfaceBoundary (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.primitive.JTSSurfaceBoundary)10 StringReader (java.io.StringReader)8 StringWriter (java.io.StringWriter)8 JTSPolyhedralSurface (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.primitive.JTSPolyhedralSurface)5 CurveSegment (org.opengis.geometry.primitive.CurveSegment)5 ArrayList (java.util.ArrayList)4 JTSMultiCurve (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.aggregate.JTSMultiCurve)4 PointArray (org.opengis.geometry.coordinate.PointArray)4 Position (org.opengis.geometry.coordinate.Position)4 JAXBElement (javax.xml.bind.JAXBElement)3 JTSMultiPrimitive (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.aggregate.JTSMultiPrimitive)3 Primitive (org.opengis.geometry.primitive.Primitive)3