Search in sources :

Example 1 with CompoundCurveRing

use of ch.interlis.iom_j.itf.impl.jtsext.geom.CompoundCurveRing in project ili2db by claeis.

the class Iox2fgdb method asOneLine.

private LineString asOneLine(LineString polyline) {
    if (!(polyline instanceof CompoundCurveRing)) {
        return polyline;
    }
    ArrayList<CurveSegment> segments = new ArrayList<CurveSegment>();
    for (CompoundCurve curve : ((CompoundCurveRing) polyline).getLines()) {
        segments.addAll(curve.getSegments());
    }
    CompoundCurve line = new CompoundCurve(segments, polyline.getFactory());
    return line;
}
Also used : CurveSegment(ch.interlis.iom_j.itf.impl.jtsext.geom.CurveSegment) CompoundCurve(ch.interlis.iom_j.itf.impl.jtsext.geom.CompoundCurve) ArrayList(java.util.ArrayList) CompoundCurveRing(ch.interlis.iom_j.itf.impl.jtsext.geom.CompoundCurveRing)

Aggregations

CompoundCurve (ch.interlis.iom_j.itf.impl.jtsext.geom.CompoundCurve)1 CompoundCurveRing (ch.interlis.iom_j.itf.impl.jtsext.geom.CompoundCurveRing)1 CurveSegment (ch.interlis.iom_j.itf.impl.jtsext.geom.CurveSegment)1 ArrayList (java.util.ArrayList)1