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

Even Rouault even.rouault at spatialys.com
Thu Jan 9 09:02:31 PST 2025


> 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 🙂

It makes slightly more sense, but still seems dubious to me

The part "+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" is what you would want to apply to go 
*from* "S-JTSK / Krovak East North"   to  "S-JTSK [JTSK03] / Krovak East 
North"

and then the second part uses the expected Helmert tranformation from 
"S-JTSK [JTSK03] / Krovak East North" to WGS 84, so this pipeline is to 
go from "S-JTSK / Krovak East North" to WebMercator WGS 84.

Perhaps your dataset is mislabelled as being in "S-JTSK [JTSK03] / 
Krovak East North"  whereas it is in "S-JTSK / Krovak East North"  ?


-- 
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250109/c5d01e98/attachment.htm>


More information about the gdal-dev mailing list