Opened 6 years ago

Closed 3 years ago

#2016 closed defect (fixed)

v.surf.idw: very incorrect results

Reported by: hamish Owned by: grass-dev@…
Priority: major Milestone: 6.4.4
Component: Vector Version: svn-develbranch6
Keywords: v.surf.idw Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

I have noticed with some data very bad results with v.surf.idw. The r.surf.idw and r.surf.idw2 modules do ok with the same data after v.to.rast of the starting points. But the v.surf.idw results are not realistic both spatially and numerically.

In my real data I was seeing bad slivering between sample sites, but can recreate other little-relation to source data weirdness with synthetic input.

commands to make the attached screenshot in grass6:

g.region -d    # spearfish
# from addons:
r.surf.volcano out=gauss method=gaussian kurtosis=0.5 peak=5000
r.random in=gauss vect=gauss_rand_500 n=500
v.surf.idw in=gauss_rand_500 out=gauss_rand_500.vidw column=value

plot:

d.mon x0
d.resize w=666 h=1006
d.font Vera
d.split.frame frames=2
#
d.frame uno
MAP=gauss
r.colors "$MAP" col=bcyr
d.rast "$MAP"
d.vect gauss_rand_500 icon=basic/point fcolor=none color=60:60:60
d.legend "$MAP" at=5,60,2,5
echo "$MAP" | d.text color=black size=4
#
d.frame dos
MAP=gauss_rand_500.vidw
r.colors "$MAP" col=bcyr
d.rast "$MAP"
d.vect gauss_rand_500 icon=basic/point fcolor=none color=60:60:60
d.legend "$MAP" at=5,60,2,5
echo "$MAP" | d.text color=black size=4

fwiw I also notice that the module does not scale well to large region sizes (at all).

thanks, Hamish

Attachments (1)

v.surf.idw_Err.png (145.1 KB) - added by hamish 6 years ago.
w/ annotations

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by hamish

Attachment: v.surf.idw_Err.png added

w/ annotations

comment:1 Changed 6 years ago by hamish

for comparison, the working r.surf.idw* methods: }}} v.to.rast in=gauss_rand_500 out=gauss_rand_500.pts column=value r.surf.idw in=gauss_rand_500.pts out=gauss_rand_500.ridw1 r.surf.idw2 in=gauss_rand_500.pts out=gauss_rand_500.ridw2 }}}

comment:2 Changed 6 years ago by hamish

Hi,

some more screenshots showing results of r.plane* + v.random + v.surf.idw, including some derivative maps from r.slope.aspect (devbr6). The 1000 vector sampling points created by v.random are shown as black dots.

[*] trend-plane created by the r.cog addon for spearfish's elevation.dem

this example is not completely wrong (as is the case in the earlier attached screenshot!), just a net of overlain noise on top. So there could be two bugs here.

note the strands of noise in the NW corner in the curvature maps, and the clump of it the center-right of the lower edge in the slope map. Try to match them with the r.surf.idw slope map below.


for comparison, same-data slope map from v.surf.rst and r.surf.idw modules.

r.surf.idw2 was very similar, but not identical, to r.surf.idw; so not shown. As expected, v.surf.rst is much smoother throughout although it suffers from edge-effects and stitching of the quadtree segmentation around the edges. This suggests the quadtree vector map should be created and the outer row of segments from it discarded.

Hamish

comment:3 in reply to:  2 Changed 6 years ago by hamish

Replying to hamish:

http://bambi.otago.ac.nz/hamish/grass/bugs/v.surf.idw/vsurfrst.slope.png

...

As expected, v.surf.rst is much smoother throughout although it suffers from edge-effects and stitching of the quadtree segmentation around the edges. This suggests the quadtree vector map should be created and the outer row of segments from it discarded.

funny that the artifacts only show up in the horizontal but not the vertical splits..

Hamish

comment:4 Changed 3 years ago by neteler

Continued in #2820

comment:5 Changed 3 years ago by mlennert

Resolution: fixed
Status: newclosed

Closing this ticket as #2820 seems to have dealt with it. If the issue is still alive, please post to #2820.

Note: See TracTickets for help on using tickets.