Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

esrijson to geojson Exception

未关闭
#321 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
api, data

调研方向

从附带的 EsriJson.json 和 GeoJson.json 开始,然后通过 createGeometryByJson 和 getGeoJson 重现转换过程。跟踪 GeometryEngine 的转换调用,包括 geoJsonToGeometry 和 geometryToGeoJson,并将结果与 arcgisToGeoJSON 方法进行比较。当提供的输入产生非空几何体,或不兼容性已得到明确记录时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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

EsriJson.json

主要语言
Java
星标
710
派生
268
平均合并
7 天 23 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Esri/geometry-api-java 的其他 Issue

查看 Esri/geometry-api-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。