Re: genapts

Hamish <[email protected]> Thu, 4 Nov 2004 10:40:26 +1300
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
Perhaps the Terragear project might find advantage in some of the good work 
done at Bowdoin for more aggressive polygon reduction?

[http://www.terragear.org]



Hamish

===============================================================

Begin forwarded message:

Date: Fri, 15 Oct 2004 15:09:24 -0400
From: Laura Toma <[email protected]>
Subject: Re: TINs


Hi,

It's good to hear that r.to.tin would be useful!  Terrain 
simplification was one of the projects I had last semester in my 
Algorithms for GIS class.   Jon Todd (student at Bowdoin) is working on 
porting this into GRASS and making it efficient for large grids.  He 
had to come up with a  structure for the TIN able to store the topology 
(neighbor information).  It looks like there'll be no problem writing 
this as a grass  vector file in  the end.

The next step will be to make it work for site data (s.to.tin) and 
therefore have it for LIDAR data.

This should be ready soon. We'll keep you posted! we'll probably need 
help with grass 5.7 development.

thanks,
laura


On Wednesday, September 22, 2004, at 05:11 AM, Radim Blazek wrote:

> On Wednesday 22 September 2004 07:57, Hamish wrote:
>>> I have a student who wrote a surface simplification algorithm (grid 
>>> to
>>> TIN) and we'd like to port it to GRASS, in case other people will 
>>> find
>>> it useful.
>>
>> Great. I've only worked with them a little when dealing with Arc/View
>> DEMs so I can't be too much help.
>
> Yes, great!
>
>>> I have a couple of questions about triangulations (TINs).
>>> How are they represented in GRASS? as vector? are TINs much different
>>> in 5.7 than in 5.3?
>
> There is no special structure or format for TIN in GRASS.
> I believe, but I may be wrong, that TIN can be stored as a regular
> vector map of areas, where boundaries are lines with 2 coordinates.
> http://mpa.itc.it/radim/g51/tin.png
> You can download demo mapset:
> http://mpa.itc.it/radim/g51/data.html
> and look at the vector 'tin'. With d.what.vect you can query
> the height for example. There is currently only one function
> in the library Vect_tin_get_z(), which works with such
> TIN representation.
>
>>> in general, do you think a module that transforms a grid into a TIN 
>>> by
>>> eliminating points so that the TIN surface is below a given error of
>>> the grid would be useful?
>
> Very useful I think, I was thinking about that for a long time,
> but never had time to start.
>
>>> i could not find anything in GRASS that uses TINs..
>
> Simply because nobody has written anything until now.
>
>> My guess: TINs are good when raster support is bad. Raster support in
>> GRASS was good so TINs never really happened in GRASS.
>
> I think, that each representation is suitable for different tasks
> and different data. Certainly TIN can be much more efficient
> in some cases.
>
> How can I help you to port it in GRASS? I expect that you know how to 
> read
> rasters. Do you have as result a set of TIN edges? If yes, you can 
> simply
> write it as new vector file in GRASS5.7:
> //------------------------------------------------------------
> struct Map_info Out;
> static struct line_pnts *Points;
> struct line_cats *Cats;
>
> Points = Vect_new_line_struct ();
> Cats = Vect_new_cats_struct ();
>
> Vect_open_new (&Out, "tin_name", 1);
>
> for ( ) {  // loop through your edges
>     Vect_reset_line ( Points );
>     Vect_append_point ( Points, x1, y1, z1 );
>     Vect_append_point ( Points, x2, y2, z2 );
>     Vect_write_line ( &Out, GV_BOUNDARY, Points, Cats );
> }
>
> Vect_build (&Out, stdout);
> Vect_close (&Out);
> //------------------------------------------------------------
>
> Then you can display the vector "tin_name", and query the height
> with d.what.vect and you get something like:
> -5125(E) -4458.33333333(N)
> tin in test  Area height: 116.239431
> Size - Sq Meters: 3055383.500           Hectares: 305.538
>            Acres: 754.983               Sq Miles: 1.1797
>
>
> Next useful modules would be v.tin.to.rast, v.contour and
> something which could devide TIN triangles so that
> a range of heights (e.g. 100-200m) can be displayed with the same 
> color.
> But your 'r.to.tin'(?) is the most important and the most
> difficult, the others just have to be written.
>
> Radim
>
>



_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d