normally I used the following terminal command to transform my Sentinel 2 Level 1C Data (it is a .jp2
format) to convert it into a .tif
with the EPSG:3411 format
gdalwarp -t_srs EPSG:3411 input.jp2 output.tif
Due to the amount on satellite images I want to transform I want to have a python code for it. I read the this article and tried to apply it (did not work successfully). After a long time I found this really small "documention" of how to use gdal.Warp.
Now I have the following code, which does not work:
import gdal
input_file = 'path/test.jp2'
output_file = 'test.tif'
gdal.Warp(output_file, input_file, dstSRS='EPSG:3411')
This is the error I get:
return _gdal.wrapper_GDALWarpDestName(*args)
SystemError: <built-in function wrapper_GDALWarpDestName> returned NULL without setting an error
I would be happy if someone could say what is wrong in my short code. If this is important: I work in the spyder/anaconda3 enviornment.
Thanks!