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

Tippecanoe metadata file ignoring columns with only null values #822

Open
stdmn opened this issue Dec 19, 2019 · 3 comments
Open

Tippecanoe metadata file ignoring columns with only null values #822

stdmn opened this issue Dec 19, 2019 · 3 comments

Comments

@stdmn
Copy link

stdmn commented Dec 19, 2019

@ericfischer I'm not sure if this is a feature or a bug, but I've been automating the process of converting geojson to tiles using real life (ie, messy) datasets. One thing I've found is that when a field contains only null values for all features, Tippecanoe adds the field to each feature, but ignores the data for the metadata file.

This is a problem for me, as I use the metadata file to format the information from each feature when a feature is selected. I tried using the -pe tag to see if it would retain the column in the metadata, but that didn't seem to do what I was hoping.

I've attached an example zip file which contains two JSON files--an example input JSON and an output metadata file--so that you can try it for yourself. You'll note that a few of the fields are ignored in the metadata but still show up for each feature.

Example input JSON & metadata:
example.zip

Here's the exact command I'm using if that helps:
tippecanoe -f --tile-stats-values-limit=100 -Z9 -Q -z14 -M 2500000 -aN -aD -pS -rg -e <OUTPUT DIR> -ag <INPUT FILE>

@e-n-f
Copy link
Contributor

e-n-f commented Jan 7, 2020

Thanks for the report. Nulls have been kind of neglected because they aren't supported by the vector tile format and therefore can't appear in tiles, but by now make it fairly far along the tiling pipeline so they can be used in conditionals, but still not quite far enough for what you are wanting to do. I'll try to figure out whether I can preserve them a little further.

@e-n-f
Copy link
Contributor

e-n-f commented Jan 7, 2020

I think this is the change you are looking for: #825

I'm still not sure whether it is the right thing to do, when the nulls are not actually represented in the tiles.

@stdmn
Copy link
Author

stdmn commented Jan 9, 2020

This would be immensely helpful. Even if it's just an option that you can include (-nu, --tilestats-include-nulls)

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