I have a table in SQL Server with an STSrid of 0. I would like to convert this table to GeoJSON using ogr2ogr. The problem is, despite converting to EPSG:4326, the resulting coordinates are not valid (verified using GeoJSONLint). The GeoJSON file's crs key lists the coordinate reference system as the desired CRS84, but the feature coordinates are far too large.
A sample feature appears as such:
{ "type": "Feature", "properties": { "TR": "00028" }, "geometry": { "type": "Point", "coordinates": [ 447366.18450000137, -920054.45910000056 ] } }The output coordinates as seen above are identical to the input:
select TR, Shape.STX, Shape.STY from
where TR = '00028'results in:
00028 447366.184500001 -920054.459100001I'm entering the following ogr2ogr command:
ogr2ogr -f "GeoJSON" "sqlexport.json" "MSSQL:server=[server];database=[db];trusted_connection=yes;" -sql "select TR, Shape from
A sample feature appears as such:
{ "type": "Feature", "properties": { "TR": "00028" }, "geometry": { "type": "Point", "coordinates": [ 447366.18450000137, -920054.45910000056 ] } }The output coordinates as seen above are identical to the input:
select TR, Shape.STX, Shape.STY from
00028 447366.184500001 -920054.459100001I'm entering the following ogr2ogr command:
ogr2ogr -f "GeoJSON" "sqlexport.json" "MSSQL:server=[server];database=[db];trusted_connection=yes;" -sql "select TR, Shape from