1

I want to convert ascii grid data files from Deutscher Wetterdienst to GeoTIFF using GDAL in Python, but I have problems adding the correct coordinate system (since DWD uses their own RADOLAN grid its a bit problematic).

I'm using CreateCopy() which as far as I have read is using the gdal_translate command. In gdal_translate I would just add the correct values with appending gdal_translate -a_srs="+proj=stere +lat_0=90.0 +lon_0=10.0 +lat_ts=60.0 +a=6370040 +b=6370040 +units=m" but I can't find a way to do it in the Python API.

Is there a way to add these values while translating, or adding them after creating the file using the dataset return of .CreateCopy()?

1

Nevermind. I just found out that there is gdal.Translate(dstName, src, options) and gdal.TranslateOptions(xxx) it works fine with that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.