I want to calculate GMaps tile numbers that intersect a geometry in a

range of zooms, and was looking for any prior work along these lines.

What I need is a function which takes geom, minimum zoom, and maximum

zoom and returns a set of z,x,y which intersect the geometry.

My initial naive idea is to write a recursive query which starts at

minzoom, finds intersecting tiles, then for each intersecting tile finds

intersecting tiles at zoom z+1 until maxzoom is reached.

Implementations of this idea outside of postgis are

https://github.com/openstreetmap/osm2pgsql/blob/master/expire-tiles.cpp
and

https://github.com/openstreetmap/chef/blob/master/cookbooks/tile/files/default/ruby/expire.rbHas anyone done this before?

_______________________________________________

postgis-users mailing list

[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users