[GRASS-user] [GRASSLIST:1105] tin to raster dem

Dear all...
I have been able to create a tin starting from the v.delaunay module and
then manual editing the v.delaunay output exported with v.in.ascii
(format=standard)
now I can see, using nviz, the some filled triangles in the 3d
space...!!!!
now the problem:
I would like to transfrom the tin surface in a raster surface...
is it possible in some way!!!!
any idea???

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
        ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

Hi,
You can try v.surf.*

2006/6/16, ivan marchesini <marchesini@unipg.it>:

Dear all…
I have been able to create a tin starting from the v.delaunay module and
then manual editing the v.delaunay output exported with v.in.ascii
(format=standard)
now I can see, using nviz, the some filled triangles in the 3d
space…!!!
now the problem:
I would like to transfrom the tin surface in a raster surface…
is it possible in some way!!!
any idea???


Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

Hi Laurent, thanks for your answer....
I know that v.surf.* is able to interpolate points and contours...
but don't have this kind of data and I don't mind to interpolate points
because I would like to obtain perfect planes in correspondace of the
triangles!!! interpolating will obviously create some little difference
between the elevation of the dem and of the original triangle surface...
the boundaries that I have are 3d boundaries, they start from an
elevation and finish to another...
if you can imagine a 3d triangle you can also imagine a raster dem the
cells of which has the same elevation of the plane in each point!!!

I have tried to interpolate the tree points of a 3d triangle...
using v.surf.rst and smoothing=0 and tension=1 (for creating a perfect
plane) but the results is not so fine (please see the small attached
file, I apologize for this image with the users of the mailing list)

I know I can use r.plane for creating a single plane but I should know
the azimut and deep of the plane... is there a way to obtain this
information for a 3d triangle??? (not in a manual way obviously)

any idea???
thanks

Ivan

Il giorno ven, 16/06/2006 alle 10.55 +0200, Laurent C. ha scritto:

Hi,
You can try v.surf.*

2006/6/16, ivan marchesini <marchesini@unipg.it>:
        Dear all...
        I have been able to create a tin starting from the v.delaunay
        module and
        then manual editing the v.delaunay output exported with
        v.in.ascii
        (format=standard)
        now I can see, using nviz, the some filled triangles in the
        3d
        space...!!!!
        now the problem:
        I would like to transfrom the tin surface in a raster
        surface...
        is it possible in some way!!!!
        any idea???
        
        --
        Ivan Marchesini
        Department of Civil and Environmental Engineering
        University of Perugia
        Via G. Duranti 93/a
        06125
        Perugia (Italy)
        e-mail: marchesini@unipg.it
                ivan.marchesini@gmail.com
        tel: +39(0)755853760
        fax: +39(0)755853756
        jabber: geoivan73@jabber.org
        

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
        ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

(attachments)

wrong_solution.jpg

2006/6/16, ivan marchesini <marchesini@unipg.it>:

Hi Laurent, thanks for your answer…
I know that v.surf.* is able to interpolate points and contours…
but don’t have this kind of data and I don’t mind to interpolate points
because I would like to obtain perfect planes in correspondace of the
triangles!!! interpolating will obviously create some little difference
between the elevation of the dem and of the original triangle surface…
the boundaries that I have are 3d boundaries, they start from an
elevation and finish to another…
if you can imagine a 3d triangle you can also imagine a raster dem the
cells of which has the same elevation of the plane in each point!!!

I have tried to interpolate the tree points of a 3d triangle…
using v.surf.rst and smoothing=0 and tension=1 (for creating a perfect
plane) but the results is not so fine (please see the small attached
file, I apologize for this image with the users of the mailing list)

I know I can use r.plane for creating a single plane but I should know
the azimut and deep of the plane… is there a way to obtain this
information for a 3d triangle??? (not in a manual way obviously)

any idea???
thanks

Ivan

Il giorno ven, 16/06/2006 alle 10.55 +0200, Laurent C. ha scritto:

Hi,
You can try v.surf.*

2006/6/16, ivan marchesini < marchesini@unipg.it>:
Dear all…
I have been able to create a tin starting from the v.delaunay
module and
then manual editing the v.delaunay output exported with
v.in.ascii
(format=standard)
now I can see, using nviz, the some filled triangles in the
3d
space…!!!
now the problem:
I would like to transfrom the tin surface in a raster
surface…
is it possible in some way!!!
any idea???

