Geographic Information Systems Asked by arnpry on September 1, 2020
I am trying to convert a GRIB2 file to a GeoTIFF file using gdal
.
My Commands:
gdal_translate -b 1 -a_srs EPSG:3857 some.grib2 some.grib2.tif
gdalwarp -t_srs '+proj=longlat +datum=WGS84 +ellps=WGS84 +units=m +no_defs' -te -130.103387 20.196426 -60.885910 52.807544 -tr 0.0174532925199433 0.0174532925199433 -r bilinear some.grib2.tif some.grib2.tif.reproj
I am receiving the following error:
ERROR 1: some.grib2.tif.reproj, band 1: Failed to compute statistics, no valid pixels found in sampling.
Source GRIB2 File (some.grib2): https://www.dropbox.com/s/zt1jzje64xvabbz/some.grib2?dl=0
You are overriding the projection of the grib2 file, in gdal_translate, with EPSG:3857, when the coordinate reference system of the data is not EPSG:3857.
Just remove the -a_srs EPSG:3857
in the gdal_translate command and you will not find the invalid pixels coordinates error.
In gdal_warp, you are not defining the driver to use for the output, and GDAL will not be able to deduce it from .reproj file extension, so please define the output format with -of
parameter or change the file extension for the output.
Answered by Gabriel De Luca on September 1, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP