I'm trying to import vector data into SAGA GIS from a SQLExpress 2008 server. Firstly is this possible?

I would have thought using an OGR VRT layer would have been the way to do it, I've attached a sample of my vrt file, any help would be great.

<OGRVRTLayer name="tempGeom">
    <SrcSQL>select *, geometry::STGeomFromText('POINT (' + CAST(x AS VARCHAR) + ' ' + CAST(z AS VARCHAR) +' '+ CAST(y AS VARCHAR) +')',0) as geom  from dbo.testTable</SrcSQL>

  • 1
    are you sure that SrcDataSource string is correct. I have never seen (local) in a connection string before, I normally use localhost\SQLEXPRESS – Nathan W Mar 28 '11 at 3:48
  • I've tried localhost and pc name no luck. – Jamo Mar 28 '11 at 6:11
  • did you ever solve this problem? I have a similar issue - I have defined a OGR VRT layer that points to SQL Server 2008, and which ogrinfo verifies as ok, but mapnik reports as "unable to open datasource". – Alastair Aitchison Jun 16 '11 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.