Esri / Esri/geometry-api-java

esrijson to geojson Exception

Aberta
#321 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Java
Estrelas
710
Forks
269
Merge médio
7d 23h
PRs com merge (30d)
1

Descrição

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](https://github.com/Esri/arcgis-to-geojson-utils) arcgisToGeoJSON method.

The code example is as follows:
```java
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](https://github.com/Esri/geometry-api-java/files/15293037/GeoJson.json)

[EsriJson.json](https://github.com/Esri/geometry-api-java/files/15292946/EsriJson.json)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece com os arquivos anexados EsriJson.json e GeoJson.json e, em seguida, reproduza a conversão por meio de createGeometryByJson e getGeoJson. Rastreie as chamadas de conversão de GeometryEngine, incluindo geoJsonToGeometry e geometryToGeoJson, e compare o resultado com o método arcgisToGeoJSON. Está concluído quando a entrada fornecida produz uma geometria não vazia ou quando a incompatibilidade está claramente documentada.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java
Domínio
api, data
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.