[OSM-dev] Algorithm for converting lat/lon into Mercator as used in OSM PostGIS?
Artem Pavlenko
artem at mapnik.org
Sun Mar 11 11:40:50 GMT 2007
Hi Nick,
I'll check this later on.
Artem
On 11 Mar 2007, at 11:24, Nick Whitelegg wrote:
> Hello Artem,
>
>> Nick,
>>
>> see below
>>
>
> Tried this (literally direct copy and paste) but I don't get the
> same answer
> as the Mapnik conversion. For example, with bbox -0.75, 51.02,
> -0.7, 51.07
> here is what I get from a test program:
>
> Mapnik projection conversion, using PROJ.4 (correct with respect to
> the
> PostGIS database):
>
> -83489
> 6591595
> -77923
> 6600425
>
> Older OSM Mercator conversion code:
>
> -83489
> 6624832
> -77923
> 6633685
>
> Your sample code:
>
> -4783602
> 5317872
> -4464695
> 5764860
>
> The last one seems to be in the wrong scale, as the box is supposed
> to be
> about 6km x 9km. Are there any other parameters I need to set?
>
> Thanks,
> Nick
>
More information about the dev
mailing list