Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing property encoding for double values #127

Closed
springmeyer opened this issue Jun 12, 2024 · 2 comments
Closed

Missing property encoding for double values #127

springmeyer opened this issue Jun 12, 2024 · 2 comments

Comments

@springmeyer
Copy link
Collaborator

The MVT spec supports fields encoded as double in addition to float (to allow for high precision):https://github.com/mapbox/vector-tile-spec/blob/5330dfc6ba2d5f8c8278c2c4f56fff2c7dee1dbd/2.1/vector_tile.proto#L21

The MLT spec also supports double in the schema:

But the code lacks support for encoding and decoding doubles, which means that any input vector tiles with properties encoded as doubles will currently fail here:

default:
throw new IllegalArgumentException(
"The specified data type for the field is currently not supported.");

@springmeyer
Copy link
Collaborator Author

springmeyer commented Jun 13, 2024

This is somewhat addressed by #129, but the solution in #129 is not optimal as it narrows doubles to floats. A proper solution would be to add full double support in encoding.

springmeyer added a commit that referenced this issue Jun 13, 2024
This PR includes various improvements and fixes to the java
implementation.

It includes several fix issues in the non-vectorized path, bringing it
back up to speed with the vectorized path:
 - #134 
 - #131 
 - #130 

And in includes two general encoding features that were missing:

 - #132 
 - #127

Additional changes, that don't have corresponding tickets:

- Fixed the Delta encoding in the non-vectorized path to support RLE
without multiple passes
- Improves the `encode` and `decode` cli tools to actually decode
vectorized geometries when `-decode` arg is passed
- Make the spotless check run faster (avoids running builds and tests
and just does the formatting check)
- Fixes a small bug in the vectorized path where the signed boolean was
incorrect
- Makes the benchmark timer in the encode and decode tools quiet by
default and now behind an option
- Adds additional error detail when unsupported encodings are
encountered at runtime
 - Comments some unused code
- Renames some code to match naming better between the vectorized and
non-vectorized path
@springmeyer
Copy link
Collaborator Author

This is done, with one followup, now ticketed separately: #149

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant