I've given up on trying to compile pgsql2sqlite for now and instead made 
some progress on using a georeferenced layer using Gdal. However it 
seems that Mapnik is clipping the image even though I have set the map 
size to the size of the bitmap and used the bitmap envelope.

Here are my input files:

http://files.britishideas.com/public/mapping/osmgeoref.png
http://files.britishideas.com/public/mapping/osmgeoref.pgw

I run this script:

-------------------------------------------
from mapnik import *
m = Map(800,391,'+proj=latlong +datum=WGS84')
m.background = Color('red')
s = Style()
r=Rule()
r.symbols.append(RasterSymbolizer())
s.rules.append(r)
m.append_style('My Style',s)
lyr = Layer('world')
lyr.datasource = Gdal(file='osmgeoref.png')
lyr.styles.append('My Style')
m.layers.append(lyr)
m.zoom_to_box(lyr.envelope())
render_to_file(m, 'demo.png')
save_map(m, 'map.xml')
-------------------------------------------

And here is the output with the top and bottom of the input PNG missing:

http://files.britishideas.com/public/mapping/demo.png

For completeness here is the output XML file:

http://files.britishideas.com/public/mapping/map.xml

I used red as a background colour to highlight the issue. Any ideas what 
  I am doing wrong? I'm sure I'm overlooking something silly.

Thanks!! Andy

-- 
Andy
PGP Key ID: 0xDC1B5864
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to