I'm reprojecting GFS GRIB files to EPSG:3857 using gdalwarp. Resulting file get little bit shorter to the right so when I zoom in from zoom level 5 and higher, I can see vertical line with missing data. Check image below:
When I check edges with gdalinfo I could clearly see that map is indeed shorter:
Upper Left (-20037508.343,26491625.382) (180d 0' 0.00"W, 88d12' 0.00"N) Lower Left (-20037508.343,-26492654.355) (180d 0' 0.00"W, 88d12' 1.05"S) Upper Right (20036608.125,26491625.382) (179d59'30.89"E, 88d12' 0.00"N) Lower Right (20036608.125,-26492654.355) (179d59'30.89"E, 88d12' 1.05"S) Center ( -450.109, -514.486) (0d 0'14.56"W, 0d 0'16.64"S)
For tile x = 32767; y = 14181; zoomLevel = 15; I calculated geo coords:
x0 = 20036285.349764004 x1 = 20037508.34221653 y0 = 2693029.380466357 y1 = 2694252.372918885
and I get complexly blank image.
For tile x = 63; y = 28; zoomLevel = 6; There is missing data vertical line at the right side of image.
I am using SOURCE_EXTRA=1000. I tried much higher numbers, but I guess resulting tif bounding box is not calculated correctly so this doesn't help.
Downloaded any grib2 file from here
Extracted 270 variable using wgrib2 tool with following grid params:
-new_grid latlon 180:23040:0.015625 -90:11520:0.015625
Finally, I used gdalwarp command:
gdalwarp -t_srs EPSG:3857 -wo SOURCE_EXTRA=1000 --config CENTER_LONG 0 -of GTiff --config GRIB_NORMALIZE_UNITS NO -co "TILED=YES" 270-16.grb test.tif
Extracted and interpolated grib file: link
Resulting TIF file: link
Any thoughts how to fix this?