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

Split file by day? #8

Open
Mike-Honey opened this issue Sep 16, 2019 · 2 comments
Open

Split file by day? #8

Mike-Honey opened this issue Sep 16, 2019 · 2 comments

Comments

@Mike-Honey
Copy link

Would this project work better if we split the input shapefile into individual days?

I had a thought - while the dataset for a month or several months is quite large, the data for a single day would be a lot smaller and easier to process (simplification, tippecanoe etc). This does assume that the data for previous days doesn't change.

For the mapbox visual to work, the script would need to append all the days in the desired range (e.g. last 3 months) into one mbtiles file before uploading to mapbox. I'm not sure if you can append mbtiles files, that might need to happen upstream.

@Mike-Honey
Copy link
Author

Mike-Honey commented Sep 17, 2019

I found this in the tippecanoe doco:
https://github.com/mapbox/tippecanoe#input-files-and-layer-names

It looks like the -l option would combine multiple geojson files into one layer in a single mbtiles output file. So the python script would need to build a long command line of all the daily files.

@Mike-Honey
Copy link
Author

The output file needs a unique attribute - a ROW_NUMBER that restarts each day wouldn't work when the Mapbox visual tries to filter the data. Could you create a concatenation of the Date & ROW_NUMBER?

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

1 participant