[gdal-dev] Issue with Custom Transformation Pipeline in GDALReprojectImage

Martin Ždila m.zdila at gmail.com
Thu Jan 9 08:49:33 PST 2025


On Thu, Jan 9, 2025 at 4:53 PM Even Rouault <even.rouault at spatialys.com>
wrote:

>
> > Regarding the pipeline, it could be a bad copy-paste or garbled by
> > ChatGPT 😀.
>
> I wouldn't trust ChatGPT to come with geodesic-relevant pipelines... If
> you aren't really sure about what you are doing, you'd better let PROJ
> infer a reasonable pipeline.
>

Actually it was not ChatGPT what created this pipeline. I pasted a proper
pipeline to it and it helped me to generate SO question, so it may have
garbled it.

Anyway a proper pipeline I use for years is:

+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 +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 +proj=push +v_3 +step +proj=cart +ellps=bessel +step
+proj=helmert +x=485.021 +y=169.465 +z=483.839 +rx=-7.786342 +ry=-4.397554
+rz=-4.102655 +s=0 +convention=coordinate_frame +step +inv +proj=cart
+ellps=WGS84 +step +proj=pop +v_3 +step +proj=webmerc +lat_0=0 +lon_0=0
+x_0=0 +y_0=0 +ellps=WGS84

It is the official pipeline provided by our national cartography office,
together with Slovakia_JTSK03_to_JTSK.gsb file. Without this pipeline the
offset varies up to more than 10 meters. With the pipeline the transformed
geotata matches that from state office's WMS 🙂

BTW ChatGPT helped me in solving this problem a lot. Without it I would
maybe just gave it up as it is a hobby project.

And more generally, people posting issues/questions written partially or
> totally written by generative "IA" should really mention it to set
> expectations to readers
>

Thank you. I've just learned that even the pipeline was not the cause (but
could be) 🙂

-- 
Martin Ždila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250109/5d0ba264/attachment.htm>


More information about the gdal-dev mailing list