<div dir="ltr"><div>Hi all,<br></div><div><br></div><div>Rasterio users have reported that GRIB metadata is sensitive to CHECK_WITH_INVERT_PROJ and I can confirm it. The examples below use rasterio 1.1.5dev (not yet released), GDAL 3.1.0 and PROJ 7.0.1. The bounds of the dataset are approximately the Northern Hemisphere.</div><div><br></div>$ rio info --crs ~/work/grib2/sref_arw.t09z.pgrb132.ctl.f00.grib2<br>PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Sphere",6371229,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",50],PARAMETER["central_meridian",253],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",50],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]<div><br></div><div>Now, I'm going to set CHECK_WITH_INVERT_PROJ=YES.</div><div><br>$ CHECK_WITH_INVERT_PROJ=YES rio info --crs ~/work/grib2/sref_arw.t09z.pgrb132.ctl.f00.grib2<br>WARNING:rasterio._env:CPLE_AppDefined in Unable to perform coordinate transformations, so the correct projected geotransform could not be deduced from the lat/long control points.  Defaulting to ungeoreferenced.<br>WARNING:rasterio._env:CPLE_AppDefined in Unable to perform coordinate transformations, so the correct projected geotransform could not be deduced from the lat/long control points.  Defaulting to ungeoreferenced.<br><br><br></div><div>An empty string is printed to the terminal after the second warning. Note that behavior was different with rasterio 1.1.4, which set CHECK_WITH_INVERT_PROJ=YES internally in an attempt to improve the defaults.</div><div><br></div><div>The warning comes from <a href="https://github.com/OSGeo/gdal/blob/2818ff0a49f65741a55b9cea79df496cc05f85e3/gdal/frmts/grib/gribdataset.cpp#L2149">https://github.com/OSGeo/gdal/blob/2818ff0a49f65741a55b9cea79df496cc05f85e3/gdal/frmts/grib/gribdataset.cpp#L2149</a>. </div><div><br></div><div>Is this sensitivity expected? </div><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Sean Gillies</div></div></div></div>