Hey Andy,<br><br>Thanks for the help. That was sound advice, working backwards from generate_image.py and the osm.xml was quick and easy. Definitely a good approach. <br><br>I think the two problems I had were that the datasource is spherical mercator so I changed the srs of the layer but also I think that I needed to use the <span style="font-family: courier new,monospace;">m.zoom_to_box(bbox)</span>function in the code, otherwise I'm guessing it tries to render a whole world view so my little insignificant streets in London wouldn't even register at pixel level :)<br>
<br>Works a charm now it seems.<br><br>Thanks Andy!<br>Colm<br><br><div class="gmail_quote">On Wed, Jan 13, 2010 at 13:57, Andy Allan <span dir="ltr"><<a href="mailto:gravitystorm@gmail.com">gravitystorm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Wed, Jan 13, 2010 at 1:12 PM, Colm McMullan <<a href="mailto:colm.mcmullan@gmail.com">colm.mcmullan@gmail.com</a>> wrote:<br>
<br>
> <Map bgcolor="#ffffff" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0<br>
> +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs -tl -r"><br>
> <Style name="line style 2"><br>
> <Rule><br>
> <LineSymbolizer><br>
> <CssParameter name="stroke">#000000</CssParameter><br>
> <CssParameter name="stroke-width">3.0</CssParameter><br>
> </LineSymbolizer><br>
> </Rule><br>
> </Style><br>
> <Layer name="layer 4" srs="+proj=latlong +ellps=WGS84 +datum=WGS84<br>
> +no_defs" status="on"><br>
> <StyleName>line style 2</StyleName><br>
> <Datasource><br>
> <Parameter name="type">postgis</Parameter><br>
> <Parameter name="host">localhost</Parameter><br>
> <Parameter name="user">postgres</Parameter><br>
> <Parameter name="dbname">gis</Parameter><br>
> <Parameter name="estimate_extent">true</Parameter><br>
> <Parameter name="table">planet_osm_roads</Parameter><br>
> </Datasource><br>
> </Layer><br>
> </Map><br>
<br>
><br>
</div><div class="im">> So I'm a bit stumped, what am I missing? Has anyone got any suggestions?<br>
<br>
</div>My rule of thumb with Mapnik is "it's always a projection problem".<br>
Are you sure that your db is in latlong? By default osm2pgsql is in<br>
spherical mercator.<br>
<br>
If that's not it, I'd suggest starting with the generate_image.py and<br>
the osm.xml from OSM SVN, and get that working with all the defaults<br>
as described on the wiki. You can then step through changes one at a<br>
time (e.g. changing your db to latlong instead of spherical mercator,<br>
using your own style instead of osm.xml and so on.<br>
<br>
Cheers,<br>
<font color="#888888">Andy<br>
</font></blockquote></div><br>