Package org.opengis.geometry.complex

Examples of org.opengis.geometry.complex.ComplexFactory


  }
 
 
  private void _testCompositeSurface(GeometryBuilder builder) {
   
    ComplexFactory complf = builder.getComplexFactory();
    PrimitiveFactoryImpl pf = (PrimitiveFactoryImpl) builder.getPrimitiveFactory();
    GeometryFactory cf = builder.getGeometryFactory();

    List<DirectPosition> directPositionList = new ArrayList<DirectPosition>();
    directPositionList.add(cf.createDirectPosition(new double[] {20, 10}));
    directPositionList.add(cf.createDirectPosition(new double[] {40, 10}));
    directPositionList.add(cf.createDirectPosition(new double[] {50, 40}));
    directPositionList.add(cf.createDirectPosition(new double[] {30, 50}));
    directPositionList.add(cf.createDirectPosition(new double[] {10, 30}));
    directPositionList.add(cf.createDirectPosition(new double[] {20, 10}));

   
    Surface s1 = pf.createSurfaceByDirectPositions(directPositionList);
   
    List<OrientableSurface> surfaceList = new ArrayList<OrientableSurface>();
    surfaceList.add(s1);
   
    CompositeSurface comps1 = complf.createCompositeSurface(surfaceList);
   
    //System.out.println(comps1.getEnvelope());
    double[] dp = comps1.getEnvelope().getLowerCorner().getCoordinate();
    assertTrue(dp[0] == 10);
    assertTrue(dp[1] == 10);
View Full Code Here

TOP

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

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.