Examples of numInteriorRing()


Examples of com.esri.core.geometry.ogc.OGCPolygon.numInteriorRing()

  public void testPolygon() {
    OGCGeometry g = OGCGeometry
        .fromText("POLYGON((-10 -10, 10 -10, 10 10, -10 10, -10 -10), (-5 -5, -5 5, 5 5, 5 -5, -5 -5))");
    assertTrue(g.geometryType().equals("Polygon"));
    OGCPolygon p = (OGCPolygon) g;
    assertTrue(p.numInteriorRing() == 1);
    OGCLineString ls = p.exteriorRing();
    // assertTrue(ls.pointN(1).equals(OGCGeometry.fromText("POINT(10 -10)")));
    boolean b = ls
        .equals(OGCGeometry
            .fromText("LINESTRING(-10 -10, 10 -10, 10 10, -10 10, -10 -10)"));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCPolygon.numInteriorRing()

  public void testFirstPointOfPolygon() {
    OGCGeometry g = OGCGeometry
        .fromText("POLYGON((-10 -10, 10 -10, 10 10, -10 10, -10 -10), (-5 -5, -5 5, 5 5, 5 -5, -5 -5))");
    assertTrue(g.geometryType().equals("Polygon"));
    OGCPolygon p = (OGCPolygon) g;
    assertTrue(p.numInteriorRing() == 1);
    OGCLineString ls = p.exteriorRing();
    OGCPoint p1 = ls.pointN(1);
    assertTrue(ls.pointN(1).equals(OGCGeometry.fromText("POINT(10 -10)")));
    OGCPoint p2 = ls.pointN(3);
    assertTrue(ls.pointN(3).equals(OGCGeometry.fromText("POINT(-10 10)")));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCPolygon.numInteriorRing()

        OGCMultiPolygon mp = (OGCMultiPolygon)simpleG;
        assertTrue(mp.numGeometries() == 2);
        OGCPolygon g1 = (OGCPolygon)mp.geometryN(0);
        OGCPolygon g2 = (OGCPolygon)mp.geometryN(1);
        assertTrue((g1.numInteriorRing() == 0 && g1.numInteriorRing() == 2) ||
            (g1.numInteriorRing() == 2 && g2.numInteriorRing() == 0));
       
        OGCGeometry oldOutput = OGCGeometry.fromJson("{\"rings\":[[[-3,-3],[-3,4],[6,4],[6,-3],[-3,-3]],[[0,0],[2,0],[4,0],[4,2],[3,3],[2,2],[1,3],[0,2],[2,2],[0,0]],[[2,0],[2,2],[4,2],[2,0]]],\"spatialReference\":{\"wkid\":4326}}");
        assertTrue(oldOutput.isSimpleRelaxed());
        assertFalse(oldOutput.isSimple());
      }
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.