On Jun 20, 2011, at 10:50 AM, Alastair Aitchison wrote:

> Unfortunately, creating these didn’t help in this case anyway – I’m still 
> getting the same error in Mapnik. Just to be clear – I’m able to read and 
> write spatial data to this SQL Server table using OGR2OGR, which is why I 
> thought it might be mapnik issue (however, I’m certainly no expert with OGR 
> either!)


Hi Alastair,

That error is actually not coming from Mapnik, but from OGR. Mapnik's OGR 
plugin is simply catching it and reporting it. So, something must be wrong in 
how the Mapnik OGR plugin is forming up the layer creation.

I grepped the OGR source code and found the error is being through here:

http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/vrt/ogrvrtlayer.cpp#L311

Perhaps we need to open the datasource in shared mode? (which would need to be 
exposed in the Mapnik OGR plugin as an option).

What I would recommend you do is to try to test a different VRT that points to 
something simple like a CSV file of long/lat. 
(http://www.gdal.org/ogr/drv_csv.html). Just some simple test case to confirm 
that Mapnik and OGR are playing nicely - that would help point with more 
clarity to some issue of not properly passing the right options to ogr to open 
the db connection.

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

Reply via email to