Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

<OGRVRTDataSource>
<OGRVRTLayer name="tempGeom">
    <SrcDataSource>MSSQL:server=(local)\SQLEXPRESS;database=test;trusted_connection=yes</SrcDataSource> 
    <SrcSQL>select *, geometry::STGeomFromText('POINT (' + CAST(x AS VARCHAR) + ' ' + CAST(z AS VARCHAR) +' '+ CAST(y AS VARCHAR) +')',0) as geom  from dbo.testTable</SrcSQL>
</OGRVRTLayer>

share|improve this question
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.