mapbox / mapbox/mapbox-java

Implementation difference between geojson js vs geojson java

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

还没有人认领这个 Issue。

GeoJson Turf
主要语言
Java
星标
438
派生
117
PR 合并指标
30 天内没有已合并 PR

描述

This issue is raised from PR #1075 .

  • In the js implementation of geojson, the properties value of a Feature can be empty, but in the java implementation, an empty properties field is ignored:

https://github.com/mapbox/mapbox-java/blob/2130ea708c72ef8b98aeb02102554d7dc32606a0/services-geojson/src/main/java/com/mapbox/geojson/Feature.java#L280

  • When converting js version of geojson to the java version, the precision of coordinates has been reduced, i.e. from 102.227783203125 to 102.2277832. This issue was introduced in #938 . It seems the precision is trimed due to performance consideration.

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 Feature.java 中链接的 properties 处理开始,并查看 PR #1075 和 issue #938 以了解行为变化。比较 Java 输出与 JavaScript GeoJSON 对空 properties 和坐标精度的行为;当两个差异都得到解决并由相关测试覆盖时,即视为完成。

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

评估

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

把新 issue 发到你的邮箱

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