/** * @inheritDoc * @see org.opengis.geometry.coordinate.GenericCurve#getEndPoint() */ public final DirectPosition getEndPoint() { return ((CurveSegment) curveSegments.get(curveSegments.size()-1)).getEndPoint(); }
/** * {@inheritDoc } */ @Override public final DirectPosition getEndPoint() { return (curveSegments.get(curveSegments.size() - 1)).getEndPoint(); }
/** * @inheritDoc * @see org.opengis.geometry.coordinate.GenericCurve#getEndPoint() */ public final DirectPosition getEndPoint() { return ((CurveSegment) curveSegments.get(curveSegments.size()-1)).getEndPoint(); }
/** * The operations "endPoint" shall return the DirectPositions of the last * point, respectively on the GenericCurve. This differs from the boundary * operator in Primitive, since it returns only the values of these two * points, not representative objects. GenericCurve::startPoint() : * DirectPosition2D * * @return an <code>DirectPosition2D</code> value */ /* * (non-Javadoc) * * @see org.opengis.geometry.coordinate.GenericCurve#getEndPoint() */ public DirectPosition getEndPoint() { /* Return End Point of last CurveSegment */ return this.curveSegments.get(this.curveSegments.size() - 1) .getEndPoint(); }
rList.add( tSegment.getEndPoint());
/** * Returns the DirectPositions which define the control points of this Curve * * @return */ public List<DirectPosition> asDirectPositions() { List<DirectPosition> rList = new ArrayList<DirectPosition>(); CurveSegment tSegment = null; // Iterate all CurveSegments (= LineStrings) for (int i = 0; i < this.curveSegments.size(); i++) { tSegment = this.curveSegments.get(i); // TODO: This version only handles the CurveSegment type LineString LineStringImpl tLineString = (LineStringImpl) tSegment; Iterator<LineSegment> tLineSegmentIter = tLineString .asLineSegments().iterator(); while (tLineSegmentIter.hasNext()) { LineSegment tLineSegment = tLineSegmentIter.next(); // Add new Coordinate, which is the start point of the actual // LineSegment rList.add( tLineSegment.getStartPoint().getPosition() ); } } // Add new Coordinate, which is the end point of the last curveSegment rList.add( tSegment.getEndPoint() ); return rList; }
public final DirectPosition forConstructiveParam(double cp) { int n = curveSegments.size(); int i = (int) cp; if (i < 0) { i = 0; } else if (i > n) { i = n; } if (i == n) { return ((CurveSegment) curveSegments.get(n-1)).getEndPoint(); } else { CurveSegment cs = (CurveSegment) curveSegments.get(i); double d = cp - i; // 0 <= d < 1 return cs.forConstructiveParam( (1-d) * cs.getStartConstructiveParam() + d * cs.getEndConstructiveParam()); } }
@Override public final DirectPosition forConstructiveParam(final double cp) { int n = curveSegments.size(); int i = (int) cp; if (i < 0) { i = 0; } else if (i > n) { i = n; } if (i == n) { return (curveSegments.get(n - 1)).getEndPoint(); } else { CurveSegment cs = curveSegments.get(i); double d = cp - i; // 0 <= d < 1 return cs.forConstructiveParam( (1-d) * cs.getStartConstructiveParam() + d * cs.getEndConstructiveParam()); } }
public final DirectPosition forConstructiveParam(double cp) { int n = curveSegments.size(); int i = (int) cp; if (i < 0) { i = 0; } else if (i > n) { i = n; } if (i == n) { return ((CurveSegment) curveSegments.get(n-1)).getEndPoint(); } else { CurveSegment cs = (CurveSegment) curveSegments.get(i); double d = cp - i; // 0 <= d < 1 return cs.forConstructiveParam( (1-d) * cs.getStartConstructiveParam() + d * cs.getEndConstructiveParam()); } }