Examples of asGeoJson()


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

      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    try {
      String outJson = ogcGeometry.asGeoJson();
      resultText.set(outJson);
      return resultText;
    } catch (Exception e) {
      LogUtils.Log_InternalError(LOG, "ST_AsGeoJSON: " + e);
      return null;
View Full Code Here

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

      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    try {
      String outJson = ogcGeometry.asGeoJson();
      resultText.set(outJson);
      return resultText;
    } catch (Exception e) {
      LogUtils.Log_InternalError(LOG, "ST_AsGeoJSON: " + e);
      return null;
View Full Code Here

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

    @Test
    public void testOGCPoint() {
        Point p = new Point(10.0, 20.0);
        OGCGeometry ogcPoint = new OGCPoint(p, null);
        String result = ogcPoint.asGeoJson();
        assertEquals("{\"type\":\"Point\",\"coordinates\":[10.0,20.0]}", result);
    }

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

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

        p.startPath(100.0, 0.0);
        p.lineTo(101.0, 0.0);
        p.lineTo(101.0, 1.0);
        p.lineTo(100.0, 1.0);
        OGCLineString ogcLineString = new OGCLineString(p, 0, null);
        String result = ogcLineString.asGeoJson();
        assertEquals("{\"type\":\"LineString\",\"coordinates\":[[100.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0]]}", result);
    }

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

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

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

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

Examples of com.esri.core.geometry.ogc.OGCPoint.asGeoJson()

    @Test
    public void testOGCPoint() {
        Point p = new Point(10.0, 20.0);
        OGCGeometry ogcPoint = new OGCPoint(p, null);
        String result = ogcPoint.asGeoJson();
        assertEquals("{\"type\":\"Point\",\"coordinates\":[10.0,20.0]}", result);
    }

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

Examples of com.esri.core.geometry.ogc.OGCPolygon.asGeoJson()

        p.lineTo(101.0, 0.0);
        p.lineTo(101.0, 1.0);
        p.lineTo(100.0, 1.0);
        p.closePathWithLine();
        OGCPolygon ogcPolygon = new OGCPolygon(p, null);
        String result = ogcPolygon.asGeoJson();
        assertEquals("{\"type\":\"Polygon\",\"coordinates\":[[[100.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]]]}", result);
    }

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

Examples of com.esri.core.geometry.ogc.OGCPolygon.asGeoJson()

        p.lineTo(100.8, 0.8);
        p.lineTo(100.2, 0.8);
        p.closePathWithLine();

        OGCPolygon ogcPolygon = new OGCPolygon(p, null);
        String result = ogcPolygon.asGeoJson();
        assertEquals("{\"type\":\"Polygon\",\"coordinates\":[[[100.0,0.0],[100.0,1.0],[101.0,1.0],[101.0,0.0],[100.0,0.0]],[[100.2,0.2],[100.8,0.2],[100.8,0.8],[100.2,0.8],[100.2,0.2]]]}", result);
    }

    @Test
    public void testEnvelope() {
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.