[OSM-dev] OSM PBF and spatial characteristics of blocks
andrew at fastmail.net
Wed Jan 6 12:13:16 UTC 2016
> On 06 Jan 2016, at 03:40, Stadin, Benjamin <Benjamin.Stadin at heidelberg-mobil.com> wrote:
> Does your Vanilla Extract consider overlapping polygons? Like if you export a small area within a country, does it add the country's polygon that overlaps the area?
> It looks pretty interesting though. I'm not sure where to start at, yet I thinkit will be good to combine features from TileMaker and Vanilla Extract.
Our spatial indexing is rather crude and tile-based. This is intentional to keep it small and simple. We have a grid of cells which correspond to the web mercator tiles at a single zoom level, and every OSM object is assigned to one tile only. This is problematic for objects that span multiple tiles. Also note that free-floating nodes which are not included in any way are not reachable using the current index. For our applications we just haven’t needed to index free-floating POI nodes yet, and don’t need large administrative borders or huge area polygons.
Obviously in the long term we’ll want to improve the index to handle these cases. Both of these limitations should be straightforward to overcome. To index large polygons as areas and you’d either need some kind of multi-level index (rectangle tree or “pyramids") or just accept rasterizing area polygons into all the index cells they overlap (a polygon’s ID appearing repeatedly, in every tile it overlaps).
So the indexing system would need some work for your application. But I thought the two underlying storage systems for OSM data could be useful to you.
More information about the dev