Examples of convertToMulti()


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

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

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

    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)")));
    OGCPoint p0 = ls.pointN(0);
    assertTrue(ls.pointN(0).equals(OGCGeometry.fromText("POINT(-10 -10)")));
    String ms = g.convertToMulti().asText();
    assertTrue(ms.equals("MULTIPOLYGON (((-10 -10, 10 -10, 10 10, -10 10, -10 -10), (-5 -5, -5 5, 5 5, 5 -5, -5 -5)))"));

  }

  @Test
View Full Code Here

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

    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))"));
  }

  @Test
  public void testPointInPolygon() {
View Full Code Here

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

      assertTrue(g.contains(OGCGeometry.fromText("POINT(9 9)")));
      assertTrue(!g.contains(OGCGeometry.fromText("POINT(-20 1)")));
      assertTrue(g.disjoint(OGCGeometry.fromText("POINT(0 0)")));
      assertTrue(!g.disjoint(OGCGeometry.fromText("POINT(9 9)")));
      assertTrue(g.disjoint(OGCGeometry.fromText("POINT(-20 1)")));
      assertTrue(g.convertToMulti() == g);
    }
   
    {
      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)))");
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.