Package org.opengis.geometry.complex

Examples of org.opengis.geometry.complex.CompositePoint


     
    // testcreateCompositeCurve()
    PointImpl p1 = new PointImpl( positionFactory.createDirectPosition(new double[]{50, 20}) );
    PointImpl p2 = new PointImpl( positionFactory.createDirectPosition(new double[]{70, 80}) );
   
    CompositePoint comppoint1 = complf.createCompositePoint(p1);
    CompositePoint comppoint2 = complf.createCompositePoint(p2);
   
    assertNotNull(comppoint1);
    assertNotNull(comppoint2);
    double[] dp = comppoint1.getEnvelope().getLowerCorner().getCoordinate();
    assertEquals(dp[0], 50.0);
    assertEquals(dp[1], 20.0);
    dp = comppoint2.getEnvelope().getLowerCorner().getCoordinate();
    assertEquals(dp[0], 70.0);
    assertEquals(dp[1], 80.0);
   
    assertEquals(comppoint1.getCoordinateDimension(), p1.getCoordinateDimension());
    assertEquals(comppoint2.getCoordinateDimension(), p2.getCoordinateDimension());
   
    // test equals
    assertTrue(comppoint1.equals(new CompositePointImpl(p1)));
   
  }
View Full Code Here


 
  private void _testAll() {
   
   
    // Point
    CompositePoint cp = (CompositePoint) this.createPoint().getClosure();
    //System.out.println(cp);
   
    // Curve
    CompositeCurve cc = (CompositeCurve) this.createCurve().getClosure();
    //System.out.println(cc);
   
    // Surface
    CompositeSurface cs = (CompositeSurface) this.createSurface().getClosure();
    //System.out.println(cs);

   
    // Complexes
    CompositePoint ncp = (CompositePoint) cp.getClosure();
    assertTrue(ncp == cp);
    //System.out.println(ncp);

    CompositeCurve ncc = (CompositeCurve) cc.getClosure();
    assertTrue(ncc == cc);
View Full Code Here

TOP

Related Classes of org.opengis.geometry.complex.CompositePoint

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.