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've got a MSSQL view containing data I want to show in QGIS. The view transforms a BLOB field containing WKB that is in one of my tables into a SQL geometry, which QGIS will be able to display.

When I connect to a MSSQL source from in QGIS the views aren't showing up. Is there an easy way to get them appearing?

Btw, I'm running QGIS 1.8.0-Lisboa on Windows 7.

Thanks for any help you can offer. Steve

share|improve this question
1  
Why are you storing WKB as a BLOB and not just geometry? –  Nathan W Jan 31 '13 at 6:57
    
Can you also post the view definition. –  Nathan W Jan 31 '13 at 11:40
    
@NathanW, we are storing as WKB because there are systems attaching to this database that use LINQ2SQL in .NET code, which doesn't support the geometry types natively. WKB is more flexible and readily stored/used. Kind of a legacy code issue I guess. In terms of the view definition, it goes something along the lines of: SELECT TheId, geometry::STGeomFromWKB(TheWKB, 0) AS TheGeom FROM Data WHERE TheWKB IS NOT NULL –  Steve Jan 31 '13 at 22:10
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.