I see. What sort of result give v.to.rast ?

Hi Laurent,
not useful!!
there's not the option (using v.to.rast) for converting a 3d area into a
raster :frowning:

Il giorno ven, 16/06/2006 alle 15.39 +0200, Laurent C. ha scritto:

2006/6/16, ivan marchesini <marchesini@unipg.it>:
        Hi Laurent, thanks for your answer....
        I know that v.surf.* is able to interpolate points and
        contours...
        but don't have this kind of data and I don't mind to
        interpolate points
        because I would like to obtain perfect planes in correspondace
        of the
        triangles!!! interpolating will obviously create some little
        difference
        between the elevation of the dem and of the original triangle
        surface...
        the boundaries that I have are 3d boundaries, they start from
        an
        elevation and finish to another...
        if you can imagine a 3d triangle you can also imagine a raster
        dem the
        cells of which has the same elevation of the plane in each
        point!!!
        
        I have tried to interpolate the tree points of a 3d
        triangle...
        using v.surf.rst and smoothing=0 and tension=1 (for creating
        a perfect
        plane) but the results is not so fine (please see the small
        attached
        file, I apologize for this image with the users of the mailing
        list)
        
        I know I can use r.plane for creating a single plane but I
        should know
        the azimut and deep of the plane... is there a way to obtain
        this
        information for a 3d triangle??? (not in a manual way
        obviously)
        
        any idea???
        thanks
        
        Ivan
        
        Il giorno ven, 16/06/2006 alle 10.55 +0200, Laurent C. ha
        scritto:
        > Hi,
        > You can try v.surf.*
        >
        > 2006/6/16, ivan marchesini <marchesini@unipg.it>:
        > Dear all...
        > I have been able to create a tin starting from the
        v.delaunay
        > module and
        > then manual editing the v.delaunay output exported
        with
        > v.in.ascii
        > (format=standard)
        > now I can see, using nviz, the some filled triangles
        in the
        > 3d
        > space...!!!!
        > now the problem:
        > I would like to transfrom the tin surface in a
        raster
        > surface...
        > is it possible in some way!!!!
        > any idea???

I see. What sort of result give v.to.rast ?

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
        ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

Hi Ivan,
what you need is a rasterizer. :slight_smile:

What do you think about this small algorithm?

###################################
Use the bounding box of your TIN to set a 2d raster region.

  Calculate for every raster cell the center.
  Now do for every triangle:

    Find all cells within the triangle.
    Then use the shape functions of the triangle to calculate the height/value for
    every cell center within the triangle.
    Write those values to the corresponding cells.

done
###################################

You have to project the triangle calculations into parametric coordinates, because
shape functions are normaly in parametric space. This is easy for triangles and
quadrangles. But not for polygons with more than five vertices.
But i guess TIN's usually consists of triangles.

You can ask your local computer graphics or FEM experts for help.

Hope this helps a bit
Best regards
Soeren

On Saturday 17 June 2006 10:07, ivan marchesini wrote:

Hi Laurent,
not useful!!
there's not the option (using v.to.rast) for converting a 3d area into a
raster :frowning:

Il giorno ven, 16/06/2006 alle 15.39 +0200, Laurent C. ha scritto:
> 2006/6/16, ivan marchesini <marchesini@unipg.it>:
> Hi Laurent, thanks for your answer....
> I know that v.surf.* is able to interpolate points and
> contours...
> but don't have this kind of data and I don't mind to
> interpolate points
> because I would like to obtain perfect planes in correspondace
> of the
> triangles!!! interpolating will obviously create some little
> difference
> between the elevation of the dem and of the original triangle
> surface...
> the boundaries that I have are 3d boundaries, they start from
> an
> elevation and finish to another...
> if you can imagine a 3d triangle you can also imagine a raster
> dem the
> cells of which has the same elevation of the plane in each
> point!!!
>
> I have tried to interpolate the tree points of a 3d
> triangle...
> using v.surf.rst and smoothing=0 and tension=1 (for creating
> a perfect
> plane) but the results is not so fine (please see the small
> attached
> file, I apologize for this image with the users of the mailing
> list)
>
> I know I can use r.plane for creating a single plane but I
> should know
> the azimut and deep of the plane... is there a way to obtain
> this
> information for a 3d triangle??? (not in a manual way
> obviously)
>
> any idea???
> thanks
>
> Ivan
>
>
>
>
>
>
>
> Il giorno ven, 16/06/2006 alle 10.55 +0200, Laurent C. ha
> scritto:
> > Hi,
> > You can try v.surf.*
> >
> > 2006/6/16, ivan marchesini <marchesini@unipg.it>:
> > Dear all...
> > I have been able to create a tin starting from the
> v.delaunay
> > module and
> > then manual editing the v.delaunay output exported
> with
> > v.in.ascii
> > (format=standard)
> > now I can see, using nviz, the some filled triangles
> in the
> > 3d
> > space...!!!!
> > now the problem:
> > I would like to transfrom the tin surface in a
> raster
> > surface...
> > is it possible in some way!!!!
> > any idea???
>
> I see. What sort of result give v.to.rast ?

