-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Improve runtime for small areas #478
Comments
The biggest issues are natural earth and water polygons since planetiler has to deserialize every feature for the whole planet. One idea would be to switch natural earth to read the geopackage source, and use the built-in spatial index to limit what we read to only what's inside the bounding box. I'm not sure if we could do something similar with water polygons since they are just a zipped shapefile with a shp and shx file but no sbn or sbx. If we convert it to a different format we could add an index, but that complicates things quite a bit since we can't just download directly from the source. cc/ @bdon |
At the most extreme we could define a Otherwise we might be able to read the Shapefile index if one is included for water polygons, or migrate to another indexed format for it (Geopackage, FGB?) |
Another hybrid option might be to compute a spatial index the first time we read a file and use it to speed up subsequent reads? |
Or ask the maintainers of the water polygons source if they'd be up for distributing in geopackage format/adding a spatial index. |
Another low hanging fruit would be to keep the unzipped file contents around between runs |
Context on Geopackage etc output from osmcoastline: osmcode/osmcoastline#35 (comment) |
For the Natural Earth / geopackage case, we can also have profiles declare the limited set of tables that they're interested in and skip reading features that won't be processed. |
Proposal here #635 This addresses Natural Earth and other bring-your-own geopackages. For water and land polygons I'd be happy to mirror those via cloud storage bucket in indexed GPKG format, or we can attempt to add that to the upstream data source. |
Planetiler takes ~30 seconds to run even for the smallest areas (like andorra from geofabrik). Let's see if there is any way to improve that. Here's a summary of runtime over andorra:
The text was updated successfully, but these errors were encountered: