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

Any chance to include geojson properties? #49

Open
ricadete opened this issue Nov 24, 2017 · 1 comment
Open

Any chance to include geojson properties? #49

ricadete opened this issue Nov 24, 2017 · 1 comment

Comments

@ricadete
Copy link

First of all, awesome work with this library!
For my application i will need to use properties for data-drive visualisation (color, size, ...) , therefore is it important to maintain the properties while running tile-count-create and tile-count-tile.

Question:
It is possible to tweak this library to include custom properties, not just density? So, while doing the merge for different zoom levels, and in case of different properties at the geojson, they would merge as array of values (e.g. properties.users: [24,66,94]).

Maybe you know a better way, let me know, thanks.

@ricadete ricadete changed the title Any change to include geojson properties? Any chance to include geojson properties? Nov 24, 2017
@e-n-f
Copy link
Contributor

e-n-f commented Nov 27, 2017

It would be useful to be able to support some properties, but I think general GeoJSON support is going to be out of scope for this project.

Historical background: My first tool along these lines was datamaps, which supported a single integer property for each feature. I made a couple of attempts to add support for arbitrary properties, but eventually decided it was too much of a mess and gave up and wrote Tippecanoe instead. Then still later I went back to make tile-count, to optimize for the one case that datamaps handled really well but that overwhelmed Tippecanoe.

I will probably go back and add angle-and-magnitude attribute support to tile-count, since it is useful for tracking the direction and speed of travel, and has well-defined semantics for averaging points together. But if I add a feature like you are asking for, it will almost certainly be in Tippecanoe instead.

The other hard part of this is that the vector tile format does not support array attributes, so a combined attribute like you ask for would have to be generated as a string containing the array instead. With luck this will get fixed in the next vector tile spec revision.

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

2 participants