[GRASS-user] interpolation with data periodicity

Hello Grass Users,

I wonder if there is any way of interpolating data concidering a 360 periodicity (namely current orientation). If there is no solution in GRASS, I would be interested in earing your suggestions (I might be able to code it).

Regards

_____
|______\ Thierry SCHMITT
      || Géologie Marine et Côtière
        || Marine and Coastal Geology
        || www.cidco.ca
    
      Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice at http://ca.messenger.yahoo.com/

Schmitt Thierry wrote:

I wonder if there is any way of interpolating data concidering a 360
periodicity (namely current orientation).

Not easily.

The simplest method which I can think of is angle->sin/cos,
interpolate both the sin/cos values, then sin/cos->angle (using
atan2). That can be done with a combination of r.mapcalc and the
interpolation command.

If there is no solution in
GRASS, I would be interested in earing your suggestions (I might be
able to code it).

One option would be a module which adds a multiple of 360 to each cell
value so that the absolute difference from the preceding cell is
always less than 180.

Such data will then interpolate correctly (this is how e.g. d.vect
deals with polygons in lat/lon locations which cross the 180th
meridian).

The result can be re-normalised to the +/- 180 (or 0-360) range with
r.mapcalc.

A separate module is likely to be less work than adding this option to
all of the modules which interpolate values.

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

Schmitt Thierry wrote:

I wonder if there is any way of interpolating data concidering a 360
periodicity (namely current orientation). If there is no solution in
GRASS, I would be interested in earing your suggestions (I might be
able to code it).

(raster data)
split data from direction,magnitude into x and y (U,V) components,
interpolate those two maps, convert the result back to polar coords, and
visualize with d.rast.arrow.

See the d.rast.arrow help page for an example of the conversion.

If you only have direction and not magnitude data, use a unit magnitide
of "1" throughout.

(vector data)
use Matlab (or Octave). :slight_smile: [pol2cart() & cart2pol() fns]

Hamish