[gdal-dev] gdalwarp cutline shift between raster and vector in GDAL 2.3.2
Even Rouault
even.rouault at spatialys.com
Mon Dec 17 07:04:36 PST 2018
On lundi 17 décembre 2018 14:25:02 CET Pedro Venâncio wrote:
> Hi Andre,
>
> Given the magnitude of the shift, I suspected that could be due to the lack
> of +towgs84 parameters of ESRI 102164.
What version of PROJ does your GDAL 2.3.2 build use ? PROJ 5 ?
And your GDAL 2.2.2 build: PROJ 4 ?
If so, that might explain things. The ESRI:102164 translated as a proj string
has no +towgs84, whereas EPSG:20790 has.
With PROJ 4 and how GDAL uses it, due to the absence of a +towgs84 in one of
the source/target CRS, no datum shift is performed, which is what is expected.
With PROJ 5 and how GDAL 2.3.2 uses it, a unwanted datum shift is done (it is
a bit like if the ESRI 102164 had an implicit +towgs84=0,0,0).
I've traced this as https://github.com/OSGeo/gdal/issues/1156
So yes defining -s_srs EPSG:20790 -t_srs EPSG:20790 is the best way to make
sure all CRS are equal to avoid any reprojection attempt.
(the fact that your GDAL 2.2.2 build doesn't find EPSG:102164 is another
issue, probably missing GDAL_DATA, and unrelated, since it doesn't need to be
able to resolve it)
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list