I am having some issues converting a SQL table to GeoJSON.
This is my connection string:
ogr2ogr -f "GeoJSON" "test.geojson" "MSSQL:server=(LocalDb)\v11.0;database=SpatialDataExamples;tables=test;trusted_connection=yes;Integrated Security=true;DRIVER=SQL Server Native Client 11.0;GeometryType=wkb;" -sql "SELECT * FROM test WHERE ID=1"
If I use the tables parameter, and no SQL, the geojson is exported correctly. If I specify some sql to filter the results, the geometry comes back as binary in the exported file.
I am trying to export a SQL polygon table, to individual documents that I can use in DocumentDB.
Exporting shapefiles directly produces geojson with coordinates in a right hand orientation as opposed to left hand as required by DocumentDB
Any suggestions?