M∡rtin Koppenhoefer wrote:
> 
> 2011/10/3 Gianks <[email protected]>:
>> I've also looked at the Proj4 software and, always stading to what i've
>> understood,
>> it's a cli converter which accept args like:
>> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m
>> +no_defs
>> and convert from lat lon in the desired system.
>>
>> But again, not knowing the correct string to use with OSM is making me
>> unable to obtain the box coordinates.
> 
> 
> The string should be: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
> +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
> +over" if you have your data imported in spherical mercator into your
> db (e.g. with osm2pgsql and the default projection option).
> 
> cheers,
> Martin
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> 

Martin, yes, i'm using the Italy only database downloaded from
planet.osm.org.
Since i'm restricteed to italy, i wish to represent the area between: 42N
12E and 43N 13E

I've started proj with your string, than i've converted coordinates as this:
42 12
4675418.61      1345708.41
43 13
4786738.10      1459732.27

I've changed the app code accordingly:
        Map m(800,600,  "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over");
        m.zoom_to_box(box2d<double>(4675418.61, 1345708.41,
                                                        4786738.10,
1459732.27 ));


STILL GETTING BLANK IMAGE!

Here you can find the non working modified demo code: 
http://pastie.org/2631400 SOURCE 

Please, can you give me hints about what i am doing wrong? 
Does someone have a working mapnik + OSM data in Postgres code example?

Thanks!
Gianluca
-- 
View this message in context: 
http://old.nabble.com/Mapnik-coordinates%2C-zoom_to_box-tp32576024p32581670.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to