[GRASS-user] r.univar: different results with different projections?
Anna Petrášová
kratochanna at gmail.com
Tue Nov 17 06:50:42 PST 2015
On Tue, Nov 17, 2015 at 7:56 AM, Carlos Grohmann <carlos.grohmann at gmail.com>
wrote:
> Hello Jörg
>
> The area of cell shouldn't influence here. The statistics are about the
> elevation values, regardless of the area represented by pixel. If I think
> on the pixels as equally-spaced vector points, after projection they won't
> be equally-spaced anymore, but the number of points won't change. So the
> mean of their values (and stddev, etc) shouldn't change as well.
>
I don't think you can treat pixels as vector points here, I agree with what
Jörg was saying. If some vector points would get further away, you will get
new pixels in between and if the points get close enough, the information
in all points but one is lost. This is at least my intuitive understanding
of the NN reprojection which can be wrong. I wouldn't be concerned that the
results changed but how much they changed.
Anna
> regards
>
> Carlos
>
>
> On Tue, Nov 17, 2015 at 5:15 AM, Robl Jörg Christian <Joerg.Robl at sbg.ac.at
> > wrote:
>
>> Dear Carlos,
>>
>>
>>
>> I’m not an expert for projections.
>>
>> However, on Lat/Long WGS84 the actual area of cells decline from the
>> equator towards the poles.
>>
>> Thus, I would expect that cell values near the poles have “more weight”
>> using Lat/Long WGS84 than using an equal area projection.
>>
>>
>>
>> Near the poles I don’t understand how the values for extent and
>> resolution should be correct (equal area), except there is a huge
>> distortion (very likely for a cylindrical projection)!
>>
>> Are there really 21600 cols with a nsres = 1178 m at the north and south
>> pole. I would call this a huge distortion.
>>
>>
>>
>> As a test, I would calculate the statistics for a smaller area centered
>> at the equator. I would expect that the results are very similar comparing
>> the lat/long and the reprojected dataset.
>>
>>
>>
>> Regards Jörg
>>
>>
>>
>>
>>
>>
>>
>> *Von:* grass-user [mailto:grass-user-bounces at lists.osgeo.org] *Im
>> Auftrag von *Carlos Grohmann
>> *Gesendet:* Montag, 16. November 2015 23:32
>> *Cc:* GRASS user list
>> *Betreff:* Re: [GRASS-user] r.univar: different results with different
>> projections?
>>
>>
>>
>> Hello Cesar
>>
>>
>>
>> That was weird, so I tested it again. The number of cells is the same for
>> both projections, but the values differ. This must be related to
>> reprojecting.
>>
>>
>>
>> To me, they shouldn't de different, since a nearest neighbor should
>> preserve the original values. I'm not really comfortable with this, as I'm
>> not sure I can trust the stats after projecting.
>>
>>
>>
>> best
>>
>>
>>
>> Carlos
>>
>>
>>
>>
>>
>> GRASS 7.1.svn (latlong):~ > g.region raster=gdem_etopo1_ice -pa
>>
>> 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
>>
>> GRASS 7.1.svn (latlong):~ > r.univar map=gdem_etopo1_ice -ge
>> percentile=100
>>
>> n=233280000
>>
>> null_cells=0
>>
>> cells=233280000
>>
>> min=-10803
>>
>> max=8333
>>
>> range=19136
>>
>> mean=-1892.40422534294
>>
>> mean_of_abs=2644.91906490912
>>
>> stddev=2649.98339302808
>>
>> variance=7022411.98332463
>>
>> coeff_var=-140.032629262802
>>
>> sum=-441460057688
>>
>> first_quartile=-4286
>>
>> median=-2457
>>
>> third_quartile=214
>>
>> percentile_100=8333
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> GRASS 7.1.svn (eqarea):~ > g.region -p
>>
>> 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.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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Nov 16, 2015 at 7:43 PM, César Augusto Ramírez Franco <
>> caesarivs at gmail.com> wrote:
>>
>> Carlos,
>>
>>
>>
>> 2015-11-16 14:47 GMT-05:00 Carlos Grohmann <carlos.grohmann at gmail.com>:
>>
>> GRASS 7.1.svn (base_maps):~ > g.region -p raster=gdem_etopo1_ice
>>
>> cells: 233280000
>>
>>
>>
>> GRASS 7.1.svn (base_maps):~ > r.univar map=gdem_etopo1_ice -ge
>> percentile=100
>>
>> cells=58320000
>>
>>
>>
>> GRASS 7.1.svn (eqarea):~ > r.univar map=gdem_etopo1_ice -ge percentile=100
>>
>> cells=233280000
>>
>>
>>
>> Notice how the number of pixels differs, that's the reason the
>> statistics are not the same, I don't get why the region has a different
>> number of pixels than the raster itself in the original latlong
>> projection... I think that's the root of the issue
>>
>>
>>
>> --
>>
>> *César Augusto Ramírez Franco*
>> Laboratorio de Sistemas Complejos Naturales
>> Escuela de Geociencias - Facultad de Ciencias
>> Universidad Nacional de Colombia - Sede Medellín
>> Teléfono: (57-4) 430 9369 - 300 459 6085
>>
>> http://labscn-unalmed.github.io/
>>
>>
>>
>>
>>
>> --
>>
>> 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.
>>
>
>
>
> --
> 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.
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20151117/31b83cb4/attachment-0001.html>
More information about the grass-user
mailing list