2

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

3
  • 1
    Why are you storing WKB as a BLOB and not just geometry?
    – Nathan W
    Jan 31, 2013 at 6:57
  • Can you also post the view definition.
    – Nathan W
    Jan 31, 2013 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, 2013 at 22:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.