[OSM-talk] Algorithm re Count of OSM Tiles
didier2020
didier2020 at free.fr
Mon Sep 23 05:25:06 UTC 2013
just read this ?
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
>I think that needs testing.
>
>Also, it should be pointed out that it is using an approximation for
>calculating the tileX and tileY.
>
>Sent from my iPhone
>
>On Sep 22, 2013, at 10:18 AM, Peter Barth <osm-talk at won2.de> wrote:
>
>> Hi,
>>
>> Arnie Shore schrieb:
>>> All, given a coordinates range and zoom range, is there an
>available
>>> algorithm that will calculate the count of OSM tiles involved?
>>
>> Without rounding and assuming negative values vor lat/lon in case of
>> south/west coordinates and start and end being zoomlevels that are
>> included in the count I think (didn't test it ;)) this should be
>> correct:
>>
>> tilesX = 2^(start-1)*($w-$e)/360
>> tilesY = 2^(start-1)*($n-$s)/180
>> tilesX*tilesY * 4^(end-start)
>>
>> Regards,
>> Peda
>>
>> p.s. you should start a new topic for new questions. However, you
>> replied to another topic and just changed the subject.
>>
>> --
More information about the talk
mailing list