-
-
Notifications
You must be signed in to change notification settings - Fork 117
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 whole-tile postprocess hook #802
Conversation
https://github.com/onthegomap/planetiler/actions/runs/7598162876 ℹ️ Base Logs 328e1b4
ℹ️ This Branch Logs 2b1ff27
|
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Beautiful! |
So if I have two layers, one called "landcover" and one called "climate zone", can I take the landcover polygons, intersect them with the climate zone polygons, and then tag the landcover polygons with the climate zone class that makes the biggest overlap? |
Another use case I would like to try out for this: in some countries and regions there are not many road, but minzooms are usually done at a global level. So when you set minzooms that are good in Europe, the map might be quite empty in Africa. Could I use this new feature to compute road density in each tile and then drop roads accordingly? |
You could definitely do the first one, just need to do some lower-level grouping by tags in java, then JTS operations. If it seems like a common pattern, we could pull it into a reusable utility in planetiler. For the second one you could emit more roads then you need during process step, then filter them out based on # roads in a tile in postprocess, but I'd be concerned about discontinuities at the tile seams? How were you thinking of dropping based on road density? |
Discontinuities will be there at tile boundaries, but I would still like to try it. Filtering could look like this:
|
Add a new
Map<String, List<VectorTile.Feature>> postProcessTileFeatures(TileCoord, Map<String, List<VectorTile.Feature>>)
hook that profiles can implement to post-process features across layers. For example:See #786