Package org.opengis.geometry.coordinate

Examples of org.opengis.geometry.coordinate.ParamForPoint


    // TODO semantic SJ, JR
    // TODO implementation
    // TODO test
    // TODO documentation
    /* Initialise paramForPoints with set of first Segment */
    ParamForPoint paramForPoints = this.curveSegments.get(0)
        .getParamForPoint(p);

    double minDistanceSquare = AlgoPointND.getDistanceSquare(p.getCoordinate(), paramForPoints.getPosition().getCoordinate());
    //double minDistanceSquare = ((DirectPositionImpl) p).distanceSquare(paramForPoints.getDirectPosition());
    double actDistanceSquare = 0.0;

    /* Loop all other segments and check if the distance of them is smaller */
    for (int i = 1; i < this.curveSegments.size(); i++) {
      ParamForPoint paramForPoints1 = this.curveSegments.get(i)
          .getParamForPoint(p);
     
      actDistanceSquare = AlgoPointND.getDistanceSquare(p.getCoordinate(), paramForPoints1.getPosition().getCoordinate());
      //actDistanceSquare = ((DirectPositionImpl) p).distanceSquare(paramForPoints1.getDirectPosition());
     
      if (actDistanceSquare <= minDistanceSquare) {
        // TODO
        // /* If other params are closer, clear list of params */
 
View Full Code Here


    // point1 = new PositionImpl(this.getStartPoint());
    // if (point2 == null)
    // point2 = new PositionImpl(this.getEndPoint());

    /* Get all Params for closest points to startposition point1 */
    ParamForPoint startParams = this.getParamForPoint(point1.getDirectPosition());
    /* Get all Params for closest points to endposition point2 */
    ParamForPoint endParams = this.getParamForPoint(point2.getDirectPosition());

    /*
     * Compare the distances between each found startParam and endParam and
     * choose the smallest one
     */
    double minDistance = Math.abs(DoubleOperation.subtract(startParams.getDistance(), endParams.getDistance()));

    // double actDistance = 0.0;
    // for (int i = 1; i < startParams.length; i++) {
    // for (int j = 1; i < endParams.length; j++) {
    // actDistance = Math.abs((Double) this.getStartParams[0]
View Full Code Here

TOP

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

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.