Package org.opengis.geometry.aggregate

Examples of org.opengis.geometry.aggregate.MultiPoint


    Set<Point> points = new HashSet<Point>();
    points.add( new PointImpl(dp1) );
    points.add( new PointImpl(dp2) );
    points.add( new PointImpl(dp3) );
    points.add( new PointImpl(dp4) );
    MultiPoint mp = af.createMultiPoint(points);
   
    assertNotNull(mp);
    assertNotNull(mp.getEnvelope());
    assertEquals(mp.getCoordinateDimension(), 2);
    assertEquals(mp.getElements().size(), 4);
    assertEquals(mp.getElements(), points);
    assertEquals(mp.getEnvelope().getLowerCorner().getOrdinate(0), 10.0);
    assertEquals(mp.getEnvelope().getLowerCorner().getOrdinate(1), 5.0);
    assertEquals(mp.getEnvelope().getUpperCorner().getOrdinate(0), 70.0);
    assertEquals(mp.getEnvelope().getUpperCorner().getOrdinate(1), 35.0);
   
    // test equals
    assertTrue(mp.equals(new MultiPointImpl(mp.getCoordinateReferenceSystem(), points)));
   
  }
View Full Code Here

TOP

Related Classes of org.opengis.geometry.aggregate.MultiPoint

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.