[GRASS-user] raster pixel value
Nikos Alexandris
nik at nikosalexandris.net
Thu Mar 14 07:48:33 PDT 2019
* Nikos Alexandris <nik at nikosalexandris.net> [2019-03-14 15:11:51 +0100]:
>Following up, why are there differences between GDAL and GRASS GIS in
>the following example?
>
>This ftp://ftp.soilgrids.org/data/aggregated/5km/OCDENS_M_sl1_5km_ll.tif
>raster map, subject to `gdalinfo`:
>```
>gdalinfo OCDENS_M_sl1_5km_ll.tif -nogcp -nomd -norat -noct -nofl
>Driver: GTiff/GeoTIFF
>Files: OCDENS_M_sl1_5km_ll.tif
>Size is 7200, 2987
>Coordinate System is:
>GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]]
>Origin = (-180.000000000000000,87.370000000000005)
>Pixel Size = (0.050000000000000,-0.050000000000000)
>Corner Coordinates:
>Upper Left (-180.0000000, 87.3700000) (180d 0' 0.00"W, 87d22'12.00"N)
>Lower Left (-180.0000000, -61.9800000) (180d 0' 0.00"W, 61d58'48.00"S)
>Upper Right ( 180.0000000, 87.3700000) (180d 0' 0.00"E, 87d22'12.00"N)
>Lower Right ( 180.0000000, -61.9800000) (180d 0' 0.00"E, 61d58'48.00"S)
>Center ( 0.0000000, 12.6950000) ( 0d 0' 0.00"E, 12d41'42.00"N)
>Band 1 Block=7200x1 Type=Int16, ColorInterp=Gray
> NoData Value=-32768
>```
>
>and GRASS GIS
>```
># create a new Location
>grass -c OCDENS_M_sl1_5km_ll.tif /geoyeux/grassdb/global/soil_grids/
># projection info
>g.proj -g
>name=WGS 84
>datum=wgs84
>ellps=wgs84
>proj=ll
>no_defs=defined
>epsg=4326
>unit=degree
>units=degrees
>meters=1.0
Something I did do, but forgot to copy-paste here:
```
g.region raster=OCDENS_M_sl1_5km_ll -g
projection=3
zone=0
n=87.37
s=-61.98
w=-180
e=180
nsres=0.05
ewres=0.05
rows=2987
cols=7200
cells=21506400
```
Nikos
># raster info
>r.info -g OCDENS_M_sl1_5km_ll
>
>north=87.37
>south=-61.98
>east=180
>west=-180
>nsres=0.05
>ewres=0.05
>rows=2987
>cols=7200
>cells=21506400
>datatype=CELL
>ncats=0
[rest deleted]
More information about the grass-user
mailing list