[OSM-dev] [Tilesathome] I'd like a list of the file size of all z12 tilesets

Eddy Petrișor eddy.petrisor at gmail.com
Tue Jun 2 11:13:04 BST 2009


Ævar Arnfjörð Bjarmason a scris:
> 2009/6/1 Eddy Petrișor <eddy.petrisor at gmail.com>:
>> 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.
> 
> I tried generating a map with log($size)/log($max):
> 
> http://u.nix.is/~avar/osm-heatmap-log.png
> 
> I tried playing around with it a bit more, e.g. by using log10. But
> mostly I get maps that are too hot. Or was log($size)/log($max) not
> what you meant?

I was aiming more towards what Robert said and looking at the scale of
your values (avg is 2 orders of magnitude higher than min, max is 2
orders of magnitude higher than avg) I expect an improved result when
looking at the normalized (relative to log(min) result).

OTOH I am a pinch worried that it might be too cold on the high part of
teh spectrum, since while min and avg are around the half of their
orders of magnitude (both are start with 5), the max is a little lower
in the high 3-4 zone.


If that is the case (you find the heat zones are not hot enough) you
could try to punch up the colours by adding some constant to the
logarithm based function of the input:

e.g. (log($size) - log($min) + 0.5) / (log($max) - log($min))

which for your numbers could be approximated to:

(log($size) - 3.23) / log ( $max / $min )

aproximated further to:

log($size)/3.85 - 0.84

Which is quite simple to calculate.


Later play with the offset (0.84) to adjust the heat levels and see what
works best.

> $size / ($median * 32) works pretty well though:
> 
> http://u.nix.is/~avar/osm-heatmap-black-2.png
> 


-- 
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090602/9e2026a7/attachment.pgp>


More information about the dev mailing list