Package org.geotools.geometry.iso.primitive

Examples of org.geotools.geometry.iso.primitive.PrimitiveFactoryImpl.createPoint()


    PositionFactory positionFactory = new PositionFactoryImpl(crs, new PrecisionModel());
    PrimitiveFactory primitiveFactory = new PrimitiveFactoryImpl(crs, positionFactory); // null;
   
    assertEquals( crs, primitiveFactory.getCoordinateReferenceSystem() );
   
    Point point = primitiveFactory.createPoint( new double[]{1,1} );
   
    assertNotNull( point );
    assertEquals( crs, point.getCoordinateReferenceSystem() );
    assertSame( crs, point.getCoordinateReferenceSystem() );   
  }
View Full Code Here


   
    GeometryFactoryImpl tCoordFactory = (GeometryFactoryImpl) builder.getGeometryFactory();
    PrimitiveFactoryImpl tPrimFactory = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();
   
    double[] coord = new double[]{10, 32000};
    Point p1 = tPrimFactory.createPoint(coord);

    // ***** getRepresentativePoint()
    double[] dp = p1.getRepresentativePoint().getCoordinate();
    assertTrue(dp[0] == 10);
    assertTrue(dp[1] == 32000);
View Full Code Here

    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);
    assertTrue(p1.equals(p2));
   
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.