0

I am using gdal warp to transform a geotiff between espg:4326 to epsg:3857, I have successfully done this previously on similar images but with the current geotiff it doesn't seem to be working. I am doing this in python using the following code;

grb = gdal.Open('./tmp/WaveFile.anl')

gdal.Translate('./tmp/{}.tif'.format(nameList[i]), grb, options="-of GTiff -b " + str(i + 1))

gdal.Warp('./tmp/{}_warped.tif'.format(nameList[i]), './tmp/{}.tif'.format(nameList[i]), options="-t_srs EPSG:3857 -ts 0.25 0.25")

To see where the problem lies I have a handy online tool (https://products.aspose.app/gis/viewer/geotiff) which generated the following images for the tiff after the translate process (first image) and then after the warp process (second image)

Image after the translate process

Image after the warp process

If anyone knows why I am losing half of the data please let me know

  • 1
    Is your original image between longitudes 0-360, instead of more common -180-180? – user30184 Aug 29 '23 at 16:11
  • As it happens I was literally just troubleshooting this with gdalinfo and noticed it was this exact problem, do you know how I can get around this? – james hall Aug 29 '23 at 16:16
  • 1
    Maybe some old answer could help, like https://gis.stackexchange.com/questions/37790/reprojecting-raster-from-0-360-to-180-180-with-cutting-180-meridian-using-gdalw. Or this https://gis.stackexchange.com/questions/465905/converting-map-from-0-to-360-to-180-to-180. – user30184 Aug 29 '23 at 17:03

0 Answers0