[GRASS-dev] latlon support

Glynn Clements glynn at gclements.plus.com
Fri Jan 30 18:24:30 EST 2009


Markus Metz wrote:

> > It means that modules which operate upon a moving window cannot create
> > output which fully covers 360 degrees. Such modules need a full window
> > of non-null cells to generate a non-null result, so they leave a
> > half-window border of null cells on each side of the region where the
> > window bounds stray outside of the region bounds.
> >   
> Two stupid questions:

> 1) If the resampling method only needs the values of the moving window, 
> can't you use a temporary array where you feed all the cell values in 
> and assume NULL when no cell value is available (e.g. outside current 
> region window)? Such a temporary array would not be bothered with the 
> region window, resampling can be done in that array and the resulting 
> value for the target cell put back to the array/structure used for 
> writing the output map.

For a 360-degree lat/lon map, you don't want to pad with nulls, you
want to use the wrapped cells.

E.g. for r.neighbors size=5 with ewres=1, you want 364 columns, so
that you get 360 valid columns.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list