Examples of geometryN()


Examples of com.esri.core.geometry.ogc.OGCConcreteGeometryCollection.geometryN()

    gc2 = (OGCConcreteGeometryCollection) gc.geometryN(4);
    assertTrue(gc2.numGeometries() == 6);
    assertTrue(gc2.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc2.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc2.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc2.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc2.geometryN(4).geometryType().equals("MultiLineString"));
    assertTrue(gc2.geometryN(5).geometryType().equals("MultiPoint"));

    String wktString = g.asText();
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCConcreteGeometryCollection.geometryN()

    gc2 = (OGCConcreteGeometryCollection) gc.geometryN(4);
    assertTrue(gc2.numGeometries() == 6);
    assertTrue(gc2.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc2.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc2.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc2.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc2.geometryN(4).geometryType().equals("MultiLineString"));
    assertTrue(gc2.geometryN(5).geometryType().equals("MultiPoint"));

    String wktString = g.asText();
    assertTrue(wktString
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCConcreteGeometryCollection.geometryN()

    assertTrue(gc2.numGeometries() == 6);
    assertTrue(gc2.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc2.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc2.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc2.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc2.geometryN(4).geometryType().equals("MultiLineString"));
    assertTrue(gc2.geometryN(5).geometryType().equals("MultiPoint"));

    String wktString = g.asText();
    assertTrue(wktString
        .equals("GEOMETRYCOLLECTION (POLYGON EMPTY, POINT (1 1), GEOMETRYCOLLECTION EMPTY, LINESTRING EMPTY, GEOMETRYCOLLECTION (POLYGON EMPTY, POINT (1 1), LINESTRING EMPTY, MULTIPOLYGON EMPTY, MULTILINESTRING EMPTY, MULTIPOINT EMPTY), MULTIPOLYGON EMPTY, MULTILINESTRING EMPTY)"));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCConcreteGeometryCollection.geometryN()

    assertTrue(gc2.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc2.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc2.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc2.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc2.geometryN(4).geometryType().equals("MultiLineString"));
    assertTrue(gc2.geometryN(5).geometryType().equals("MultiPoint"));

    String wktString = g.asText();
    assertTrue(wktString
        .equals("GEOMETRYCOLLECTION (POLYGON EMPTY, POINT (1 1), GEOMETRYCOLLECTION EMPTY, LINESTRING EMPTY, GEOMETRYCOLLECTION (POLYGON EMPTY, POINT (1 1), LINESTRING EMPTY, MULTIPOLYGON EMPTY, MULTILINESTRING EMPTY, MULTIPOINT EMPTY), MULTIPOLYGON EMPTY, MULTILINESTRING EMPTY)"));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPoint.geometryN()

    assertTrue(g0.dimension() == 0);
    String gt = g0.geometryType();
    assertTrue(gt.equals("MultiPoint"));
    OGCMultiPoint mp = (OGCMultiPoint)g0;
    assertTrue(mp.numGeometries() == 1);
    OGCGeometry p = mp.geometryN(0);
    String s = p.asText();
    assertTrue(s.equals("POINT (1 0)"));
   
    String ms = p.convertToMulti().asText();
    assertTrue(ms.equals("MULTIPOINT ((1 0))"));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.geometryN()

          .fromText("MULTIPOLYGON(((-10 -10, 10 -10, 10 10, -10 10, -10 -10), (-5 -5, -5 5, 5 5, 5 -5, -5 -5)), ((90 90, 110 90, 110 110, 90 110, 90 90), (95 95, 95 105, 105 105, 105 95, 95 95)))");
      assertTrue(g.geometryType().equals("MultiPolygon")); // the type is
     
      OGCMultiPolygon mp = (OGCMultiPolygon)g;
      assertTrue(mp.numGeometries() == 2);
      OGCGeometry p1 = mp.geometryN(0);
      assertTrue(p1.geometryType().equals("Polygon")); // the type is
      assertTrue(p1.contains(OGCGeometry.fromText("POINT(9 9)")));
      assertTrue(!p1.contains(OGCGeometry.fromText("POINT(109 109)")));
      OGCGeometry p2 = mp.geometryN(1);
      assertTrue(p2.geometryType().equals("Polygon")); // the type is
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.geometryN()

      assertTrue(mp.numGeometries() == 2);
      OGCGeometry p1 = mp.geometryN(0);
      assertTrue(p1.geometryType().equals("Polygon")); // the type is
      assertTrue(p1.contains(OGCGeometry.fromText("POINT(9 9)")));
      assertTrue(!p1.contains(OGCGeometry.fromText("POINT(109 109)")));
      OGCGeometry p2 = mp.geometryN(1);
      assertTrue(p2.geometryType().equals("Polygon")); // the type is
      assertTrue(!p2.contains(OGCGeometry.fromText("POINT(9 9)")));
      assertTrue(p2.contains(OGCGeometry.fromText("POINT(109 109)")));
    }
  }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.geometryN()

        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);
        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}}");
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.geometryN()

        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);
        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());
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.