Martin,

GDALReprojectImage() expects that a correct geotransform is already set on the target dataset.

You may use GDALSuggestedWarpOutput2() to get a guessed geotransform

Otherwise for full automated way, you may also using the C function GDALWarp().

By the way, your below pipeline looks wrong

|+proj=pipeline +step +inv +proj=krovak +lat_0=49.5 +lon_0=24.8333333333333 +alpha=30.2881397527778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +step +inv +proj=hgridshift +grids=Slovakia_JTSK03_to_JTSK.gsb +step +proj=krovak +lat_0=49.5 +lon_0=24.8333333333333 +alpha=30.2881397527778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +step +proj=webmerc |

After the 3rd step (+proj=krovak), you are in projected coordinate space. Applying +proj=webmerc afterwards doesn't make any sense since the later expects geographic coordinates. You probably want to omit the 3rd step

Even

Le 09/01/2025 à 09:20, Martin Ždila via gdal-dev a écrit :
Dear GDAL developers and users,

I am facing an issue where a custom transformation pipeline defined using PROJ's +proj=pipeline is not being applied when using GDALReprojectImage. The pipeline appears in the debug logs (PROJ_TRACE), but the output image does not reflect the expected transformation.

I have described the issue in detail on StackOverflow, including my code and debugging observations:
https://stackoverflow.com/questions/79341829/why-is-my-custom-transformation-pipeline-not-applied-with-gdalreprojectimage

If anyone has insights into what might be going wrong or how to resolve this, I would greatly appreciate your help.

Thank you!
Best regards,
--
Martin Ždila


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is 
just about bytes.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to