Examples of numGeometries()


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

  public void testGeometryCollection() throws JSONException {
    OGCGeometry g = OGCGeometry
        .fromText("GEOMETRYCOLLECTION(POLYGON EMPTY, POINT(1 1), LINESTRING EMPTY, MULTIPOLYGON EMPTY, MULTILINESTRING EMPTY)");
    assertTrue(g.geometryType().equals("GeometryCollection"));
    OGCConcreteGeometryCollection gc = (OGCConcreteGeometryCollection) g;
    assertTrue(gc.numGeometries() == 5);
    assertTrue(gc.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc.geometryN(4).geometryType().equals("MultiLineString"));
View Full Code Here

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

    g = OGCGeometry
        .fromText("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)");
    assertTrue(g.geometryType().equals("GeometryCollection"));
    gc = (OGCConcreteGeometryCollection) g;
    assertTrue(gc.numGeometries() == 7);
    assertTrue(gc.geometryN(0).geometryType().equals("Polygon"));
    assertTrue(gc.geometryN(1).geometryType().equals("Point"));
    assertTrue(gc.geometryN(2).geometryType().equals("GeometryCollection"));
    assertTrue(gc.geometryN(3).geometryType().equals("LineString"));
    assertTrue(gc.geometryN(4).geometryType().equals("GeometryCollection"));
View Full Code Here

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

    assertTrue(gc.geometryN(5).geometryType().equals("MultiPolygon"));
    assertTrue(gc.geometryN(6).geometryType().equals("MultiLineString"));

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

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

    assertTrue(gc.geometryN(4).geometryType().equals("GeometryCollection"));
    assertTrue(gc.geometryN(5).geometryType().equals("MultiPolygon"));
    assertTrue(gc.geometryN(6).geometryType().equals("MultiLineString"));

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

Examples of com.esri.core.geometry.ogc.OGCMultiLineString.numGeometries()

      OGCGeometry simpleG = g.makeSimple();//make ogc simple
      assertTrue(simpleG.geometryType().equals("MultiLineString"));     
      assertTrue(simpleG.isSimpleRelaxed());//geodatabase simple
      assertTrue(simpleG.isSimple());//ogc simple
      OGCMultiLineString mls =(OGCMultiLineString)simpleG;
      assertTrue(mls.numGeometries() == 4);
      OGCGeometry baseGeom = OGCGeometry.fromJson("{\"paths\":[[[2,0],[3.25,1.875]],[[3.25,1.875],[4,3],[5,1]],[[5,1],[3.25,1.875]],[[3.25,1.875],[1,3]]],\"spatialReference\":{\"wkid\":4326}}");
      assertTrue(simpleG.equals(baseGeom));
     
    }
  }
View Full Code Here

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

    OGCGeometry g0 = OGCGeometry.fromText(wkt);
    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();
View Full Code Here

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

      OGCGeometry g = OGCGeometry
          .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);
View Full Code Here

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

        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);
        assertTrue((g1.numInteriorRing() == 0 && g1.numInteriorRing() == 2) ||
            (g1.numInteriorRing() == 2 && g2.numInteriorRing() == 0));
       
View Full Code Here

Examples of javax.media.j3d.Shape3D.numGeometries()

   * Updates ground coloring and texture attributes from home ground color and texture.
   */
  private void update(boolean waitTextureLoadingEnd) {
    Home home = (Home)getUserData();
    Shape3D groundShape = (Shape3D)getChild(0);
    int currentGeometriesCount = groundShape.numGeometries();
   
    Color3f groundColor = new Color3f(new Color(home.getEnvironment().getGroundColor()));
    final Appearance groundAppearance = groundShape.getAppearance();
    groundAppearance.getColoringAttributes().setColor(groundColor);
    HomeTexture groundTexture = home.getEnvironment().getGroundTexture();
View Full Code Here

Examples of javax.media.j3d.Shape3D.numGeometries()

            backFaceNormalFlip = polygonAttributes.getBackFaceNormalFlip();
          }
        }
       
        // Write object geometries
        for (int i = 0, n = shape.numGeometries(); i < n; i++) {
          writeNodeGeometry(shape.getGeometry(i), parentTransformations, texCoordGeneration,
              cullFace, backFaceNormalFlip);
        }
      }
    }   
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.