Sorry for the noise that I introduced by mixing the GDAL and GMT's lists. I already replied to Andreas only because I though my message went only to him, but since it didn't here is a copy of it.

Joaquim

"
Andreas,
I'm very sorry but I sent that message to you by mistake as it was meant as a reply to another question in the GMT list. But since we are at it, your case is also probably better suite for GMT than GDAL. In GMT you have 'grdsample' to resample your grid or, if you really want to do things the correct way to avoid aliasing since you are going from high to lower resolution, 'grdfilter'. Note that with GMT5 built with GDAL support you can read you grid directly but you are more limited on output formats (mostly netCDF).
"


Andreas

I think thats referring to my suggestion of GMT to do part of the work






On Thu, 2011-12-15 at 14:00 +0100, Andreas H. wrote:
Joaquim,

nearneighbor is not really a good thing to use. Grid it with surface.
What do you mean by "grid it with surface"? In my GDAL (1.8.1), I only
have the following choices:

    Available resampling methods:
        near (default), bilinear, cubic, cubicspline, lanczos.

thanks for your insight,

Andreas.

Joaquim

Sent from my iPadiola

On 14/12/2011, at 18:32, "Andreas H."<[email protected]>  wrote:

Travis,

yes, thanks, I had already found that in the documentation. I'm just
wondering what e.g. 'bilinear' means when I go from a fine to a coarse
grid? If GDAL works in terms of "nodes", then I would assume 'bilinear'
means interpolation, which in turn would be a very different result from
working in terms of "cells" and then taking e.g. the average of all
"old" cells in the "new" grid.

I hope you see my problem / question.

Thanks for you insight,
Andreas.

Am 14.12.2011 16:35, schrieb Travis Kirstine:
Andreas,

Yes gdalwarp support various resampling methods

To use different resampling methods use the -r flag followed by the
method

eg

gdalwarp -r near ..............
gdalwarp -r bilinear .............

etc...




On 14 December 2011 08:26, Andreas H.<[email protected]>  wrote:
Travis,

thanks for your answer!

Regarding the resampling methods: Do they all just interpolate the
data? I
mean, when downsampling, usually I would use mean() or something
similar
to fill the new (coarser) grid cells. Doas gdalwarp actually do this
and
I'm not able to understand the documentation, or is it different?

Thanks again!
Andreas.


Andreas,

gdalwarp can be used to resample images using the -tr flag or -ts
flag.

For example resample 1m image to 10m using cubic resampling and
"target resolution'

gdalwarp -r cubic -tr 10 10 input_1m.tif output_10m.tif

You may have an issue determining the output resolution as I believe
the resolution will be in decimal degrees rather than arc-seconds.

Regards

On 13 December 2011 14:52, Andreas H.<[email protected]>  wrote:
Hi,

let's say I have a GeoTIFF file with a global grid in a 30
arc-second
resolution. Which would be the appropriate GDAL command to spatially
down-sample this file to say 0.125°?

Thanks for your insight,
Andreas.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev



_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to