Thanks Even,

Still some discrepancy.

*Python (don't work but no error and no output ):
*src_ds = gdal.Open("I:\indata\VPDsc\VPD_scalar.tif")
    #1 GDALWARP to warp all bands in one go
    options = gdal.WarpOptions(options=srcSRS="EPSG:4326", dstSRS="EPSG:32628", xRes=20.0, yRes=20.0, resampleAlg="bilinear", format='GTiff', outputBounds=[453123, 1702425, 454123, 1703425])
    newfile = gdal.Warp(out_path+"tmp.tif", src_ds, options=options)

*Command line work ok:*
    gdalwarp -s_srs EPSG:4326 -t_srs EPSG:32628 -overwrite -tr 20 20 -wm 9000 -multi -r near -te 453123 1702425 454123 1703425 -te_srs EPSG:32628 /cygdrive/i/indata/VPDsc/VPD_scalar.tif /cygdrive/i/data/SNDHR/VPDsc/VPD_scalar_test.tif

Assuming using -te_srs and -t_srs are redundant?
("*outputBoundsSRS* – SRS in which output bounds are expressed, in the case they are not expressed in dstSRS")

Regards
/Jonas
On 02/11/2022 12:03, Even Rouault wrote:

Jonas,

The doc is at:

https://gdal.org/api/python/osgeo.gdal.html#osgeo.gdal.TranslateOptions

Even

Le 02/11/2022 à 11:53, Jonas Ardö via gdal-dev a écrit :
Dear gdal-gurus,

I am new to using gdal via Python.

As the command line arguments/keywords differ from command prompt mode and Python-mode (for example for example is *-r* in gdal_translate  the same  as *resampleAlg* in gdal.Translate in Python).
I find it tricky to find arguments/keywords in Python.

How can all options/full syntax for gdal-pythons commands be listed as done here <https://gis.stackexchange.com/questions/352643/gdal-translate-in-python-where-do-i-find-how-to-convert-the-command-line-argum> ?
Where they also refer tohttps://gdal.org/python/ which do not exist.
Any other (full/completed) online resource for this?
Can "pydoc -g osgeo" be used?
Are the The gdal-dev Archives searchable?


Regards
/Jonas, Lund University, Sweden

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.

--
Jonas Ardö
Physical Geography and Ecosystem Science
Lund University
Sölvegatan 12 22362 Lund Sweden
+46462224031
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to