Opened 6 years ago
Last modified 5 years ago
#3672 new defect
r.in.gdal -a and the imported map's east boundary
Reported by: | Nikos Alexandris | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.3 |
Component: | Raster | Version: | unspecified |
Keywords: | r.in.gdal | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
I downloaded the hourly 5km LST product "g2_BIOPAR_LST_201606220100_GLOBE_GEO_V1.2.nc" from Copernicus (see also the product's user manual: https://land.copernicus.eu/global/sites/cgls.vito.be/files/products/GIOGL1_PUM_LST-I1.40.pdf)
The reported pixel size and boundary coordinates for the "LST" layer, are:
gdalinfo NETCDF:"g2_BIOPAR_LST_201606220100_GLOBE_GEO_V1.2.nc":LST |grep Pixel Pixel Size = (0.044642858207226,-0.044642858207226)
and
gdalinfo NETCDF:"g2_BIOPAR_LST_201606220100_GLOBE_GEO_V1.2.nc":LST |grep Coordinates -A5 Corner Coordinates: Upper Left (-180.0223214, 80.0223214) (180d 1'20.36"W, 80d 1'20.36"N) Lower Left (-180.0223214, -79.9776824) (180d 1'20.36"W, 79d58'39.66"S) Upper Right ( 179.9776872, 80.0223214) (179d58'39.67"E, 80d 1'20.36"N) Lower Right ( 179.9776872, -79.9776824) (179d58'39.67"E, 79d58'39.66"S) Center ( -0.0223171, 0.0223195) ( 0d 1'20.34"W, 0d 1'20.35"N)
Importing the "LST" layer without any region-related flag, preserves the original spatial resolution. The command
r.in.gdal in=NETCDF:"g2_BIOPAR_LST_201606220300_GLOBE_GEO_V1.2.nc":LST output=g2_BIOPAR_LST_201606220300_GLOBE_GEO_V1.2.nc_LST -o WARNING: Datum <unknown> not recognised by GRASS and no parameters found Over-riding projection check 360 degree EW extent is exceeded by 0.000192261 cells Importing raster map <g2_BIOPAR_LST_201606220300_GLOBE_GEO_V1.2.nc_LST>... 100%
results in
r.info g2_BIOPAR_LST_201606220300_GLOBE_GEO_V1.2.nc_LST -g 360 degree EW extent is exceeded by 0.00019226 cells north=80.0223214291667 south=-79.9776823855556 east=179.977687153889 west=-180.022321429167 nsres=0.0446428582072328 ewres=0.0446428582072241 rows=3584 cols=8064 cells=28901376 datatype=CELL ncats=0
The west & east boundaries -180.022321429167
& 179.977687153889
are close to the metadata-reported ones -180.0223214
&
179.9776872
.
However, importing with the -a
flag,
r.in.gdal in=NETCDF:"g2_BIOPAR_LST_201606220100_GLOBE_GEO_V1.2.nc":LST out=import_with_a -o --o -a
results in
r.info import_with_a -g north=80.0223333333333 south=-79.9634444444444 east=179.945666666667 west=-180.022333333333 nsres=0.0446388888888889 ewres=0.0446388888888889 rows=3584 cols=8064 cells=28901376 datatype=CELL ncats=0
the east boundary 179.945666666667
is "far" from what it should expectedly be: 179.977687153889 - 179.945666666667
= 0.03202049
.
See also: https://lists.osgeo.org/pipermail/grass-user/2018-October/079239.html