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

Radim Blazek radim.blazek at wo.cz
Tue Jan 22 23:05:59 EST 2002


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.

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.


> I though of a structure that may help.  This structure define areas
> and polygons.  An area is made of an external polygon and may have zero
> to n islands.  Islands are still polygons and areas for others and
> thus share boundaries.  This structure should reduce the number of funtions
> because polygons are always defined the same way; ex. the surface of an
> area is the surface of the external polygon minus the surfaces of the
> islands polygons.  The polygons are only define once eventhough they are
> used in more than one area.

>
> With this structure, areas, islands and even linear features
> can share edges.  Areas can have islands which are areas that can
> also have islands.
>
> This approch depend heavily on lists.
>
> I willing to spend some time to identify the impact on the GRASS
> vector format and its topology.
>
>

I think that this structure is similar to grass. But island is something else 
than area. Islands and areas inside other area are not identical!
(See my comments above about shared edges)

You have:
Area {  polygon; *polygons(islands) }
Polygon{ *edges }

In grass:
Area{ *edges; *islands }
Island{ *edges }


Radim






More information about the grass-dev mailing list