Package org.opengis.geometry.coordinate

Examples of org.opengis.geometry.coordinate.Position


        return false;
   
    ListIterator<Position> e1 = listIterator();
    ListIterator e2 = ((List) obj).listIterator();
    while(e1.hasNext() && e2.hasNext()) {
        Position o1 = e1.next();
        Object o2 = e2.next();
        if (!(o1==null ? o2==null : o1.equals(o2)))
      return false;
    }
    if (!(!(e1.hasNext() || e2.hasNext())))
      return false;
    if (getClass() != obj.getClass())
View Full Code Here


    List<Position> dpList = new LinkedList<Position>();

    for (int i = 0; i < this.pts.size(); i++) {
      double[] doubleCoords = ((Coordinate) this.pts.get(i))
          .getCoordinates();
      Position dp = new PositionImpl( new DirectPositionImpl(crs, doubleCoords) );
      dpList.add(dp);
    }
   
    // Create List of CurveSegment´s (LineString´s)
    LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(
View Full Code Here

    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;
    }
    Position p1 = cs0.getEndPosition();

    Point pt0 = toPoint( p0 );
    Point pt1 = toPoint( p1 );
    if (pt0 == null) {
      DirectPositionImpl copy = new DirectPositionImpl(p0.getDirectPosition());
      pt0 = new PointImpl(copy);
      //pt0 = this.getFeatGeometryFactory().getPrimitiveFactory().createPoint(p0);
    }
    if (pt1 == null) {
      DirectPositionImpl copy = new DirectPositionImpl(p1.getDirectPosition());
      pt1 = new PointImpl(copy);
      //pt1 = this.getFeatGeometryFactory().getPrimitiveFactory().createPoint(p1);
    }
    // Calculate and Set Boundary
    this.boundary = this.calculateBoundary(pt0, pt1);
View Full Code Here

//                /*if (dp == null) {
//                    dp = p.getIndirect().getDirectPosition();
//                }*/
//                list.add(dp);
//            }
            Position position = (Position) it.next();
            DirectPosition directPosition = position.getDirectPosition();
            list.add(directPosition);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.opengis.geometry.coordinate.Position

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.