Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Evaluate of how to handle the id column #13

Open
mactrem opened this issue Aug 15, 2023 · 3 comments
Open

Evaluate of how to handle the id column #13

mactrem opened this issue Aug 15, 2023 · 3 comments

Comments

@mactrem
Copy link
Collaborator

mactrem commented Aug 15, 2023

  • Allow any data type (currently only UInt64)?
  • No dedicated id column in a tile, instead part of the properties?
@nyurik
Copy link
Member

nyurik commented Aug 15, 2023

Are you talking about Tile ID or Feature ID? If feature ID, than having no dedicated ID in a tile would significantly affect MapLibre - there are a lot of APIs that assume that each feature has a conceptual ID. But for the referencing tile itself, than yes - any way of addressing a tile you may like would work i guess?

@mactrem
Copy link
Collaborator Author

mactrem commented Aug 16, 2023

No, i'm talking about the feature ID, since also in the current MVT spec the ID is optional have a look at the proto file. Currently i use the approach to have a dedicated id column with a fixed UInt64 datatype. The advantage is that in most cases the id column can be very efficent RLE/Varint encoded see https://github.com/mactrem/cov-tiles#id-compression. However, there seems to be a need for generic data types, as pointed out for example in this interesting discussion in the MVT repo or also Overture is using string IDs.
I understand your point that the lack of a dedicated ID column causes problems in the current MapLibre ecosystem. So i'm tending toward the usage of a dedicated optional ID column but with a variable data type, with the recommendation to use UInt64/Int64 for size and performance reasons. @nyurik what do you think?

@msbarry
Copy link
Collaborator

msbarry commented Aug 17, 2023

FWIW I tried mapping overture string IDs to 64-bit longs using an fnv1a hash and there are no collisions for now at least.

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

No branches or pull requests

3 participants