I use Mapnik in an GeoDjango App with Spatialite 4.0 as backend. There is something weird with the tiles that I suspect might be related with a bad handling of mbr with spatialite.
If you look at those two images, the first is the tiles rendered in OpenLayers with a map.zoomToExtent on the features. If you look at the triangle in atlantic ocean you will see that the feature is not rendered entirely by Mapnik. The second image show the entire feature not tiled.
If I zoom in, the triangle continue to not be tiled correctly. If I zoom out a lot it finally appears.
I use this query in Mapnik:
query = '(select ' + geometryField + ', "id" from "shapefile_feature" where' + ' shapefile_id=' + str(shapefile.id) + ') as geom' datasource = mapnik.SQLite(file='C:\mygeosite\sqlite3\sql3.db', table=query, srid=4326, geometry_field=geometryField) featureLayer = mapnik.Layer("featureLayer") featureLayer.datasource = datasource