[GRASS-user] r.univar: different results with different projections?
Carlos Grohmann
carlos.grohmann at gmail.com
Mon Nov 16 11:47:56 PST 2015
Ok, sorry about the incomplete post.
I reprojected from a latlong location to a cylindrical equal area
projection, using the default nearest neighbor resampling method.
original location:
>GRASS 7.1.svn (base_maps):~ > g.region -p raster=gdem_etopo1_ice
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 90N
south: 90S
west: 180W
east: 180E
nsres: 0:01
ewres: 0:01
rows: 10800
cols: 21600
cells: 233280000
Equal area projection:
>r.proj location=latlong mapset=base_maps input=gdem_etopo1_ice -g
Input map <gdem_etopo1_ice at base_maps> in location <latlong>:
n=6363885.33192604 s=-6363885.33192604 w=-20037508.34278924
e=20037508.34278924 rows=10800 cols=21600
>GRASS 7.1.svn (eqarea):~ > g.region -p n=6363885.33192604
s=-6363885.33192604 w=-20037508.34278924 e=20037508.34278924 rows=10800
cols=21600
projection: 99 (Equal Area Cylindrical)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 6363885.33192604
south: -6363885.33192604
west: -20037508.34278924
east: 20037508.34278924
nsres: 1178.49728369
ewres: 1855.32484655
rows: 10800
cols: 21600
cells: 233280000
GRASS 7.1.svn (eqarea):~ > r.proj location=latlong mapset=base_maps
input=gdem_etopo1_ice
Here are the outputs of r.univar, for both locations:
Latlong
GRASS 7.1.svn (base_maps):~ > r.univar map=gdem_etopo1_ice -ge
percentile=100
n=58320000
null_cells=0
cells=58320000
min=-10753
max=8333
range=19086
mean=-1892.08140334362
mean_of_abs=2644.85220128601
stddev=2650.12442373911
variance=7023159.46129855
coeff_var=-140.063974998956
sum=-110346187443
first_quartile=-4286
median=-2456
third_quartile=214
percentile_100=8333
Equal-area
GRASS 7.1.svn (eqarea):~ > r.univar map=gdem_etopo1_ice -ge percentile=100
n=233280000
null_cells=0
cells=233280000
min=-10803
max=8333
range=19136
mean=-2382.28934158093
mean_of_abs=2845.10169015775
stddev=2508.93105538271
variance=6294735.0406638
coeff_var=-105.315966939504
sum=-555740457604
first_quartile=-4544
median=-3285
third_quartile=93
percentile_100=8333
I also tested in python, flattening the raster to an array. The results are
the same as r.univar (in both cases).
best
Carlos
On Mon, Nov 16, 2015 at 5:32 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Mon, Nov 16, 2015 at 5:34 PM, Carlos Grohmann
> <carlos.grohmann at gmail.com> wrote:
> > Hi all.
> >
> > I'm analyzing some global-scale DEMs, like ETOPO1/2, SRTM30_PLUS, etc.
> >
> > I'm getting the statistics for the whole dataset with r.univar, but
> today I
> > noticed that the results differ if I use different projections. (GRASS
> 7.1)
>
>
> Please post also *how* you reprojected (resampling method etc)
>
> Markus
>
--
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -
http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20151116/024ca733/attachment-0001.html>
More information about the grass-user
mailing list