[gdal-dev] ogr2ogr project/transform CRS in the same database table

Mark Johnson mj10777 at googlemail.com
Wed Dec 2 05:30:34 PST 2020


See MSSQLSpatial - Microsoft SQL Server Spatial Database — GDAL
documentation

https://gdal.org/drivers/vector/mssqlspatial.html

The MS SQL Spatial driver passes SQL statements directly to MS SQL by
default, rather than evaluating them internally when using the ExecuteSQL()
call on the OGRDataSource, or the -sql command option to ogr2ogr. Attribute
query expressions are also passed directly through to MSSQL. It’s also
possible to request the OGR MSSQL driver to handle SQL commands with the
OGR SQL engine, by passing “OGRSQL” string to the ExecuteSQL() method, as
the name of the SQL dialect.

Since you are using -dialect sqlite, it is not clear (to me) who is
executing the spatial commands.

In MS SQL, the spatial command don't contain the '_' as elsewhere in
spatialite and postgis. I also don't see a ST_Transform command listed.

STAsText (geometry Data Type) - SQL Server | Microsoft Docs

https://docs.microsoft.com/en-us/sql/t-sql/spatial-geometry/stastext-geometry-data-type?view=sql-server-ver15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201202/28b22d6c/attachment.html>


More information about the gdal-dev mailing list