Thank you Even,

I went more low-level and successfully used GDALChunkAndWarpImage
<https://github.com/FreemapSlovakia/freemap-tiler/blob/8e1650b62fe2ca6a784870234810410284bd8263/src/main.rs#L344>.
I also posted answer on SO <https://stackoverflow.com/a/79342516/289827>.

Regarding the pipeline, it could be a bad copy-paste or garbled by
ChatGPT 😀.

Best regards

On Thu, Jan 9, 2025 at 1:11 PM Even Rouault <even.roua...@spatialys.com>
wrote:

> 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
>
-- 
Martin Ždila
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to