Ævar Arnfjörð Bjarmason a scris: > 2009/5/21 Ævar Arnfjörð Bjarmason <ava...@gmail.com>: >> On Wed, May 20, 2009 at 6:53 PM, Sebastian Spaeth <sebast...@sspaeth.de> >> wrote: >>> Ævar Arnfjörð Bjarmason wrote: >>>> I want to play with producing a heat map of the globe where "heat" is >>>> determined by the relative size of t...@h tilesets at z12. >>>> >>>> I could also use the tiles themselves, but I suppose the tilesets will >>>> be a better indicator of complexity. But whatever's easy. >>>> >>>> Could someone with access to the t...@h servers pretty please generate >>>> this for me? :) >>> 20:51 < spaetz> http://tah.openstreetmap.org/media/filesizes.bz2 >>> 20:52 < spaetz> result of ls --file-type -l -R > filesizes >>> 20:52 < spaetz> takes some grepping, and cutting to get the raw sizes, >>> but the >>> info is in there. >> I converted it to something better using a hacky ad-hoc script (attached): >> >> http://u.nix.is/~avar/tile-sizes.txt.bz2 > > I went ahead and created a renderer so it now makes a heat map, it's > under applications/rendering/tah-heatmap in svn: > > http://trac.openstreetmap.org/changeset/15441 > > Example output here: > > http://u.nix.is/~avar/osm-heatmap.png > > And how to run it: > > http://trac.openstreetmap.org/browser/applications/rendering/tah-heatmap/README > > Ideally this map would be mostly red around large capital areas and > blue along most of the coastline and other sparsely mapped areas. But > the heatmap() function I ripped from ViewCVS takes values between 0 > and < 1 (which I normalize to with $tile_size/$max_tile_size) and > since most tiles fall towards the lower end of the size spectrum the > map ends up being mostly blue. > > I've been trying to find an algorithm which would intelligently > distribute these values so I'd get the blue/yellow/green/red colors > which compose the canonical heat map, but such numeric crunching isn't > my strongest side. Help would be appreciated.
Use a logarithmic scale for your "heat" input (probably is best to use 10 as the base). So instead of min use log(min), instead of max, use log(max) and so on. > These are the min/max/average/median t...@h tile sizes, for reference: > > Min = 5472 > Max = 38211510 > Average = 551490 > Median = 227879 > Number of tiles = 937254 -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev