samedi 28 février 2015

gdalwarp `-te -5.8 41 10 51.5 -ts 1980 0` not working with mercator?


I was working with native lat/log projection on etopo1:



#donwload:
curl -L -C - 'http://ift.tt/1lObCkR' -o ./ETOPO1.zip
unzip -n ./ETOPO1.zip '*.tif'
#commands:
gdal_translate -projwin -5.8 51.5 10 41 ../data/noaa/ETOPO1_Ice_g_geotiff.tif cropXL.tmp.tif
gdalwarp -of GTiff -s_srs EPSG:4326 -t_srs EPSG:4326 cropXL.tmp.tif reproj.tmp.tif
gdalwarp -te -5.8 41 10 51.5 -ts 1980 0 reproj.tmp.tif resized.tmp.tif


all working fine.


I now wish to work in mercator. Also, I made a tiny change to reproject to mercator -t_srs EPSG:3857, but it doesn't work:



gdal_translate -projwin -5.8 51.5 10 41 ../data/noaa/ETOPO1_Ice_g_geotiff.tif cropXL.tmp.tif
gdalwarp -of GTiff -s_srs EPSG:4326 -t_srs EPSG:3857 cropXL.tmp.tif reproj.tmp.tif
gdalwarp -te -5.8 41 10 51.5 -ts 1980 0 reproj.tmp.tif resized.tmp.tif


The last command runs but resized.tmp.tif is now flat, all black. No error message.


What am I doing wrong ?





Aucun commentaire:

Enregistrer un commentaire