I've got a TIFF in projection (proj4: +proj=stere +lat_0=90 +lat_ts=60 +lon_0=-80 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs
). Would like to convert it to EPSG:3857
. ArcMap does it correctly, but GDAL does not. I tried gdalwarp:
gdalwarp -s_srs "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-80 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -t_srs EPSG:3857 -co "COMPRESS=LZW"
Gdalwarp generates more or less empty output.
So I tried gdal_translate:
gdal_translate -projwin_srs "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-80 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -a_srs EPSG:3857 -co "COMPRESS=LZW"
It gives some result, but it's wrong. Both results are the same when doing them in Python.
ArcMap doesn't have a problem with that. Any ideas how to make it automatically with Python (not using ArcPy!)?
The results and input raster are here (around 1-3MB each): https://drive.google.com/drive/folders/1NyXjYqSJI8KUSgA4AwTQbfLHCQhxILPG?usp=sharing
gdalwarp -t_srs EPSG:3857 -r near -of GTiff input.tif out.tif -te -180 -30 180 85 -te_srs epsg:4326
. After the GDAL improvement that is already done due to the ticket that you created the clipping is done automatically, but user must still be aware that the polar area gets lost in the transformation.