[OSM-talk] find corners of exported maps

Olav Kvittem Olav.Kvittem at uninett.no
Fri Dec 19 14:53:12 GMT 2008


Olav Kvittem wrote:
> Dirk-Lüder Kreie wrote:
>   
>> have a look at the debugHelper.pl in tiles at home. it will give you the
>> latlon center of the tile bbox and the latlon of the center of the tile.
>>     
>
> Thanks, but I still don't get it and need some more hints.
> This is about finding the corners of a tile which is a discrete unit
> with discrete center points.
> The tahproject.pm computes the mercator tile height the way I do and
> Tileset.pm also uses 256 pixel tile image size.
> I am guessing that the osmarender export function  deliver tile density
>   for any centerpoint, so I probably need to reach to the guy
> producing the export code or looking at the code itself to know how to
> compute corner coordinates for this : any center, any size "tile".
>
> The exporter takes the geodetic center as a parameter, but I
> expect it to deliver a map evenly around the center of the projection.
> If not I don't see how I can find the corners.
>   

Problem solved, I had of course also made a programming error ..
However the osmarender export function is hereby confirmed to be so that
the geodetic center asked for is at the
center of the projection and consequently of the image
and the image mercator density is according to the given tile level,
using transformations indicated by the code that I was pointed to.

So then you can see the UNINETT and NORDUnet network load map on OSM :
https://drift.uninett.no/kartg/last-osm/osm/europe/geo/nuh//maks/
A big thank you to all OSM people !-)

I plan to use the osm export function to collect about 70 map images 
each european night
with 1s interval between each and hope that's  acceptable.


regards
  Olav
> chuss
> Olav
>
>   
>> Olav Kvittem schrieb:
>>     
>>> Hi,
>>>
>>> I wonder how I compute the coordinates of the corners of the images 
>>> received from the web export function
>>> for an osmarender image. I specify geodetic center position(degrees), 
>>> zoom level and image size and get at nice map image.
>>> The projection is of cource Mercator and I can linearly map mercator 
>>> coordinates onto the image.
>>> But how do I know the coordinates of the corners of the returned image ?
>>>
>>> The url I use is :
>>> http://server.tah.openstreetmap.org/MapOf/index.php?long=10.17456&lat=56.01566&z=6&w=500&h=592&format=png' 
>>>
>>>
>>> The tile-size for each level is 256x256 so given the zoom-level I could 
>>> compute the pixel density from the
>>> world map size in mercator projection.
>>> That works for east direction which is linear, but for the northern 
>>> direction the projection is nonlinear and
>>> I am not sure if the geodetic center that I specify is at the center of 
>>> the returned image or not.
>>>       
>> have a look at the debugHelper.pl in tiles at home. it will give you the
>> latlon center of the tile bbox and the latlon of the center of the tile.
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> talk mailing list
>> talk at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/talk
>>     
>
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
>   





More information about the talk mailing list