[GRASS5] Changes between 5.0.0 release and current release branch

Eric G. Miller egm2 at jps.net
Thu Nov 28 05:05:38 EST 2002


On Thu, Nov 28, 2002 at 09:26:39AM +0100, Radim Blazek wrote:
> On Thursday 28 November 2002 03:29 am, Eric G. Miller wrote:
> > *  Fixes interior boundary winding (shapefiles have exteriors clockwise,
> >    interiors counterclockwise) for areas with holes.  AFAIK,
> >    Vect_get_area_points and Vect_get_isle_points always return clockwise
> >    polygons. So isle point orders are reversed. Isles will come up
> >    twice, once as interior and once as exterior. (If my understanding of
> >    these API's is incorrect, someone please let me know.)
> 
> I thought that direction for areas/isles is the same in grass as in shapefile
> and Vect_get_isle_points returns counterclockwise vertices:
> 
> struct P_isle {
>   plus_t  *lines;  /* Boundary Lines (Negative means N2 to N1
>                       counter-clockwise) */
> }
> 
> int Vect_get_isle_points () {
>       if (Isle->lines[i] < 0) {
>           start = Points.n_points - 1; inc = -1 ; end = 1;
>       } else {
>           end = Points.n_points - 2; inc = 1 ; start = 0;
>       }
> }
> 
> It is strange if shapefiles with reverted order of isles are correct.
> Did you check it in ArcExplorer or other ESRI SW (AE runs on Linux)?

I checked w/ ArcGIS 8.1 against screen dump of the drawn map as GRASS
areas and they rendered the same (vs. earlier version with direction
reversal for "isles").  And areas were the ones I wanted.  If I remember
correctly, other folks checked as well and reported success.

The above snippet is identical in Vect_get_area_points.  They are
reversing edges that natively are in the opposite order of the flow
around the polygon.  I guess we'd have to hunt around the build code to
see how the edges are ordered to build areas and isles.  I still think
both "areas" and "isles" are built in clockwise order...

-- 
"...the plural of anecdote is [not?] data."  - attrib. to George Stigler




More information about the grass-dev mailing list