<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-3" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Maciej Sieczka wrote:
<blockquote cite="mid:46D30E3C.2050101@o2.pl" type="cite">
<pre wrap="">Luigi Ponti wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have successfully included natural neighbor interpolation in my
mapping routine via r.surf.nnbathy: it seems slower (is that OK?)
than v.surf.idw but sounds a lot more robust from what I have read
around
</pre>
</blockquote>
<pre wrap=""><!---->
I'd only like to stress that it really depends on what your input data
looks like and what the purpose is. Each interpolation method has it's
cons and pros. There is no single most robust method for all applications.
</pre>
</blockquote>
This is why I was worrying about the convex hull, please see<br>
<a class="moz-txt-link-freetext" href="http://quartese.googlepages.com/idwvsnn">http://quartese.googlepages.com/idwvsnn</a><br>
<blockquote cite="mid:46D30E3C.2050101@o2.pl" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">-- this is very useful if the interpolated raster is to be
used for further analysis, beyond visualization.
Currently, the interpolated raster output I get from r.surf.nnbathy
is confined to the convex hull delimited by the outermost input
points/cells. Would there be a way to extend the interpolated raster
to the whole current region as in v.surf.idw
</pre>
</blockquote>
<pre wrap=""><!---->
1. Note the hardcoded "-W 0" in the script. You can set it to something
smaller if you want to extrapolate beyond the convex hull. However, I
don't think this makes much sense - set "-W -2" and see how bad the
output DEM looks on the edges. And it can't look better, for how the
triangulation works. Triangulation is restricted to the convex hull
made of input points.
</pre>
</blockquote>
I have noticed that after sending the message: I tried with -1 and -3
and it really becomes weird. You are right that it does not make sense.<br>
<blockquote cite="mid:46D30E3C.2050101@o2.pl" type="cite">
<pre wrap="">
2. Even if your input raster is bigger than your current region,
r.stats, which is used in r.surf.nnbathy script to create the x,y,z
input for nnbathy, discards input raster's cells outside the current
region. Thus, the convex hull is created only for non-null input points
falling into the current region. And the convex hull shape will depend
on how the input non-null cells falling into the current region are
distributed. If you want a perfectly rectangular convex hull, make sure
there is a non-null input raster cell in each region's corner.
I'll think of automating this. Next vacation maybe :).
</pre>
</blockquote>
This would be great.<br>
<blockquote cite="mid:46D30E3C.2050101@o2.pl" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">(in principle this
seems possible: outer Voronoi cells just get bigger)?
</pre>
</blockquote>
<pre wrap=""><!---->
I don't exactly understand what you mean. Could you elaborate please?
</pre>
</blockquote>
What I meant is that the outer Voronoi cells may extend up to the
region's bounding box, with consequent new Voronoi cells for
interpolation points outside the convex hull, please see<br>
<a class="moz-txt-link-freetext" href="http://quartese.googlepages.com/voronoi">http://quartese.googlepages.com/voronoi</a><br>
<blockquote cite="mid:46D30E3C.2050101@o2.pl" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">By looking at r.surf.nnbathy code and nnbathy --help, it seems that
nnbathy should produce a rectangular grid of <cols> by <rows>. What
am I missing?
</pre>
</blockquote>
<pre wrap=""><!---->
Yes, it does produce a rectangular grid. Only that all the cells
outside the convex hull are null.
Maciek
P.S.
I'm very glad r.surf.nnbathy is usefull for you. Please drop me a line
if you publish anything where it's involved.
</pre>
</blockquote>
Thanks Maciek for your answer and your work on r.surf.nnbathy.<br>
</body>
</html>