Class GeojsonUtils

java.lang.Object
cn.mapway.common.geo.geotools.GeojsonUtils

public class GeojsonUtils extends Object
解析geojson
  • Constructor Details

    • GeojsonUtils

      public GeojsonUtils()
  • Method Details

    • parseGeometry

      public static org.locationtech.jts.geom.Geometry parseGeometry(String geojson)
    • parseGeometryFromWkt

      public static org.locationtech.jts.geom.Geometry parseGeometryFromWkt(String wkt)
    • toWkt

      public static String toWkt(org.locationtech.jts.geom.Geometry geom)
    • toEWkt

      public static String toEWkt(org.locationtech.jts.geom.Geometry geom)
    • parseFeatures

      public static org.geotools.feature.FeatureCollection parseFeatures(String geojson)
    • parseFeature

      public static org.opengis.feature.simple.SimpleFeature parseFeature(String geojson)
    • parseGeometryCollection

      public static org.locationtech.jts.geom.GeometryCollection parseGeometryCollection(String geojson) throws IOException
      Throws:
      IOException
    • geometryToGeojson

      public static String geometryToGeojson(org.locationtech.jts.geom.Geometry geom)
    • simpleFeatureToGeojson

      public static String simpleFeatureToGeojson(org.opengis.feature.simple.SimpleFeature geom)
    • read

      public static String read(Object obj)
    • setGeometryDecimals

      public static void setGeometryDecimals(int decimals)
    • write

      public static void write(Object obj, Object output) throws IOException
      Throws:
      IOException
    • write

      public static String write(Object obj) throws IOException
      Throws:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException