-
I would like to cluster buildings by distance and then use the clusters to make village and city polygons. In QGIS, this roughly looks like this: Here is a zoom in: The steps are:
Is it possible to do something similar in Planetiler? I think this could be very useful to generate village and city polygons for lower zoom levels, i.e., for a landcover dataset... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Would it work to do this at the tile level? Those operations are all available through JTS, in fact they are very similar to the polygon merging code which does a dbscan clustering then buffer/union/unbuffer. You could either pull the internal utilities out and skip the unbuffer step to get something similar, or replace the union with doing a concave hull, or to get exactly the same thing you could have the "process" step pass through building vertices, then in post process do the dbscan/concave hull/buffer steps. You just need to make sure your tile buffer in "process" step includes enough space on either side of the tile that the shapes will line up at tile seams. |
Beta Was this translation helpful? Give feedback.
Doing it ahead of time sounds like it makes sense too. Planetiler is currently set up to efficiently do any sort of transformation on individual features (computing lake centerlines, polygon centroids, ...) any sort of transformation on many features in a rendered tile in tile pixel coordinates (polygon merging, collapsing carriageways into a single line, ...), but it's not set up to efficiently transform many features that span many tiles.
The OpenMapTiles profile does this with the
boundary
layer and theagg_stop
attribute on transit stop POIs by storing features duringprocess
and processing them infinish
after the entire input source has been read - which works for a small number of …