[GRASS-user] surface interpolation with breaklines
msieczka at sieczka.org
Sun Feb 9 06:55:12 PST 2014
W dniu 09.02.2014 13:17, Vincent Bain pisze:
> Perhaps a wiser solution would be to v.to.point (i) contour lines,
> (ii) breaklines, then merge them in a single raster an run
There is no need to v.to.points isolines before rasterizing them for
nnbathy. Unless you want to generalize the contour lines on purpose,
e.g. to minimize the staircase artifacts in the output raster map.
As to breaklines, if these are linear features that indicate
surface discontinuity and have no elevation attribute, nnbathy has no
use of them (which you know already). If they are vector isolines, just
rasterize them straight away. If these are vector 3d lines, you'd need
to rasterize them interpolating their elevation at each cell of the
output raster map, which v.to.rast can't do. At least it couldn't a few
years ago when I tried it. This could probably be approximated with
something like v.to.points -v -i dmax=<raster DEM resolution> +
v.to.rast, but that's suboptimal.
> Finally I found on the web a custom solution based on a nice little
> python script named tin2raster, you can find it at the address
> bellow. I tried to contact Antonio, the guy who wrote it, but did not
> get a reply :
That tool utilizes Vect_tin_get_z
(http://grass.osgeo.org/programming6/tin_8c.html), which claims to be
able to perform such interpolation, not only along a linear 3d feature,
but on faces as well. Nice.
I haven't tried the tool, but it seems it does exactly what you are
> In my case it was very efficient and fast. Do you think it could
> represent a potential new option that could be applied to v.to.rast
> in order to handle 3d vector areas ?
I don't know, but I'd like v.to.rast to provide such feature too.
> Le dimanche 09 février 2014 à 12:53 +0100, Maciej Sieczka a écrit :
>> W dniu 03.02.2014 18:55, Vincent Bain pisze:
>>> Would anyone help me figure out how I could perform this
>>> conversion, given that I would rely on a linear interpolation
>>> method within triangles faces (the result would be close to what
>>> r.surf.nnbathy does, except nor this addon does support
>> Can you rasterize the output triangle 3d sides, and use that as an
>> input for r.surf.nnbathy?
>> r.surf.nnbathy should create a structure similar to v.triangle
>> product, since both use the same Shewchuk's "triangle" algorithm
>> You may try if using only the triangle node vertices alone
>> wouldn't suffice, and extracting those from a 3d vector map should
>> be very easy (v.to.points -n ?).
More information about the grass-user