<div dir="ltr">Yes Anna you're right. New pixel will be created and some might be lost.<div><br></div><div>But the changes in the statistics is what concerns me. If your statistical description of a raster changes significantly after reprojection, which one is right?</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 12:50 PM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Nov 17, 2015 at 7:56 AM, Carlos Grohmann <span dir="ltr"><<a href="mailto:carlos.grohmann@gmail.com" target="_blank">carlos.grohmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello Jörg<div><br></div><div>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.</div></div></blockquote><div><br></div></span><div>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.</div><div><br></div><div>Anna</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><br></div><div>regards</div><span><font color="#888888"><div><br></div><div>Carlos</div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 5:15 AM, Robl Jörg Christian <span dir="ltr"><<a href="mailto:Joerg.Robl@sbg.ac.at" target="_blank">Joerg.Robl@sbg.ac.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Dear Carlos,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I’m not an expert for projections.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">However, on Lat/Long WGS84 the actual area of cells decline from the equator towards the poles.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thus, I would expect that cell values near the poles have “more weight” using Lat/Long WGS84 than using an equal area projection.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">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)!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Are there really 21600 cols with a nsres = 1178 m at the north and south pole. I would call this a huge distortion.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Regards Jörg<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b><span lang="DE" style="font-size:10pt;font-family:Tahoma,sans-serif">Von:</span></b><span lang="DE" style="font-size:10pt;font-family:Tahoma,sans-serif"> grass-user [mailto:<a href="mailto:grass-user-bounces@lists.osgeo.org" target="_blank">grass-user-bounces@lists.osgeo.org</a>]
<b>Im Auftrag von </b>Carlos Grohmann<br>
<b>Gesendet:</b> Montag, 16. November 2015 23:32<br>
<b>Cc:</b> GRASS user list<br>
<b>Betreff:</b> Re: [GRASS-user] r.univar: different results with different projections?<u></u><u></u></span></p><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hello Cesar<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">best<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Carlos<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (latlong):~ > g.region raster=gdem_etopo1_ice -pa<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">projection: 3 (Latitude-Longitude)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">zone: 0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">datum: wgs84<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ellipsoid: wgs84<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">north: 90N<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">south: 90S<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">west: 180W<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">east: 180E<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">nsres: 0:01<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ewres: 0:01<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">rows: 10800<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cols: 21600<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells: 233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (latlong):~ > r.univar map=gdem_etopo1_ice -ge percentile=100<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">n=233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">null_cells=0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells=233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">min=-10803<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">max=8333<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">range=19136<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">mean=-1892.40422534294<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">mean_of_abs=2644.91906490912<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">stddev=2649.98339302808<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">variance=7022411.98332463<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">coeff_var=-140.032629262802<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">sum=-441460057688<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">first_quartile=-4286<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">median=-2457<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">third_quartile=214<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">percentile_100=8333<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (eqarea):~ > g.region -p<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">projection: 99 (Equal Area Cylindrical)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">zone: 0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">datum: wgs84<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ellipsoid: wgs84<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">north: 6363885.33192604<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">south: -6363885.33192604<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">west: -20037508.34278924<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">east: 20037508.34278924<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">nsres: 1178.49728369<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">ewres: 1855.32484655<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">rows: 10800<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cols: 21600<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells: 233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (eqarea):~ > r.univar map=gdem_etopo1_ice -ge percentile=100 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">n=233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">null_cells=0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells=233280000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">min=-10803<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">max=8333<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">range=19136<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">mean=-2382.28934158093<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">mean_of_abs=2845.10169015775<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">stddev=2508.93105538271<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">variance=6294735.0406638<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">coeff_var=-105.315966939504<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">sum=-555740457604<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">first_quartile=-4544<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">median=-3285<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">third_quartile=93<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">percentile_100=8333<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Nov 16, 2015 at 7:43 PM, César Augusto Ramírez Franco <<a href="mailto:caesarivs@gmail.com" target="_blank">caesarivs@gmail.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="color:rgb(39,78,19)">Carlos,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2015-11-16 14:47 GMT-05:00 Carlos Grohmann <<a href="mailto:carlos.grohmann@gmail.com" target="_blank">carlos.grohmann@gmail.com</a>>:<u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (base_maps):~ > g.region -p raster=gdem_etopo1_ice<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells: 233280000<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (base_maps):~ > r.univar map=gdem_etopo1_ice -ge percentile=100<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells=58320000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">GRASS 7.1.svn (eqarea):~ > r.univar map=gdem_etopo1_ice -ge percentile=100<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">cells=233280000<u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(39,78,19)">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<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span><span style="color:rgb(136,136,136)">-- </span><u></u><u></u></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="color:rgb(136,136,136)">César Augusto Ramírez Franco</span></b><span style="color:rgb(136,136,136)"><br>
Laboratorio de Sistemas Complejos Naturales<br>
Escuela de Geociencias - Facultad de Ciencias<br>
Universidad Nacional de Colombia - Sede Medellín<br>
Teléfono: (57-4) 430 9369 - 300 459 6085</span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"><a href="http://labscn-unalmed.github.io/" target="_blank">http://labscn-unalmed.github.io/</a><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Prof. Carlos Henrique Grohmann<br>
Institute of Energy and Environment - Univ. of São Paulo, Brazil<u></u><u></u></p>
<div>
<p class="MsoNormal">- Digital Terrain Analysis | GIS | Remote Sensing - <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://orcid.org/0000-0001-5073-5572" target="_blank"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(17,85,204);background:white">http://orcid.org/0000-0001-5073-5572</span></a><u></u><u></u></p>
<div>
<p class="MsoNormal">________________<br>
Can’t stop the signal.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</div>
</div></div><br></div></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</div>