[gdal-dev] how to use the -ct option in ogr2ogr

Markus Metz markus.metz.giswork at gmail.com
Sat Feb 6 13:24:24 PST 2021


On Fri, Feb 5, 2021 at 3:40 PM Karsten Tebling <tebling at masuch.de> wrote:
>
> Hello,
>
> i'm struggling with how to use the -ct option in ogr2ogr and could need
> some help.
>
> i copied a NTv2.gsb to osgeo4w64/share/proj and edited the proj.db by
> inserting a new row in the grid_transformation-table. using this
> transformation in qgis works. however when i try to use it in ogr2ogr
> with the same data i always get "failed to reproject feature (geometry
> probably out of source or destination srs). no known way to write
> feature with geometry 'none'". here is my code:
>
> ogr2ogr -s_srs "EPSG:31468" -t_srs "EPSG:25833" -dim XYZ -ct
> "+proj=pipeline +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1
> +x_0=4500000 +y_0=0 +ellps=bessel +step +proj=hgridshift
> +grids=NTv2LSBB_LSA.gsb +step +proj=utm +zone=33 +ellps=GRS80" -f DXF
> punkte_25833.dxf punkte_31468.dxf
>

Is the grid NTv2LSBB_LSA.gsb used for hgridshift really covering the full
extent of punkte_31468.dxf ?
You can check with "gdalinfo NTv2LSBB_LSA.gsb" and "ogrinfo -so
punkte_31468.dxf".

Markus M

> i'm using the latest qgis-ltr and osgeo4w shell
>
> greetings
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210206/f2b941e6/attachment.html>


More information about the gdal-dev mailing list