Package cn.mapway.common.geo.geotools
Class GeojsonUtils
java.lang.Object
cn.mapway.common.geo.geotools.GeojsonUtils
解析geojson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgeometryToGeojson(org.locationtech.jts.geom.Geometry geom) static voidstatic org.opengis.feature.simple.SimpleFeatureparseFeature(String geojson) static org.geotools.feature.FeatureCollectionparseFeatures(String geojson) static org.locationtech.jts.geom.GeometryparseGeometry(String geojson) static org.locationtech.jts.geom.GeometryCollectionparseGeometryCollection(String geojson) static org.locationtech.jts.geom.Geometrystatic Stringstatic voidsetGeometryDecimals(int decimals) static StringsimpleFeatureToGeojson(org.opengis.feature.simple.SimpleFeature geom) static StringtoEWkt(org.locationtech.jts.geom.Geometry geom) static StringtoWkt(org.locationtech.jts.geom.Geometry geom) static Stringstatic void
-
Constructor Details
-
GeojsonUtils
public GeojsonUtils()
-
-
Method Details
-
parseGeometry
-
parseGeometryFromWkt
-
toWkt
-
toEWkt
-
parseFeatures
-
parseFeature
-
parseGeometryCollection
public static org.locationtech.jts.geom.GeometryCollection parseGeometryCollection(String geojson) throws IOException - Throws:
IOException
-
geometryToGeojson
-
simpleFeatureToGeojson
-
read
-
setGeometryDecimals
public static void setGeometryDecimals(int decimals) -
write
- Throws:
IOException
-
write
- Throws:
IOException
-
main
- Throws:
IOException
-