Package org.geotools.geometry.iso.coordinate

Examples of org.geotools.geometry.iso.coordinate.GeometryFactoryImpl.createDirectPosition()


   
   
    DirectPosition dp3 = tCoordFactory.createDirectPosition(new double[] {0,0});
    DirectPosition dp4 = tCoordFactory.createDirectPosition(new double[] {100,50});
    DirectPosition dp5 = tCoordFactory.createDirectPosition(new double[] {100.01,50});
    DirectPosition dp6 = tCoordFactory.createDirectPosition(new double[] {50,100});
    DirectPosition dp7 = tCoordFactory.createDirectPosition(new double[] {50,100.01});
   
    // Envelope.contains(DirectPosition)
    //System.outprintln("Contains Method for " + env1);
    assertTrue(env1.contains(dp3) == true);
View Full Code Here


   
    DirectPosition dp3 = tCoordFactory.createDirectPosition(new double[] {0,0});
    DirectPosition dp4 = tCoordFactory.createDirectPosition(new double[] {100,50});
    DirectPosition dp5 = tCoordFactory.createDirectPosition(new double[] {100.01,50});
    DirectPosition dp6 = tCoordFactory.createDirectPosition(new double[] {50,100});
    DirectPosition dp7 = tCoordFactory.createDirectPosition(new double[] {50,100.01});
   
    // Envelope.contains(DirectPosition)
    //System.outprintln("Contains Method for " + env1);
    assertTrue(env1.contains(dp3) == true);
    //System.outprintln(dp3 + " liegt im Envelope: " + env1.contains(dp3));
View Full Code Here

    // ***** getRepresentativePoint()
    double[] dp = p1.getRepresentativePoint().getCoordinate();
    assertTrue(dp[0] == 10);
    assertTrue(dp[1] == 32000);
   
    DirectPosition dp1 = tCoordFactory.createDirectPosition(coord);
   
    Point p2 = tPrimFactory.createPoint(dp1);
   
    //System.out.println("P1: " + p1);
    //System.out.println("P2: " + p2);
View Full Code Here

   
    assertTrue(p1.isCycle() == true);

   
    double[] coord2 = new double[]{5, 20};
    dp1 = tCoordFactory.createDirectPosition(coord2);
    p1.setDirectPosition(dp1);
    //System.out.println("P1: " + p1);
    //System.out.println("P2: " + p2);
    assertTrue(!p1.equals(p2));
   
View Full Code Here

  private void _testCurveBoundary1(GeometryBuilder builder) {

    GeometryFactoryImpl tCoordFactory = (GeometryFactoryImpl) builder.getGeometryFactory();
    PrimitiveFactoryImpl tPrimitiveFactory = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();
   
    DirectPosition dp1 = tCoordFactory.createDirectPosition(new double[] {0, 0});
    DirectPosition dp2 = tCoordFactory.createDirectPosition(new double[] {100, 100});
   
    CurveBoundary curveBoundary1 = tPrimitiveFactory.createCurveBoundary(dp1, dp2);
   
    //System.out.println(curveBoundary1);
View Full Code Here

    GeometryFactoryImpl tCoordFactory = (GeometryFactoryImpl) builder.getGeometryFactory();
    PrimitiveFactoryImpl tPrimitiveFactory = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();
   
    DirectPosition dp1 = tCoordFactory.createDirectPosition(new double[] {0, 0});
    DirectPosition dp2 = tCoordFactory.createDirectPosition(new double[] {100, 100});
   
    CurveBoundary curveBoundary1 = tPrimitiveFactory.createCurveBoundary(dp1, dp2);
   
    //System.out.println(curveBoundary1);
View Full Code Here

    // test obj equals and hashcode
    assertTrue(b2.equals((Object) curveBoundary1));
    assertTrue(b2.equals((Object) b2));
    assertFalse(b2.equals((Object) dp1));
    assertFalse(b2.equals((Object) null));
    DirectPosition dp3 = tCoordFactory.createDirectPosition(new double[] {3, 3});
    PointImpl point3 = new PointImpl(dp3);
    assertFalse(b2.equals((Object) new CurveBoundaryImpl(this.crs, point1, point3)));
   
    assertFalse(b2.hashCode() == ((CurveBoundaryImpl) curveBoundary1).hashCode());
  }
View Full Code Here

    GeometryFactoryImpl tCoordFactory = (GeometryFactoryImpl) builder.getGeometryFactory();
    PrimitiveFactoryImpl tPrimFactory = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();

    /* Defining Positions for LineStrings */
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
View Full Code Here

    PrimitiveFactoryImpl tPrimFactory = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();

    /* Defining Positions for LineStrings */
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
    line2.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 70})));
View Full Code Here

    /* Defining Positions for LineStrings */
    ArrayList<Position> line1 = new ArrayList<Position>();
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{50, 20})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{30, 30})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 50})));
    line1.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 70})));

    ArrayList<Position> line2 = new ArrayList<Position>();
    line2.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{20, 70})));
    line2.add(new PositionImpl(tCoordFactory.createDirectPosition(new double[]{40, 80})));
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.