[GRASS5] Fw: d.area progress report...

Eric G. Miller egm2 at jps.net
Tue Jan 22 11:34:49 EST 2002


On Wed, 23 Jan 2002 05:05:59 +0100, Radim Blazek <radim.blazek at wo.cz> wrote:

> On Monday 21 January 2002 19:10, Robert Lagacé wrote:
> > "Eric G. Miller" wrote:
> > > Just wanted to say, I've finally made some significant progress
> > > implementing a area w/holes simplifier.  Unfortunately, seems
> > > I made an unwarranted assumption about the possibility of
> > > colinear line segments (I didn't think about the fact that
> > > that island/holes may share edges).  So, hopefully I can
> > > work in some code for handling colinear segments in the
> > > next week, and then possibly get some of this code into GRASS.
> 
> I don't think that islands can share edges. If area contains two areas
> (which share boundaries) only one island (without that shared lines)
> is build. That is how v.build works.

It's possible my test for colinearity is in error.  But what I'm 
referring to is the case where an outer area contains interior
areas which can indeed share edges.  In the context of the outer
area, they should be considered as holes.  But, what I want to
get is the maximal interior boundary without any shared edges
of interior areas.  Make sense?

> But in grass51, we have support for shapefiles for example, and there
> you can get any mess of course.
> 
> > >   D_area_plot (struct Map_info *, int);
> 
> I would prefer less access to the internal structures. Even instead of
>   D_area_add_ring (struct line_pnts *) 
> I woud suggest 
>   D_area_add_ring (double *x, double *y, int n_points)
> That is more universal.

Yes, I guess so.  But I'm tending to lean toward the D_area_plot ()
interface for the functionality I'm currently working on, since the
algorithm I'm using has the assumption that rings intersect or
share edges.  I intend to also implement the more generalized
version later (it is slightly more expensive).
 


-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list