Examples of LineSegment


Examples of org.geomajas.gwt.client.spatial.LineSegment

  public double getDistance(Coordinate coordinate) {
    double distance = Double.MAX_VALUE;
    if (!isEmpty()) {
      for (Point point : points) {
        double temp = new LineSegment(point.getCoordinate(), coordinate).getLength();
        if (temp < distance) {
          distance = temp;
        }
      }
    }
View Full Code Here

Examples of org.opengis.geometry.coordinate.LineSegment

    assertTrue(pos1.getDirectPosition().getOrdinate(1) == -115000.0);
    assertTrue(pos1.getDirectPosition().getOrdinate(2) == 0.0000000125);

    // public LineSegment createLineSegment(Position startPoint, Position endPoint);
    Position pos2 = cf.createPosition(dp1);
    LineSegment seg1 = cf.createLineSegment(pos1, pos2);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(0), Double.NaN) == 0.0);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(1), Double.NaN) == 0.0);
    assertTrue(Double.compare(seg1.getEndPoint().getOrdinate(2), Double.NaN) == 0.0);
    assertTrue(seg1.getStartPoint().getOrdinate(0) == 10.0);
    assertTrue(seg1.getStartPoint().getOrdinate(1) == -115000.0);
    assertTrue(seg1.getStartPoint().getOrdinate(2) == 0.0000000125);
   
    // test creating multiprimitive (only creates an empty obj right now)
    MultiPrimitive mp = cf.createMultiPrimitive();
    assertNotNull(mp);
    assertEquals(mp.getCoordinateReferenceSystem(), cf.getCoordinateReferenceSystem());
View Full Code Here

Examples of org.sbml.jsbml.ext.layout.LineSegment

            }
          }

          if (curveSegment.getType().equals(CurveSegment.Type.LINE_SEGMENT))
          {
            LineSegment realCurveSegment = new LineSegment(curveSegment);
            logger.debug("Transformed CubicBezier: " + curveSegment + " into a LineSegment.");
            curve.getListOfCurveSegments().remove(i);
            curve.getListOfCurveSegments().add(i, realCurveSegment);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.