-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add "to-array" & "to-object" to expresions #6546
Comments
Any movement on this? With commit #8876, it really feels as though there should be some mechanism for converting strings to arrays as there is currently no way to do this in the Mapbox Vector Tile spec. Nor is there a way in Tippecanoe to do this. It could be possible to do this with strings, but this introduces some tricky conditions (specfically for the first or last item in the array). |
Anything new on this? The use case I am thinking of is storing a timeserie of data (array of numbers) as attribute in tiles from tippecanoe and then be able get the number at a specific index in that array. |
proposed implementation: #11003 Unfortunately we can't move it forward right now. |
Any updates on this? This limitation in combination with the MVTs spec to filter out lists, makes it difficult to dynamically filter features on the client without having to filter them from the backend which requires a full reload of the tiles. |
Motivation
As MVT spec does not allow passing arrays or objects as features property, the shortcut is to pass them serialized as string, and parse it later if needed.
The problem here is when trying to use one specific element of that specific property for filtering or styling, it looks back to the original info in the tile and it will find a string. So, no way.
Proposal
Adding new casts to expresions
["to-object", my_object_like_value <string>]
["to-array", separator <string>, my_array_like_value <string>]
The text was updated successfully, but these errors were encountered: