[GRASS-dev] convert 3D polygons or Tins to a DEM?

Maris Nartiss maris.gis at gmail.com
Mon Jan 28 03:29:56 EST 2008


Hi  Helena and others.

Unfortunately 3D vector ignorance isn't the only problem of v.delaunay
- it still (as of 6.3.0RC4) fails to work correctly with more than
32XXX vector points [1] - thus making it not an option for large
datasets. Yesterday I looked on v.delaunay source and unfortunately
understood, that my C skills are too poor to fix it. :(

Fixing large dataset and 3D support problems would be a nice
improvement of GRASS vector support :)

Maris.

1. http://wald.intevation.org/tracker/index.php?func=detail&aid=335&group_id=21&atid=204


2008/1/28, Helena Mitasova <hmitaso at unity.ncsu.edu>:
>
> On Jan 25, 2008, at 2:46 PM, Markus Neteler wrote:
>
> > On Jan 21, 2008 7:59 PM, Helena Mitasova <hmitaso at unity.ncsu.edu>
> > wrote:
> >> On Jan 21, 2008, at 11:23 AM, Markus Neteler wrote:
> >>> On Jan 21, 2008 4:22 PM, Martin Landa <landa.martin at gmail.com>
> >>> wrote:
> >>>> 2008/1/21, Martin Landa <landa.martin at gmail.com>:
> >>>>> 2008/1/21, Markus Neteler <neteler at osgeo.org>:
> >>>>>> can we convert 3D polygons or tins to a DEM? Possibly a job for
> >>>>>> v.to.rast...
> >>>>>>
> >>>>>> v.to.rast help
> >>>>>> ...
> >>>>>>           use   Source of raster values:
> >>>>>>                 z    - use z coordinate (points or contours only)
> >>>>>>
> >>>>>> Would it be a big mess to extend that?
> >>>>>
> >>>>> I guess wouldn't be so complicated to add support also for faces
> >>>>> (and
> >>>>> 3d lines in general) to v.to.rast... I can try take a look.
> >>>>
> >>>> just idea,
> >>>>
> >>>> tin ->
> >>>>
> >>>> v.to.points -n
> >>>> v.clean tool=rmdupl
> >>>> v.surf.* -> dem
> >>>
> >>> well, this would only give an approximation AFAIK.
> >>
> >> that is right - if you want to preserve the triangle facets in the
> >> TIN
> >> you need to do linear interpolation using the 3 points of each
> >> triangle facet and you get something like this
> >> (this is TIN converted to raster in some old version of Arc)
> >>
> >> http://skagit.meas.ncsu.edu/~helena/gmslab/interp/F1b.gif
> >
> >
> > I discovered that we have tin.c in vectlib:
> >
> > int
> > Vect_tin_get_z (
> >                    struct Map_info *Map,
> >                    double tx, double ty,
> >                    double *tz, double *angle, double *slope)
>
> that looks promising - I checked v.delaunay and unfortunately it
> ignores the z-coordinate even if you give it 3D vector points - so first
> the v.delaunay would have to be updated to preserve the z-coordinates
> and write 3D vector map rather than 2D (perhaps not too complicated
> task)
> and then the simplest way would be just to call the above function
> for each grid point
> with Map being the 3D vector area map from v.delaunay.
> The computation of slope and aspect is missing  but adding those
> should be easy.
>
> maybe somebody with better C-programming skills could look at it -
> just adding
> the z coordinate to v.delaunay would add the missing TIN support to
> GRASS
> and the result could be visualized as 3D vector,
>
> Helena
>
>
> > Markus
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-dev
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>


More information about the grass-dev mailing list