[OSM-dev] JSON/GeoJSON output format for 0.6 api

Ævar Arnfjörð Bjarmason avarab at gmail.com
Thu Jun 4 18:48:30 BST 2009


2009/5/31 Frederik Ramm <frederik at remote.org>:
> Hi,
>
> Tels wrote:
>> Well, one could fetch the data at z17, see it is below some
>> $ARBITRARY_THRESHOLD, zoom out to z16m, fetch again, and if still below
>> $THRESHOLD, repeat it until either there is too much data (display
>> message) or the user-requested zoomlevel was reached.
>
> I think the tiles at home folks already keep a database that says how
> complex each level-12 tile is. So if we were not so busy telling them
> how they're technologically backwards and how their whole project is
> rubbish, they might just give us that.

Each t at h user uploads a tileset at z12, which is indeed a pretty good
indicator of the complexity of the area, see this heatmap rendering of
the world at z12 from the t at h data:

http://u.nix.is/~avar/osm-heatmap-black.png

I made if after requesting the z12 tileset sizes on the t at h list:

http://lists.openstreetmap.org/pipermail/tilesathome/2009-May/005859.html

The code to generate it is under applications/rendering/tah-heatmap in SVN:

http://trac.openstreetmap.org/browser/applications/rendering/tah-heatmap/README

In particular the parse-filesize.pl script in that directory converts
ls -R format provided by spaetz to an easy-to-use CSV format, e.g.:

  0000,1042       158211
  0000,1043       203915
  0000,1055       172469
  0000,1056       80728

t at h currently has around a million z12 tiles, or ~5.6% of potential z12 tiles:

  $ wc -l tile-sizes.dat
  937254 tile-sizes.dat

It would be easy to make a web service which kept these tile sizes in
a hash table and told e.g. Potlatch whether or not the z13 tile it's
requesting is part of a z12 area that's say 10 times bigger than the
median z12 tile. Which should cover the yellow/read areas on the above
heatmap.




More information about the dev mailing list