I've got some
GEOGRAPHY data in my Sql Server 2008. I wish to export it as a shapefile (so I can import it into QGIS) and when I do, it's rotated 90 degrees to the left and then flipped 180 degrees to the right.
C:\>ogr2ogr -f "ESRI Shapefile" "C:\temp\test.shp" "MSSQL:server=dbserver; database=xwing; uid=xwing; pwd=dbpwd" -sql "SELECT OriginalBoundary FROM Geography Boundaries where LocationId = 18561" -overwrite -lco "SHPT=POLYGON"
Boundary is Sql Server 2008
Boundary loaded into QGIS after using Ogr2Ogr
/me sad panda.