[GRASS-user] Automatic generation of surface interpolation rasters

Hello all, my situation is this:

  • I have a bunch of meteorological stations in a PostGIS database in latlong coordinates
  • Historic precipitation data for the stations
  • the user will select a subset of the stations and a given year, and the system should generate a surface interpolation raster automatically

So far, the steps I am following are this:

  • create an empty mapset with an unique name, using batch processing examples that I found online.
  • import the stations locations using v.in.db
  • set the current region using g.region vect=stations res={res}
  • link the stations map to the table holding the historic data using v.db.connect
  • run v.surf.rst

So far so good, but the problem I am having is that v.surf.rst excludes the points that are at the edge of the region. So my question would be if there’s a way for v.surf.rst to consider this points or otherwise make the region bigger so v.surf.rst would include them. I could use the adding options in g.region (i.e. n=n+{value}) but I would need to know the sign of the coordinates in advance.

So, if anyone has some advice I would appreciate it.

Thanks in advance,
Javier Caicedo

Javier,

On Jan 8, 2008 9:22 AM, Javier Caicedo <jcaicedo@cti.espol.edu.ec> wrote:

So far so good, but the problem I am having is that v.surf.rst excludes the
points that are at the edge of the region. So my question would be if
there's a way for v.surf.rst to consider this points or otherwise make the
region bigger so v.surf.rst would include them. I could use the adding
options in g.region (i.e. n=n+{value}) but I would need to know the sign of
the coordinates in advance.

So, if anyone has some advice I would appreciate it.

Regardless of which cartesian coordinate system you're in, to increase
the "region" by x:

n = n+x
e = e+x
s = s-x
w = w-x

You could do this with some shell parsing magic.

Another option is to take the convex hull of the points (v.hull) then
buffer by x (v.buffer) and set the region to that vector map.

--
Matthew T. Perry
http://www.perrygeo.net

"I love deadlines. I like the whooshing sound they make as they fly by."
-- Douglas Adams