[GRASS-user] Strategies for using v.surf.rst (getting rid of those segmentation boxes)

Grassers:

  I'm using v.surf.rst, and I'm wondering what the best strategies for getting rid of those rectangular segmentation boxes are, while also not having the high local peaks around lone sample points? Thanks!

--j

--

Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Cell: 415-794-5043
AIM: jgrn307, MSN: jgrn307@hotmail.com, Gchat: jgrn307

Jonathan Greenberg wrote:

I'm using v.surf.rst, and I'm wondering what the best strategies for
getting rid of those rectangular segmentation boxes are, while also
not having the high local peaks around lone sample points? Thanks!

this is probably not much help, but a uniform distribution of input
points is the best solution. it doesn't deal well with a high density
of points right next to a low density area.

for your current data try increasing npmin, segmax.

r.surf.nnbathy from the wiki addons page is another option.

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Jonathan Greenberg <greenberg <at> ucdavis.edu> writes:

Grassers:

  I'm using v.surf.rst, and I'm wondering what the best strategies for
getting rid of those rectangular segmentation boxes are, while also not
having the high local peaks around lone sample points? Thanks!

Hi All,

I am having the same issue as Jonathan, I know it is being caused by lack of
data.

Original data is unretrievable, but I did digitalize in GRASS 6.2 from a
scanned paper map.

In the pics, you can see the vector lines in blue (v.digit'ized) and the
raster made with r.surf.rst

Those are isopach (thickness) and sand isolite (sand content [%]) maps. I
digitized the values x100 the original, because of some remark in the GRASS
book, but now I think it applied to r.surf.contour

Note that I don't _need_ to use r.surf.rst, but I _need_ a smooth raster.
Whatever method that is capable of that. Also, vector lines are the best _I_
could do, so no increase in resolution is possible, but alternate methods are
nice =]

In the meantime, I'll try Hamish's suggestion.

http://paulomarcondes.googlepages.com/isopaca.jpg

r.info for this raster:
+----------------------------------------------------------------------------+
| Layer: isopaca_sseqC.elev Date: Fri Jun 6 10:45:17 2008 |
| Mapset: PERMANENT Login of Creator: cmp9 |
| Location: Aratu_BC |
| DataBase: /u/cmp9/gisdata |
| Title: ( isopaca_sseqC.elev ) |
| timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL |
| Rows: 1292 |
| Columns: 1166 |
| Total Cells: 1506472 |
| Projection: UTM (zone -24) |
| N: 7668884.01433 S: 7475133.68393 Res: 149.96155604 |
| E: 450329.267038 W: 275417.899494 Res: 150.00974918 |
| Range of data: min = -11.243400 max = 70065.601562 |
| |
| Data Source: |
| vector file isopaca_sseqC |
| |
| |
| Data Description: |
| generated by v.surf.rst |
| |
| Comments: |
| giventension=40.000000, smoothing=0.100000 |
| dnorm=23529.679966, dmin=100.000000, zmult=1.000000 |
| segmax=40, npmin=300, rmsdevi=22.054472 |
| zmin_data=0.000000, zmax_data=70000.000000 |
| zmin_int=-11.243400, zmax_int=70065.601691 |
| |
| v.surf.rst -t input="isopaca_sseqC" layer=1 zcolumn="isopaca" dmax=3\ |
| 50 dmin=100 elev="isopaca_sseqC.elev" slope="isopaca_sseqC.slope" as\ |
| pect="isopaca_sseqC.aspect" pcurv="isopaca_sseqC.curv" tcurv="isopac\ |
| a_sseqC.tancurv" mcurv="isopaca_sseqC.meancurv" maskmap="isopaca_mas\ |
| k" zmult=1 tension=40. segmax=40 npmin=300 |
| |
+----------------------------------------------------------------------------+