On Fri, 16 Jun 2006 10:50:23 +0200
ivan marchesini <marchesini@unipg.it> wrote:

Dear all...
I have been able to create a tin starting from the v.delaunay module
and then manual editing the v.delaunay output exported with v.in.ascii
(format=standard)
now I can see, using nviz, the some filled triangles in the 3d
space...!!!!
now the problem:
I would like to transfrom the tin surface in a raster surface...
is it possible in some way!!!!
any idea???

This *might* work:

Get the apices of your triangles into points vector, rasterize it
(v.to.rast) and feed to my r.surf.nnbathy
(http://grass.gdf-hannover.de/wiki/GRASS_AddOns).

You will only have to modify the script slightly. In line 138 put "-P
alg=l" instead of "-P alg=nn". This will make nnbathy triangulate
only, without any smoothing.

Let me know if it worked.

Maciek

P.S.

Please don't post to grasslist@baylor.edu. Post to
grassuser@grass.itc.it.

------------------------------------------------------------------------
CIEP?E KRAJE - CIEP?E MORZA. Szukasz atrakcyjnego wypoczynku w przyst?pnej cenie, zapoznaj si? z nasz? ofert?.
ZAPRASZAMY

www.skarpatravel.pl

Dear all, dear Maciek,
many thanks to all for the answers..
the solution proposed by Maciek works really well...
it seems that the module v.surf.nnbathy modified changing in line 138
"-P alg=nn" with "-P alg=l" is able to create a plane passing for tree
rasterized points!!!!
many thanks!!!
Ivan

Il giorno sab, 17/06/2006 alle 13.00 +0200, Maciek Sieczka ha scritto:

On Fri, 16 Jun 2006 10:50:23 +0200
ivan marchesini <marchesini@unipg.it> wrote:

> Dear all...
> I have been able to create a tin starting from the v.delaunay module
> and then manual editing the v.delaunay output exported with v.in.ascii
> (format=standard)
> now I can see, using nviz, the some filled triangles in the 3d
> space...!!!!
> now the problem:
> I would like to transfrom the tin surface in a raster surface...
> is it possible in some way!!!!
> any idea???

This *might* work:

Get the apices of your triangles into points vector, rasterize it
(v.to.rast) and feed to my r.surf.nnbathy
(http://grass.gdf-hannover.de/wiki/GRASS_AddOns).

You will only have to modify the script slightly. In line 138 put "-P
alg=l" instead of "-P alg=nn". This will make nnbathy triangulate
only, without any smoothing.

Let me know if it worked.

Maciek

P.S.

Please don't post to grasslist@baylor.edu. Post to
grassuser@grass.itc.it.

------------------------------------------------------------------------
CIEP?E KRAJE - CIEP?E MORZA. Szukasz atrakcyjnego wypoczynku w przyst?pnej cenie, zapoznaj si? z nasz? ofert?.
ZAPRASZAMY

www.skarpatravel.pl

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
        ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

Ivan,

Do you mind posting an example of your results? Also, out of curiosity, how do you plan on making use of this capability?

Regards,
Tom

ivan marchesini wrote:

Dear all, dear Maciek,
many thanks to all for the answers..
the solution proposed by Maciek works really well...
it seems that the module v.surf.nnbathy modified changing in line 138
"-P alg=nn" with "-P alg=l" is able to create a plane passing for tree
rasterized points!!!!
many thanks!!!
Ivan

Il giorno sab, 17/06/2006 alle 13.00 +0200, Maciek Sieczka ha scritto:
  

On Fri, 16 Jun 2006 10:50:23 +0200
ivan marchesini <marchesini@unipg.it> wrote:

Dear all...
I have been able to create a tin starting from the v.delaunay module
and then manual editing the v.delaunay output exported with v.in.ascii
(format=standard) now I can see, using nviz, the some filled triangles in the 3d
space...!!!!
now the problem:
I would like to transfrom the tin surface in a raster surface...
is it possible in some way!!!!
any idea???
      

This *might* work:

Get the apices of your triangles into points vector, rasterize it
(v.to.rast) and feed to my r.surf.nnbathy
(http://grass.gdf-hannover.de/wiki/GRASS_AddOns).

You will only have to modify the script slightly. In line 138 put "-P
alg=l" instead of "-P alg=nn". This will make nnbathy triangulate
only, without any smoothing.

Let me know if it worked.

Maciek

P.S.

Please don't post to grasslist@baylor.edu. Post to grassuser@grass.itc.it.

------------------------------------------------------------------------
CIEP?E KRAJE - CIEP?E MORZA. Szukasz atrakcyjnego wypoczynku w przyst?pnej cenie, zapoznaj si? z nasz? ofert?.
ZAPRASZAMY

www.skarpatravel.pl

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

Dear Thomas, dear all...
my application is, at the moment, really simple...
I have the stratigraphy of tree points very near each other...
I was able to note the same stratigraphic sequence in the tree points,
but at different deeps....
My needs were to rebuild the bedding of the bottom and of the top of
some geologic layers....
in this way I can estimate the deep of these layer in different points
from the tree already sampled...
this is interesting for geothecnical reasons... because the thickness of
the layers is important for the calculation regarding the basement of
tree building
I have used the modified version of v.surf.nnbathy to find the plane
passing through tree 3d point (I had a vector 3d point map and I have
converted it into a simple raster map)
in this way I have obtained a raster map representing a 3d triangular
plane (see fig1.jpg)
using r.slope.aspect I have been able to obtain deep and direction of
the plane
then using r.plane I have been able to create a plane passing through
the tree points and extending outside of them (see fig2.jpg)
I hope this help to understand!!!
best regards
Ivan

Il giorno dom, 18/06/2006 alle 06.33 -0400, Thomas Adams ha scritto:

Ivan,

Do you mind posting an example of your results? Also, out of curiosity,
how do you plan on making use of this capability?

Regards,
Tom

ivan marchesini wrote:
> Dear all, dear Maciek,
> many thanks to all for the answers..
> the solution proposed by Maciek works really well...
> it seems that the module v.surf.nnbathy modified changing in line 138
> "-P alg=nn" with "-P alg=l" is able to create a plane passing for tree
> rasterized points!!!!
> many thanks!!!
> Ivan
>
>
>
> Il giorno sab, 17/06/2006 alle 13.00 +0200, Maciek Sieczka ha scritto:
>
>> On Fri, 16 Jun 2006 10:50:23 +0200
>> ivan marchesini <marchesini@unipg.it> wrote:
>>
>>
>>> Dear all...
>>> I have been able to create a tin starting from the v.delaunay module
>>> and then manual editing the v.delaunay output exported with v.in.ascii
>>> (format=standard)
>>> now I can see, using nviz, the some filled triangles in the 3d
>>> space...!!!!
>>> now the problem:
>>> I would like to transfrom the tin surface in a raster surface...
>>> is it possible in some way!!!!
>>> any idea???
>>>
>> This *might* work:
>>
>> Get the apices of your triangles into points vector, rasterize it
>> (v.to.rast) and feed to my r.surf.nnbathy
>> (http://grass.gdf-hannover.de/wiki/GRASS_AddOns).
>>
>> You will only have to modify the script slightly. In line 138 put "-P
>> alg=l" instead of "-P alg=nn". This will make nnbathy triangulate
>> only, without any smoothing.
>>
>> Let me know if it worked.
>>
>> Maciek
>>
>> P.S.
>>
>> Please don't post to grasslist@baylor.edu. Post to
>> grassuser@grass.itc.it.
>>
>> ------------------------------------------------------------------------
>> CIEP?E KRAJE - CIEP?E MORZA. Szukasz atrakcyjnego wypoczynku w przyst?pnej cenie, zapoznaj si? z nasz? ofert?.
>> ZAPRASZAMY
>>
>> www.skarpatravel.pl
>>
>>
>>

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
        ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org

(attachments)

fig1.jpg
fig2.jpg