<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello All,<br>
Please forgive me if this is not the correct place to post this,
but after my cursory hunting, I can find no better place, plus it may
be of help to others.<br>
<br>
I should point out that all this has been down with SVN revision 1952
and Mapnik version 0.5.1 on a Fedora 8 system<br>
<br>
My build sequence was as follows :-<br>
download and compile mapnik 0.5.1<br>
setup postgis database and fill with osm planet data<br>
test mapnik rendering with osm rendering utilities<br>
checkout gpsdrive, compile and run.<br>
<br>
After several days of false starts, I eventually traced all the
problems I was having with the Mapnik rendering to the following
problems :-<br>
<ol>
<li>the Mapnik input (plug-in) directory was hard coded</li>
<li>only one font was catered for (supplied osm-template.xml used
more fonts and cause problems)</li>
<li>map rendering seemed to be somewhat south of the acutual position<br>
</li>
<li>parameters for setting mapnik database settings not configurable</li>
<li>the trackdir parameter is not used as the path to save track files</li>
<li>minor compile warning about casting to/from int/double</li>
</ol>
Point 6 - put some int casts around mapnik_calcxy equations.<br>
<br>
Point 5 - Not really a problem, more of a niggle - changed references
from homedir to trackdir in the track reading & writing source code.<br>
<br>
Point 3 - I had a problem with the maps produced by the mapnik code.
the center was always some distance south of where it should have
shown. I traced it to the Projection in the mapnik code that used
'+proj=merc +datum=WGS84'. When I replaced this with the projection
from the mapnik example code, the maps looked to be centered correctly.<br>
<br>
Points 1,2,4 - I've added additional config parameters, all beginning
'mapnik_', to allow the setting of<br>
<ul>
<li>xml_file = path and filename of working mapnik xml file</li>
<li>xml_template = path and filename of mapnik xml template file<br>
</li>
<li>input_path = directory where mapnik plug-ins live</li>
<li>font_path = directory where mapnik fonts live</li>
<li>symbols_path = base directory for mapnik symbols</li>
<li>world_boundaries_path = base directory for mapnik world boundary
shapes and db</li>
<li>dbname = name of postgis database (i.e. osm)<br>
</li>
<li>dbprefix = mapnik table prefix in database (i.e. planet_osm)</li>
<li>dbhost = database server host</li>
<li>dbport = database server port</li>
<li>dbuser = username to access database as</li>
<li>dbpass = password for above username</li>
</ul>
Note: dbhost,dbpass,dbuser can be set to '<clear>' to remove
these lines from the generated osm.xml. dbport can be set to '-1' to
have the same effect.<br>
<br>
Additionally, rather than generating the mapnik xml file everytime
gpsdrive is run, I've coded it to check the modification times on both
the xml file (if it exists) and the xml template file and only generate
the xml file if the template is newer.<br>
<br>
Like I said at the top, this may not be the right place to post this
patch, but it may be of benefit to others. <br>
<br>
Mark.<br>
</body>
</html>