Examples of numPoints()


Examples of com.esri.core.geometry.ogc.OGCLineString.numPoints()

  public void testFirstPointOfLineString() {
    OGCGeometry g = OGCGeometry
        .fromText("LINESTRING(-10 -10, 10 -10, 10 10, -10 10, -10 -10)");
    assertTrue(g.geometryType().equals("LineString"));
    OGCLineString p = (OGCLineString) g;
    assertTrue(p.numPoints() == 5);
    assertTrue(p.isClosed());
    assertTrue(p.pointN(1).equals(OGCGeometry.fromText("POINT(10 -10)")));
    String ms = g.convertToMulti().asText();
    assertTrue(ms.equals("MULTILINESTRING ((-10 -10, 10 -10, 10 10, -10 10, -10 -10))"));
  }
View Full Code Here

Examples of org.postgis.Geometry.numPoints()

        {
          // The dataObj must be cast to PGgeometry before an individual Geometry can be extracted.
          if (!(dataObj instanceof PGgeometry))
            continue;
          Geometry geom = ((PGgeometry) dataObj).getGeometry();
          int numPoints = geom.numPoints();
          // Create PGGeom Bean here and fill it up!
          PGGeom bean = new PGGeom();
          bean.type = geom.getType();
          bean.xyCoords = new double[numPoints * 2];
          for (int j = 0; j < numPoints; j++)
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.