Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Implementation difference between geojson js vs geojson java

Open
#1,077 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
data

Research direction

Start with Feature.java at the linked properties handling and review PR #1075 and issue #938 for the behavior changes. Compare Java output with the JavaScript GeoJSON behavior for empty properties and coordinate precision; done means both differences are addressed and covered by relevant tests.

Written by the indexing model from the issue text.

Description

GeoJson Turf

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.
Dominant language
Java
Stars
438
Forks
117
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-java

All issues in mapbox/mapbox-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.