Package org.geotools.geometry.iso.coordinate

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


   *            the node to test
   */
  private void filterCoveredNodeToPoint(Node n) {
    Coordinate coord = n.getCoordinate();
    if (!op.isCoveredByLA(coord)) {
      PointImpl pt = new PointImpl(new DirectPositionImpl(crs, coord.getCoordinates()));
      //PointImpl pt = primitiveFactory.createPoint(coord.getCoordinates());
      resultPointList.add(pt);
    }
  }
View Full Code Here


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

    for (int i = 0; i < this.pts.size(); i++) {
      double[] doubleCoords = ((Coordinate) this.pts.get(i))
          .getCoordinates();
      DirectPositionImpl dp = new DirectPositionImpl(crs, doubleCoords);
      dpList.add(dp);
    }
   
    // See if the Ring is counterclockwise oriented
    this.isHole = this.cga.isCCW(dpList);   
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

   *
   * @param crs
   */
  public CentroidPoint(CoordinateReferenceSystem crs) {
    this.crs = crs;
    this.centSum = new DirectPositionImpl(crs); //this.factory.getGeometryFactoryImpl().createDirectPosition();
  }
View Full Code Here

   *
   * @param crs
   */
  public CentroidLine(CoordinateReferenceSystem crs) {
    this.crs = crs;
    this.centSum = new DirectPositionImpl(crs); //this.factory.getGeometryFactoryImpl().createDirectPosition();
  }
View Full Code Here

   * @param pts
   *            an array of {@link Coordinate}s
   */
  public void addPointSequence(List<DirectPosition> pts) {
   
    DirectPositionImpl dpAct = new DirectPositionImpl( pts.get(0) );
    DirectPositionImpl directPositionNext;

    for (int i = 0; i < pts.size()-1; i++) {
      directPositionNext = new DirectPositionImpl( pts.get(i+1) );
     
      double segmentLen = dpAct.distance(directPositionNext);
      this.totalLength += segmentLen;
     
      DirectPositionImpl tempMid = dpAct.clone();
      tempMid.add( directPositionNext);
      tempMid.divideBy(2);
      tempMid.scale(segmentLen);
      this.centSum.add(tempMid);
     
      dpAct = directPositionNext;
    }
  }
View Full Code Here

   */
  private DirectPositionImpl position = null;

  public PointImpl(final DirectPosition position) {
    super( position.getCoordinateReferenceSystem() );
    this.position = new DirectPositionImpl( position );
  }
View Full Code Here

   *
   * @see org.opengis.geometry.primitive.Point#setPosition(org.opengis.geometry.coordinate.DirectPosition)
   */
        @Deprecated
  public void setPosition(DirectPosition p) {
    this.position = new DirectPositionImpl(p);
    //this.position = this.getGeometryFactory().getGeometryFactoryImpl().createDirectPosition(p);
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.opengis.geometry.primitive.Point#setPosition(org.opengis.geometry.coordinate.DirectPosition)
   */
  public void setDirectPosition(DirectPosition p) {
    this.position = new DirectPositionImpl(p);
    //this.position = this.getGeometryFactory().getGeometryFactoryImpl().createDirectPosition(p);
  }
View Full Code Here

  public Geometry transform(CoordinateReferenceSystem newCRS,
      MathTransform transform) throws MismatchedDimensionException, TransformException {

    PositionFactory newPositionFactory = new PositionFactoryImpl(newCRS, getPositionFactory().getPrecision());
    PrimitiveFactory newPrimitiveFactory = new PrimitiveFactoryImpl(newCRS, newPositionFactory);
    DirectPosition dp1 = new DirectPositionImpl(newCRS);
    dp1 = transform.transform(((PointImpl)this).getPosition(), dp1);
    return newPrimitiveFactory.createPoint( dp1 );
     
  }
View Full Code Here

TOP

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

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.