I Cannot decode geobuf with COORD_PRECISION different from 6
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
I'm using python geobuf for encoding and javascript geobuf for decoding.
All goes well while the coordinates decimal precision is unchanged and while features are encoded in EPSG:4326 (WGS84) where numbers are tiny ( < 180)
Using other reference systems like EPSG:32632 where numbers are bigger (like 4000000) pygeobuf crashes because with precision =6 it goes in number overflow. (but this is a pygeobuf problem). So I have to change precision in encoding to avoid crash and also to be more performant. Unfortunately in javascript geobuf, I have no options to do this. For sure, I can modify the source code but this is not the right way to do things also because I using npm to install it. I think a "precision argument" could be added in encoding like py geobuff.
In my opinion this information could be added in geobuf protocol to avoid the decoder to knows in advance. But this is another story.
Thankyou! I love geobuf
Contributor guide
Research direction
Start by tracing the JavaScript geobuf encoding and decoding entry points, focusing on how coordinate precision is handled and whether encoder options are exposed. Reproduce the EPSG:32632 case with a non-6 precision, then verify that encoded data decodes correctly and that the requested precision behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100