Sometimes I think GRASS can do anything...<br><br>In my case I was using a 1km equal area grid over North and South America and needed to implement an interpolation scheme not pre-packaged anywhere I had looked, so I worked with large tables of points. Not highly recommended unless you have other things to do while you wait.<br>
<br>THK<br><br><div class="gmail_quote">On Thu, Dec 15, 2011 at 12:39 PM, <span dir="ltr"><<a href="mailto:Doug_Newcomb@fws.gov">Doug_Newcomb@fws.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><font face="sans-serif">For what it's worth,</font>
<br>
<br><font face="sans-serif">What do you consider large and what
kind of method for downscaling you wish to use?</font>
<br>
<br><font face="sans-serif"> I do this in GRASS using the
r.neighbors command, </font><a href="http://grass.fbk.eu/grass64/manuals/html64_user/r.neighbors.html" target="_blank"><font face="sans-serif">http://grass.fbk.eu/grass64/manuals/html64_user/r.neighbors.html.
I've done an averaging method to convert a 20 ft elevation grid
( statewide coverage) of approximately 7 billion cells to an
averaged 60 ft grid ( 777 million cells) by performing a 3x3 neighbor
hood analysis on the 20 ft grid, setting the GRASS workspace resolution
to 60 ft and multiplying the 20ft grid created by the 3x3 neighborhood
analysis by 1 to create a new grid (</font></a><a href="http://grass.fbk.eu/grass64/manuals/html64_user/r.mapcalculator.html" target="_blank"><font face="sans-serif">http://grass.fbk.eu/grass64/manuals/html64_user/r.mapcalculator.html)
. GRASS will take the value of the center averaged 20 ft cell
in the 60ft block as the value of the cell in the new 60 ft raster.
</font></a>
<br>
<br><font size="3">options for r.neigbors calculations are : average,median,mode,minimum,maximum,range,stddev,sum,variance,diversity,interspersion
</font>
<br>
<br>
<br><font size="3">Doug</font>
<br>
<br>
<br><font face="sans-serif">Doug Newcomb
<br>
USFWS<br>
Raleigh, NC<br>
<a href="tel:919-856-4520%20ext.%2014" value="+19198564520" target="_blank">919-856-4520 ext. 14</a> <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a><br>
---------------------------------------------------------------------------------------------------------<br>
The opinions I express are my own and are not representative of the official
policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.
Life is too short for undocumented, proprietary data formats.</font>
<br>
<br>
<br>
<p></p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>Tim Keitt <<a href="mailto:tkeitt@gmail.com" target="_blank">tkeitt@gmail.com</a>></b>
</font>
<br><font face="sans-serif" size="1">Sent by: <a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a></font>
<p><font face="sans-serif" size="1">12/15/2011 01:17 PM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td><td><font face="sans-serif" size="1">"Andreas H." <<a href="mailto:lists@hilboll.de" target="_blank">lists@hilboll.de</a>></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td><font face="sans-serif" size="1"><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td><td><font face="sans-serif" size="1">Re: [gdal-dev] re-gridding to a coarser
grid</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br>
<br>
<br><tt><font>If you need complete control, and your data are not
too massive in<br>
number, I have had good results pushing pixel coordinates as points<br>
into postgis and then using spatial queries to aggregate in various<br>
ways (eg averages a hexagonal grid). It seems round-about, but it<br>
works. I've actually done it on some pretty massive grids.<br>
<br>
THK<br>
<br>
On Wed, Dec 14, 2011 at 7:26 AM, Andreas H. <<a href="mailto:lists@hilboll.de" target="_blank">lists@hilboll.de</a>> wrote:<br>
> Travis,<br>
><br>
> thanks for your answer!<br>
><br>
> Regarding the resampling methods: Do they all just interpolate the
data? I<br>
> mean, when downsampling, usually I would use mean() or something similar<br>
> to fill the new (coarser) grid cells. Doas gdalwarp actually do this
and<br>
> I'm not able to understand the documentation, or is it different?<br>
><br>
> Thanks again!<br>
> Andreas.<br>
><br>
><br>
>> Andreas,<br>
>><br>
>> gdalwarp can be used to resample images using the -tr flag or
-ts flag.<br>
>><br>
>> For example resample 1m image to 10m using cubic resampling and<br>
>> "target resolution'<br>
>><br>
>> gdalwarp -r cubic -tr 10 10 input_1m.tif output_10m.tif<br>
>><br>
>> You may have an issue determining the output resolution as I believe<br>
>> the resolution will be in decimal degrees rather than arc-seconds.<br>
>><br>
>> Regards<br>
>><br>
>> On 13 December 2011 14:52, Andreas H. <<a href="mailto:lists@hilboll.de" target="_blank">lists@hilboll.de</a>>
wrote:<br>
>>> Hi,<br>
>>><br>
>>> let's say I have a GeoTIFF file with a global grid in a 30
arc-second<br>
>>> resolution. Which would be the appropriate GDAL command to
spatially<br>
>>> down-sample this file to say 0.125°?<br>
>>><br>
>>> Thanks for your insight,<br>
>>> Andreas.<br>
>>> _______________________________________________<br>
>>> gdal-dev mailing list<br>
>>> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
>>> </font></tt><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank"><tt><font>http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>
>><br>
><br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> gdal-dev@lists.osgeo.org<br>
> </font></tt></a><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank"><tt><font>http://lists.osgeo.org/mailman/listinfo/gdal-dev<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Timothy H. Keitt<br>
</font></span></font></tt><span class="HOEnZb"><font color="#888888"></font></span></a><font color="#888888"><a href="http://www.keittlab.org/" target="_blank"><tt><font>http://www.keittlab.org/<br>
_______________________________________________<br>
gdal-dev mailing list<br>
gdal-dev@lists.osgeo.org<br>
</font></tt></a><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank"><tt><font>http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>
</font></tt></a></font>
<br></blockquote></div><br><br clear="all"><br>-- <br>Timothy H. Keitt<br><a href="http://www.keittlab.org/">http://www.keittlab.org/</a><br><br>