Hi Carl,

Welcome! This can be a red-herring but are you really running  
postmaster on port 54323?
The default one is 5432

Artem

On 20 Feb 2008, at 09:26, Carl Heinze wrote:

> Hi to all,
>
> i'm absolutly new to mapnik. I installed the binaries on windows  
> and rundemo.py worked fine.
>
> Now I want to start my first own map. I started with the OSM-Data,  
> saved in PostGIS (e.g. in "planet_osm_roads"). I only get an image  
> with nice mintgreen background without anything rendered on it.
>
> 1. I used generate_image.py:
>
> from mapnik import *
> import sys, os
>
> if __name__ == "__main__":
>     try:
>         mapfile = os.environ['MAPNIK_MAP_FILE']
>     except KeyError:
>         mapfile = "osm.xml"
>     map_uri = "image.png"
>
>     #---------------------------------------------------
>     #  Change this to the bounding box you want
>     #
>
>     ll = (7.0, 47.5, 8, 47.6)
>
>     #---------------------------------------------------
>
>     z = 10
>     imgx = 500 * z
>     imgy = 1000 * z
>
>     m = Map(imgx,imgy)
>     load_map(m,mapfile)
>     prj = Projection("+proj=longlat +ellps=WGS84 +datum=WGS84  
> +no_defs")
>     c0 = prj.forward(Coord(ll[0],ll[1]))
>     c1 = prj.forward(Coord(ll[2],ll[3]))
>     bbox = Envelope(c0.x,c0.y,c1.x,c1.y)
>     m.zoom_to_box(bbox)
>     im = Image(imgx,imgy)
>     render(m, im)
>     view = im.view(0,0,imgx,imgy) # x,y,width,height
>     view.save(map_uri, 'png')
>
>
>
> 2. The relevant parts of osm.xml look like:
>
> <Map bgcolor="#b5d0d0" srs="+proj=longlat +ellps=WGS84 +datum=WGS84  
> +no_defs">
>
> ....
>
> <Layer name="roads" status="on" srs="+proj=longlat +ellps=WGS84  
> +datum=WGS84 +no_defs">
>    <StyleName>roads-casing</StyleName
>  <StyleName>roads</StyleName>
>     <Datasource>
>       <Parameter name="type">postgis</Parameter>
>       <Parameter name="host">localhost</Parameter>
>       <Parameter name="port">54323</Parameter>
>       <Parameter name="user">postgres</Parameter>
>       <Parameter name="password">postgres</Parameter>
>       <Parameter name="dbname">gis</Parameter>
>       <Parameter name="table">(select * from planet_osm_roads order  
> by z_order) as roads </Parameter>
>       <Parameter name="estimate_extent">false</Parameter>
>       <Parameter name="extent">779236,5942077,890555,19044</Parameter>
>     </Datasource>
>    </Layer>
>
>
> 3. My Postgres-Log says:
>
> ERROR:  BOX3D parser - couldnt parse.  It should look like: BOX3D 
> (xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)
> STATEMENT:  select asbinary(way) as geom,"railway" from (select *  
> from planet_osm_roads order by z_order) as roads where way &&  
> setSRID('BOX3D(7.999999999999998 48.22062728491966,1.#INF  
> 1.#INF)'::box3d,4326)
> LOG:  unexpected EOF on client connection
> LOG:  unexpected EOF on client connection
> LOG:  unexpected EOF on client connection
> ERROR:  BOX3D parser - couldnt parse.  It should look like: BOX3D 
> (xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)
> STATEMENT:  select asbinary(way) as geom,"railway" from (select *  
> from planet_osm_roads order by z_order) as roads where way &&  
> setSRID('BOX3D(7.999999999999998 48.22062728491966,1.#INF  
> 1.#INF)'::box3d,4326)
> LOG:  unexpected EOF on client connection
> LOG:  unexpected EOF on client connection
> ERROR:  BOX3D parser - couldnt parse.  It should look like: BOX3D 
> (xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)
> STATEMENT:  select asbinary(way) as geom,"railway" from (select *  
> from planet_osm_roads order by z_order) as roads where way &&  
> setSRID('BOX3D(7.999999999999998 48.22062728491966,1.#INF  
> 1.#INF)'::box3d,4326)
> LOG:  unexpected EOF on client connection
> LOG:  unexpected EOF on client connection
> LOG:  unexpected EOF on client connection
>
>
> -- By outcomenting the parts concerning the projection in osm.xml  
> and generate_image.py I got rid of the BOX3D-Error statements - but  
> the LOG-Errors stayed and there was no successfull query reported  
> by the log.
>
> Could anyone please give me a working minimal example for my  
> environment (mapnik-0_5_0, WinXP, PostGIS1.3)?
>
> Thanx a lot,
>
> greetings from germany, Carl
> -- 
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>

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

Reply via email to