esrijson to geojson Exception
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Begin with the attached EsriJson.json and GeoJson.json, then reproduce the conversion through createGeometryByJson and getGeoJson. Trace the GeometryEngine conversion calls, including geoJsonToGeometry and geometryToGeoJson, and compare the result with the arcgisToGeoJSON method. Done means the supplied input produces a non-empty geometry or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Description
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:
public String EsriJsonToGeoJson(String esri_json){
Geometry geometry = createGeometryByJson(esri_json);
return getGeoJson(geometry);
}
private Geometry createGeometryByGeoJson(String geojson) {
return GeometryEngine.geoJsonToGeometry(geojson, WktExportFlags.wktExportDefaults, Geometry.Type.Unknown).getGeometry();
}
private String getGeoJson(Geometry geometry) {
return GeometryEngine.geometryToGeoJson(geometry);
}
The data example is as follows:
GeoJson.json
- Dominant language
- Java
- Stars
- 710
- Forks
- 268
- Avg merge
- 7d 23h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Esri/geometry-api-java
-
bug fixed_to_verify
Esri/geometry-api-java#328 · 3 comments · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Esri/geometry-api-java#324 · 17 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Esri/geometry-api-java#320 · 1 comment ·
-
cannot reproduce
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Esri/geometry-api-java#316 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Esri/geometry-api-java#302 · 1 comment ·
All issues in Esri/geometry-api-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100