Package org.geotools.geometry.iso.coordinate

Examples of org.geotools.geometry.iso.coordinate.CurveSegmentImpl


    // test split (split seems broken)
    //curve.split(5);
   
    // test getSegmentAt
    CurveSegmentImpl segmentAt = curve.getSegmentAt(1);
    assertTrue(segmentAt.equals(curve.asLineSegments().get(0)));
   
    // test getParamForPoint (not fully implemented yet)
    //ParamForPoint paramForPoint = curve.getParamForPoint(positionA);
    //System.out.println(paramForPoint);
   
View Full Code Here


    // set the segment
    this.curveSegments = (List<CurveSegment>) segments;

    // set the curve envelope
    Iterator<? extends CurveSegment> it = segments.iterator();
    CurveSegmentImpl cs0 = (CurveSegmentImpl) it.next();
    cs0.setCurve(this);
    this.envelope = new EnvelopeImpl(cs0.getEnvelope());

    Position p0 = cs0.getStartPosition();

    // Änderung durch Sanjay, da in bisheriger Version nicht der Fall
    // berücksichtigt wurde, dass nur 1 CurveSegment existiert
    CurveSegmentImpl cs1 = null;
    while (it.hasNext()) {
      cs1 = (CurveSegmentImpl) it.next();
      // set the segment / curve association
      cs1.setCurve(this);
      // expand the curve envelope
      this.envelope.expand(cs1.getEnvelope());
      if (!cs0.getEndPoint().equals(cs1.getStartPoint())) {
        throw new IllegalArgumentException(
            "Curvesegments are not continuous. Following curve segments are disjoint:" //$NON-NLS-1$
                + cs0 + " and " + cs1); //$NON-NLS-1$
      }
      cs0 = cs1;
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.coordinate.CurveSegmentImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.