Package com.esri.core.geometry.ogc

Examples of com.esri.core.geometry.ogc.OGCGeometry.geometryType()


        boolean res = g.isSimple();
        assertTrue(!res);
        assertTrue(g.isSimpleRelaxed());
        Geometry resg = OperatorSimplifyOGC.local().execute(g.getEsriGeometry(), null, true, null);
        OGCGeometry og = OGCGeometry.createFromEsriGeometry(resg, null);
        assertTrue(og.geometryType().equals("Polygon"));
        assertTrue(((OGCPolygon)og).numInteriorRing() == 1);
      }

      {
        // two holes touch in one spot, and they also touch exterior in
View Full Code Here


        boolean res = g.isSimple();
        assertTrue(!res);
        assertTrue(g.isSimpleRelaxed());
        Geometry resg = OperatorSimplifyOGC.local().execute(g.getEsriGeometry(), null, true, null);
        OGCGeometry og = OGCGeometry.createFromEsriGeometry(resg, null);
        assertTrue(og.geometryType().equals("MultiPolygon"));
        assertTrue(((OGCMultiPolygon)og).numGeometries() == 2);
        assertTrue(((OGCPolygon)((OGCMultiPolygon)og).geometryN(0)).numInteriorRing() == 0);
        assertTrue(((OGCPolygon)((OGCMultiPolygon)og).geometryN(1)).numInteriorRing() == 0);
      }
     
View Full Code Here

      }
     
     
      {
        OGCGeometry g = OGCGeometry.fromJson("{\"rings\":[[[-3,4],[6,4],[6,-3],[-3,-3],[-3,4]],[[0,2],[2,2],[0,0],[4,0],[4,2],[2,0],[2,2],[4,2],[3,3],[2,2],[1,3],[0,2]]], \"spatialReference\":{\"wkid\":4326}}");
        assertTrue(g.geometryType().equals("Polygon"));
        boolean res = g.isSimple();
        assertTrue(!res);
        assertTrue(!g.isSimpleRelaxed());
        OGCGeometry simpleG = g.makeSimple();
        assertTrue(simpleG.geometryType().equals("MultiPolygon"));
View Full Code Here

        assertTrue(g.geometryType().equals("Polygon"));
        boolean res = g.isSimple();
        assertTrue(!res);
        assertTrue(!g.isSimpleRelaxed());
        OGCGeometry simpleG = g.makeSimple();
        assertTrue(simpleG.geometryType().equals("MultiPolygon"));
        assertTrue(simpleG.isSimple());
        OGCMultiPolygon mp = (OGCMultiPolygon)simpleG;
        assertTrue(mp.numGeometries() == 2);
        OGCPolygon g1 = (OGCPolygon)mp.geometryN(0);
        OGCPolygon g2 = (OGCPolygon)mp.geometryN(1);
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.