http://paulomarcondes.googlepages.com/isolita.jpg
r.info:
+----------------------------------------------------------------------------+
| Layer: isolita_sseqC.elev Date: Thu Jun 5 15:21:08 2008 |
| Mapset: PERMANENT Login of Creator: cmp9 |
| Location: Aratu_BC |
| DataBase: /u/cmp9/gisdata |
| Title: ( isolita_sseqC.elev ) |
| timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL |
| Rows: 1292 |
| Columns: 1166 |
| Total Cells: 1506472 |
| Projection: UTM (zone -24) |
| N: 7668884.01433 S: 7475133.68393 Res: 149.96155604 |
| E: 450329.267038 W: 275417.899494 Res: 150.00974918 |
| Range of data: min = -93578.492188 max = 804178.500000 |
| |
| Data Source: |
| vector file isolita_sseqC |
| |
| |
| Data Description: |
| generated by v.surf.rst |
| |
| Comments: |
| tension=40.000000, smoothing=0.100000 |
| dnorm=33181.595517, dmin=100.000000, zmult=100.000000 |
| segmax=40, npmin=300, rmsdevi=4581.273762 |
| zmin_data=200000.000000, zmax_data=800000.000000 |
| zmin_int=-93578.488628, zmax_int=804178.527938 |
| |
| v.surf.rst input="isolita_sseqC" layer=1 zcolumn="isolita" dmax=350 \ |
| dmin=100 elev="isolita_sseqC.elev" slope="isolita_sseqC.slope" aspec\ |
| t="isolita_sseqC.aspect" pcurv="isolita_sseqC.curv" tcurv="isolita_s\ |
| seqC.tancurv" mcurv="isolita_sseqC.meancurv" maskmap="isolita_mask" \ |
| zmult=100 tension=40. segmax=40 npmin=300 treefile="isolita_quadtree\ |
| " overfile="isolita_windows" |
| |
+----------------------------------------------------------------------------+

Also:
GRASS 6.2.3 (Aratu_BC):~/gisdata/Aratu_BC/PERMANENT > g.region -p
projection: 1 (UTM)
zone: -24
datum: ** unknown (default: WGS84) **
ellipsoid: a=6378388 es=0.006722670022333321
north: 7668884.01433
south: 7475133.68393
west: 275417.899494
east: 450329.267038
nsres: 149.96155604
ewres: 150.00974918
rows: 1292
cols: 1166
cells: 1506472

2008/6/9 M S <mseibel@gmail.com>:

does v.surf.bspline produce smoother results? I've not tried too many
interpolation methods besides v.surf.rst, but in other software their
"spline" interpolation gave very smoothed, but generalized results.

Well,

I'll have a look at that module.
--
Paulo Marcondes = PU1/PU2PIX
-22.915 -42.224 = GG86jc

On Fri, Jan 18, 2008 at 2:53 AM, Jonathan Greenberg
<greenberg@ucdavis.edu> wrote:

Grassers:

       I'm using v.surf.rst, and I'm wondering what the best strategies for
getting rid of those rectangular segmentation boxes are, while also not
having the high local peaks around lone sample points? Thanks!

I had the same problem and worked around it but avoiding segmentation.
Example:

6921 input points
...
WARNING: Points are more dense than specified 'DMIN'--ignored 5575
points (remain 1346)

Now we can calculate:
6921-5575=1346.

For smooth connection of segments, npmin > segmax.

In my interpolation, I had the problem that I got errors like
  ERROR: segmentation parameters set to invalid values: npmin = 300,
segmax = 850
  for smooth connection of segments, npmin > segmax (see manual)
ERROR: input failed!

In the v.surf.rst/v.vol.rst, there is a MAXPOINTS value defined (surf.h).
MAXPOINTS simply says how many input points are allowed to be computed
without segmentation. I had to increase the value of MAXPOINTS in surf.h to
1346 (or a bit more) and then to use segmax=1346 to avoid segmentation.
Tricky but works.
The idea of the authors is to change v.surf.rst/v.vol.rst to a more dynamic
management of this value, the question is how to implement that.

Summary: avoid segmentation if possible.

Markus

On 09/06/08 21:39, Paulo Marcondes (Pmarc) wrote:

Jonathan Greenberg <greenberg <at> ucdavis.edu> writes:

Grassers:

  I'm using v.surf.rst, and I'm wondering what the best strategies for getting rid of those rectangular segmentation boxes are, while also not having the high local peaks around lone sample points? Thanks!

Helena seems to have had some success with generalizing contours before interpolating:

http://skagit.meas.ncsu.edu/~helena/grasswork/interpgen.html

Moritz

>> I'm using v.surf.rst, and I'm wondering what the best
>> strategies for getting rid of those rectangular segmentation
>> boxes are, while also not having the high local peaks around
>> lone sample points? Thanks!

Moritz

Helena seems to have had some success with generalizing
contours before
interpolating:

http://skagit.meas.ncsu.edu/~helena/grasswork/interpgen.html

Hi all,

please do update the RST wiki help page with any solutions you find,

  http://grass.osgeo.org/wiki/RST_Spline_Surfaces

(If you don't have an account just make yourself one, then you can edit)

thanks,
Hamish