[gdal-dev] Transformation works in GDAL2 but cause problems in GDAL3
Even Rouault
even.rouault at spatialys.com
Thu Dec 3 02:19:19 PST 2020
Mattijn,
> Question: how do I define my source raster instance, to avoid using the
> advance `-ct` operator in gdalwarp in GDAL3 during reprojection?
I don't think you can avoid it here. There seems to be an issue in either your
source file or in the HDF5 driver regarding the unit of the ellipsoid axis.
Normally the a and b parameters should be in meters, not kilometers.
> But now with GDAL3 using the same command I get:
>
> ERROR 1: PROJ: proj_create_operations: Source and target ellipsoid do not
> belong to the same celestial body
yes it detects that the source and target ellipsoids are completely different,
which is in most cases involve a non sensical attempt.
> And using the `-ct` operator with GDAL3 I get this:
>
> echo "0.000 -3650.000" | gdaltransform -s_srs '+proj=stere +x_0=0 +y_0=0
> +lat_0=90 +lon_0=0 +lat_ts=60 +a=6378.137 +b=6356.752' -t_srs EPSG:4326 -ct
> '+proj=axisswap +order=2,1 +step' --debug on
Your -ct pipeline should include the full pipeline, not just an axisswap
operation. For gdaltransform, you can remove the -s_srs and -t_srs parameters
when you specify -ct. For gdalwarp / ogr2ogr, you can keep the -t_srs so that
the output dataset has correct CRS information.
Your pipeline should be something like
+proj=pipeline +step +inv +proj=stere +x_0=0 +y_0=0
+lat_0=90 +lon_0=0 +lat_ts=60 +a=6378.137 +b=6356.752 +step +proj=axisswap
+order=2,1
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list