Examples of OGCMultiPoint


Examples of com.esri.core.geometry.ogc.OGCMultiPoint

    @Test
    public void testOGCMultiPoint() {
        MultiPoint mp = new MultiPoint();
        mp.add(10.0, 20.0);
        mp.add(20.0, 30.0);
        OGCMultiPoint ogcMultiPoint = new OGCMultiPoint(mp, null);
        String result = ogcMultiPoint.asGeoJson();
        assertEquals("{\"type\":\"MultiPoint\",\"coordinates\":[[10.0,20.0],[20.0,30.0]]}", result);
    }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPoint

    String wkt = "multipoint((1 0))";
    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();
    assertTrue(ms.equals("MULTIPOINT ((1 0))"));
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.