Package org.geotools.geometry.iso.primitive

Examples of org.geotools.geometry.iso.primitive.PointImpl


              LineSegmentImpl seg = new LineSegmentImpl(p1, p2, 0);
              //(LineSegmentImpl)cf.createLineSegment(cf.createPosition(this.forParam(actualParam)),cf.createPosition(this.forParam(actualParam+newSpacing)));

              /* Search maximum of all distances */
              CurveImpl curve = new CurveImpl(seg);
              maxDistance = curve.distance( new PointImpl(segments.get(firstSegment).getStartPoint()) );
              //maxDistance = seg.distance(segments.get(firstSegment).getStartPoint());
              double actDistance = 0;
              for (i=firstSegment; i<lastSegment; i++) {
                actDistance = curve.distance( new PointImpl(segments.get(i).getEndPoint()) );
                //actDistance = seg.distance(segments.get(i).getEndPoint());
                if (actDistance > maxDistance) {
                  maxDistance = actDistance;
                }
              }
View Full Code Here


    if (position instanceof DirectPosition || position instanceof DirectPositionImpl) {
      DirectPositionImpl dp = (DirectPositionImpl) position;
      return dp.equals(obj);
    }
    else if (position instanceof Point || position instanceof PointImpl) {
      PointImpl point = (PointImpl) position;
      return point.equals(obj);
    }
    else {
      return position.equals(obj);
    }
  }
View Full Code Here

  private Point readPointText() throws IOException, ParseException {
    String nextToken = getNextEmptyOrOpener();
    if (nextToken.equals(EMPTY)) {
      return null;
    }
    Point point = new PointImpl(positionFactory.createDirectPosition( this.getPreciseCoordinate().getCoordinates() )); //primitiveFactory.createPoint(this.getPreciseCoordinate().getCoordinates());
    getNextCloser();
    return point;
  }
View Full Code Here

      // if no points, return null
      return null;
    }
    if (inputPts.length == 1) {
      // 1 point: return Point
      return new PointImpl( new DirectPositionImpl(crs, inputPts[0].getCoordinates()) ); //this.geomFactory.getPrimitiveFactory().createPoint(inputPts[0].getCoordinate());
    }
    if (inputPts.length == 2) {
      List<Position> positions = CoordinateArrays.toPositionList(this.crs, this.inputPts);
      LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(positions), 0.0);
      List<CurveSegment> segments = new ArrayList<CurveSegment>();
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.primitive.PointImpl

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.