I have an esrijson and when converting it to geojson, I found that the geometry returned by createGeometryByGeoJson is empty. Is there any other way to convert it to geojson?
I can successfully convert using https://github.com/Esri/arcgis-to-geojson-utils arcgisToGeoJSON method.
The code example is as follows:
publicStringEsriJsonToGeoJson(Stringesri_json){
Geometrygeometry = createGeometryByJson(esri_json);
returngetGeoJson(geometry);
}
privateGeometrycreateGeometryByGeoJson(Stringgeojson) {
returnGeometryEngine.geoJsonToGeometry(geojson, WktExportFlags.wktExportDefaults, Geometry.Type.Unknown).getGeometry();
}
privateStringgetGeoJson(Geometrygeometry) {
returnGeometryEngine.geometryToGeoJson(geometry);
}The data example is as follows:
GeoJson.json
EsriJson.json
I have an esrijson and when converting it to geojson, I found that the geometry returned by createGeometryByGeoJson is empty. Is there any other way to convert it to geojson?
I can successfully convert using https://github.com/Esri/arcgis-to-geojson-utils arcgisToGeoJSON method.
The code example is as follows:
The data example is as follows:
GeoJson.json
EsriJson.json