Thanks so much for taking the time to reply Dane,
I tried a simple VRT that loaded data from a CSV file and that worked fine - I could successfully create both a point layer defined using <GeometryField encoding="PointFromColumns" x="x" y="y"/> and also a polyline layer from a column of Well-Known Text in the CSV file, using <GeometryField encoding="WKT" field="WKT"/>. They both rendered beautifully, so no problems there ;) I would try to build mapnik in debug mode but, if I'm honest, it took me the best part of three days to compile it the first time round and now that it seems to be (nearly) working, I'm reluctant to risk breaking it again! I don't suppose there is a precompiled debug windows binary for download anywhere? I'll continue to try tweaking the SQL Server DB connection settings and see if anything makes a difference. Thanks for your assistance. From: Dane Springmeyer [mailto:[email protected]] Sent: 27 June 2011 6:37 AM To: Alastair Aitchison Cc: [email protected] Subject: Re: [Mapnik-users] Rendering data from MS SQL Server 2008 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/ogrvrtlaye r.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 _____ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1388 / Virus Database: 1513/3728 - Release Date: 06/26/11
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

