[gdal-dev] Forcing -vshift in Gdal Python API
Michal Girmala
Girmala at photomap.sk
Fri Jul 26 04:58:16 PDT 2024
Hello all,
I am trying to reproject elevation raster with gdalwarp in python Gdal API using a transformation defined by -ct string
kwargs = {
"format": 'GTiff',
"resampleAlg": "cubic",
"multithread":True
}
kwargs.update({"coordinateOperation":"+proj=pipeline +step +inv +proj=utm +zone=34 +ellps=GRS80 +step +proj=push +v_3 +step +proj=cart +ellps=GRS80 +step +inv +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=bessel +step +proj=pop +v_3 +step +proj=hgridshift +grids=.\\pipeline\\Slovakia_JTSK03_to_JTSK.gsb +step +proj=vgridshift +grids=.\\pipeline\\Slovakia_ETRS89h_to_Baltic1957.gtx +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" })
kwargs.update({"srcSRS":"EPSG:25834","dstSRS":"EPSG:5514"})
warp = gdal.Warp(out_raster,in_raster,**kwargs)
The horizontal reprojection works fine but I can´t force the Gdal to use an elevation shift grid file, because my CRS does not have a vertical system defined.
In the Gdal utility, I can easily do this by using -vshift parameter, but I don´t know how to do this with Python API since osgeo.gdal.WarpOptions does not contain this parameter.
Is there a way, how to force vertical transformation?
Thank you.
Best regards,
Ing. Michal Girmala
+421 908 133 793 girmala at photomap.sk<mailto:girmala at photomap.sk>
+421 55 685 4396 www.photomap.sk<https://photomap.photomap.sk/owa/redir.aspx?C=TkX_pwO3Cdy8-2srzfDp5ctFQ587EpI-9faJi0uprt0fCrd688PWCA..&URL=http%3a%2f%2fwww.photomap.sk%2f>
_ _
P Pred vytlačením tohto mailu prosím zvážte dopad na životné prostredie.<https://photomap.photomap.sk/owa/redir.aspx?C=tvo5neA_o2nG-tVUhKJQSd_SbCbRRCf3YD7l8laI8Q4fCrd688PWCA..&URL=http%3a%2f%2fthinkbeforeprinting.org%2f>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240726/37f4d192/attachment.htm>
More information about the gdal-dev
mailing list