<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 19, 2011, at 11:00 AM, <a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Message: 3<br>Date: Wed, 19 Oct 2011 08:55:47 +0200<br>From: Markus Metz <<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>><br>Subject: Re: [GRASS-user] odd r.stats output, after r.resample.stats<br>To: Kirk Wythers <<a href="mailto:kirk.wythers@gmail.com">kirk.wythers@gmail.com</a>><br>Cc:<span class="Apple-converted-space"> </span><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>Message-ID:<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><<a href="mailto:CAG+h=FGNo5_dR3U3v=VBzA-4tOzf8-MMqPJ8c=0YbNJPONKz5Q@mail.gmail.com">CAG+h=FGNo5_dR3U3v=VBzA-4tOzf8-MMqPJ8c=0YbNJPONKz5Q@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>On Tue, Oct 18, 2011 at 9:31 PM, Kirk Wythers <<a href="mailto:kirk.wythers@gmail.com">kirk.wythers@gmail.com</a>> wrote:<br><blockquote type="cite">I am trying to aggregate resample a 250 meter resolution raster to 1000m resolution as the most frequently occurring value in the 250m map. I am using:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">GRASS 6.4.1 (northcentralus_albersequalarea):~ > r.resamp.stats -w input=mnwimifnfftgk7wt175v3_250m output=mnwimifnfftgk7wt175v3_1000m method=mode --verbose 100%<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This all appears to work properly. If I export the raster to MATLAB and simply view the cell values they are all whole number like 500, 600, 700, etc....<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, when I run r.stats on each map, I get:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">GRASS 6.4.1 (northcentralus_albersequalarea):~ > r.stats -cl input=mnwimifnfftgk7wt175v3_250m 100%<br></blockquote><blockquote type="cite">0  893025<br></blockquote><blockquote type="cite">100  18419<br></blockquote><blockquote type="cite">120  34024<br></blockquote><blockquote type="cite">170  125<br></blockquote><blockquote type="cite">260  18<br></blockquote><blockquote type="cite">380  527<br></blockquote><blockquote type="cite">400  4269<br></blockquote><blockquote type="cite">500  36610<br></blockquote><blockquote type="cite">600  163<br></blockquote><blockquote type="cite">700  12479<br></blockquote><blockquote type="cite">800  51090<br></blockquote><blockquote type="cite">900  53455<br></blockquote><blockquote type="cite">990  5<br></blockquote><blockquote type="cite">999  527<br></blockquote><blockquote type="cite">* no data 874<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">GRASS 6.4.1 (northcentralus_albersequalarea):~ > r.stats -cl input=mnwimifnfftgk7wt175v3_1000m<br></blockquote><blockquote type="cite">100%<br></blockquote><blockquote type="cite">0-3.917647 from  to  929109<br></blockquote><blockquote type="cite">97.941176-101.858824 from  to  11467<br></blockquote><blockquote type="cite">117.529412-121.447059 from  to  32643<br></blockquote><blockquote type="cite">168.458824-172.376471 from  to  1<br></blockquote><blockquote type="cite">258.564706-262.482353 from  to  1<br></blockquote><blockquote type="cite">376.094118-380.011765 from  to  30<br></blockquote><blockquote type="cite">399.6-403.517647 from  to  383<br></blockquote><blockquote type="cite">497.541176-501.458824 from  to  24231<br></blockquote><blockquote type="cite">599.4-603.317647 from  to  12<br></blockquote><blockquote type="cite">697.341176-701.258824 from  to  2184<br></blockquote><blockquote type="cite">799.2-803.117647 from  to  50355<br></blockquote><blockquote type="cite">897.141176-901.058824 from  to  55190<br></blockquote><blockquote type="cite">995.082353-999 from  to  4<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The output to r.stats from the 250 meter resolution map look fine... but doesn't make sense to me that the 1000 meter resolution map would have it's count and cell values binned into groups like 0-3.9, and 97.9-101.9???<br></blockquote><br>That looks like mnwimifnfftgk7wt175v3_250m is of type CELL and<br>mnwimifnfftgk7wt175v3_1000m is of type FCELL or DCELL. Try reading<br>mnwimifnfftgk7wt175v3_1000m as CELL (integer) with<br><br>r.stats -cli input=mnwimifnfftgk7wt175v3_1000m<br><br>HTH,<br><br>Markus M</span></blockquote><br></div><div>That worked! Thanks Markus. Any way I can keep "type CELL" when I resample with r.resamp.stats -w input=mnwimifnfftgk7wt175v3_250m output=mnwimifnfftgk7wt175v3_1000m method=mode --verbose, so that I don't create a "type FCELL or DCELL in the 1000 meter resolution version ?</div><br></body></html>