Martijn van Oosterhout wrote:
> The most reasonable possibiliy is that you got the projections in the
> config file wrong. In particular the coordinates are interpreted in
> terms of the projectopn defined in the top Map element and then
> converted to the projection listed in the Layer element. Check that
> both are correct (and that you don't have estimate extent on).
> Also, I suggest you turn on statement logging on the database so you
> can see what's actually being requested.
For sure I get now totally wrong coordinates for PostGIS query.
I tried to give in generate_image.py a box sized 1000 by 1000 meters in Finnish
KKJ projection directly by inserting minX, minY, maxX, maxY values inside
Envelope.
bbox = Envelope(3376400,6672200,3377400,6673200)
The beginning of my osm.xml version looks like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map bgcolor="#b5d0d0" srs="+proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000
+x_0=3500000 +y_0=0 +ellps=intl
+towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m">
What hits PostGIS when running generate_image.py is like this:
select asbinary(way) as geom from (select way from shoreline_a) as "coast-poly"
where way && setSRID('BOX3D(2759544.121025309
8407730.793307768,3647111.662483945 8433668.39815172)'::box3d,900913)
So the bbox is something like 25 by 887 kilometers and in quite a different
place that I was hoping for.
I have used the same proj4 strings in osm.xml as I always use with Finnish KKJ
so they should be correct. I suspect that I should't give KKJ coordinates for
Envelope.
-Jukka-
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users