[GRASS-user] Re: r.surf.nnbathy interpolation to whole region

Luigi Ponti lponti at infinito.it
Tue Aug 28 02:10:04 EDT 2007

Maciej Sieczka wrote:
> Luigi Ponti wrote:
>> 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
> 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.
This is why I was worrying about the convex hull, please see
>> -- 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
> 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.
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.
> 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 :).
This would be great.
>> (in principle this
>> seems possible: outer Voronoi cells just get bigger)?
> I don't exactly understand what you mean. Could you elaborate please?
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
>> 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?
> 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.
Thanks Maciek for your answer and your work on r.surf.nnbathy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070828/cb5844ad/attachment.html

More information about the grass-user mailing list