Now I need to do something with it, because the mapnik stylesheets that I set up to use the shapefiles will not work - need to change it to use the postgresql database instead.
The things that need changing are:
- Add the layers and datasources in XML (no need to do it in python now I don't have hundreds of separate datasources).
- Convert the styles to use lowercase letters for the fields ('featcode' rather than 'FEATCODE') - postgresql seems to be case sensitive, and they have gone into the database lower case, but were upper case in the shapefiles.
Sounds easy, but I decided I don't want it to look like the OSM stylesheet, which is a bit garbled - I want a nice structure to make it easy to maintain. I could have used XML entities, but that seems a bit crude - define an entity, then 'use' it to actually 'call' it. Includes seem much more suitable....But to get includes working I need mapnik2. I have put a basic structure at code.google.com/p/ntmisc/vmdmap, but still have a few issues:
- I have had to define the database parameters manually because entities do not seem to be working in the include files, which is no good!
- The output is transparent background with black lines (see picture below), which is not what I asked for - not sure if this is a problem with the style file, or my build of mpanik2 - I'll have to run some tests on mapnik2 to make sure it works right.
- But it's too late to fix it now - job for tomorrow!