[GRASS-dev] [GRASS GIS] #3672: r.in.gdal -a and the imported map's east boundary

GRASS GIS trac at osgeo.org
Wed Oct 3 21:09:50 PDT 2018


#3672: r.in.gdal -a and the imported map's east boundary
------------------------------+-------------------------
 Reporter:  Nikos Alexandris  |      Owner:  grass-dev@…
     Type:  defect            |     Status:  new
 Priority:  normal            |  Milestone:
Component:  Raster            |    Version:  unspecified
 Keywords:  r.in.gdal         |        CPU:  Unspecified
 Platform:  Unspecified       |
------------------------------+-------------------------
 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

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3672>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list