Running Mapnik on Windows

Further to my recent post here…
https://community.openstreetmap.org/t/rendering-tiles-with-mapnik-on-windows/3752/2

I now have just about everything set up for Windows. I had to use the Wayback machine to get most of the binaries I need.

I am running Mapnik 2.2.0.
I am not very familiar, and used this page as guidance (which I also did the first time around)
http://openstreetmapserverwindows.blogspot.com/2015/11/osmopenstreetmap-tile-server.html

I have the world boundaries that I found in the section Tile Rendering from the above link.

I am now getting an error…
RuntimeError: failed to initialize projection with: ‘+init=epsg:4326’ encounter
ed during parsing of layer ‘necountries’ in Layer at line 58 of 'osm.xml’

It appears I have to keep the existing osm.xml in place, as I can’t generate a new one. I am running the mapnik with…

cd \OpenStreetMap\mapnik-stylesheets-master

set PATH=H:\OpenStreetMap\mapnik-v2.2.0\lib;%PATH%
set PATH=H:\OpenStreetMap\mapnik-v2.2.0\bin;%PATH%

set PYTHONPATH=H:\OpenStreetMap\mapnik-v2.2.0\python\2.7\site-packages;%PYTHONPATH%
set PATH=c:\Python27;%PATH%

set MAPNIK_TILE_DIR=H:\OpenStreetMap\tiles
set MAPNIK_MAP_FILE=output_osm.xml

generate_xml.py osm.xml output_osm.xml --host localhost --user myuser --dbname osm --symbols symbols/ --world_boundaries world_boundaries/ --port 5432 --prefix osm --password mypassword

(I have removed my user and my password for security)

This is in a batch file.

I then found I needed to install something else, though there appears to be issues. OSGeo4. But, I am now stuck. I apparently need to set a path to proj4 gdal bin and nad, but I can’t find any details about what this is. The OSGeo4 install directory doesn’t have proj4, but it does have gdal, but not bin and nad inside there.

I would really like to get this running again on Windows, as I know very little about Linux.

8 posts - 3 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/running-mapnik-on-windows/4607