[GRASS5] GRASS -> SF

Radim Blazek blazek at itc.it
Sat Feb 21 05:30:32 EST 2004


On Saturday 21 February 2004 01:29, Morten Hulden wrote:
> What about centroid rules? When I imported (+ rebuilt topology) polygons
> from e00 to Postgis I had to drop part of the 'polygons' (actually,
> I imported them as lines just like the open ended arcs) because inner
> rings touched the outer ring at more than one single point.
>
> Following is an illegal inner ring. In Mapserver it is not possible to
> fill A with a color without filling B too.
>
> +---------+
> |    A    |
> +-----+   |
> |  B  |   |
> +-----+   |
> |         |
> +---------+
>
> So, would the new Grass vector format allow this topology, and could flood
> fills still be handled correctly?

??? I don't understand why the example above should not be handled correctly
in GRASS, regardless version. How GRASS is involved if Mapserver doesn't 
do what you want. Did you use GRASS to import e00 to PostGIS?

In GRASS, whenever 'inner' ring touches the boundary of outside area, even in 
one point, it is no more 'inner' ring, it is simply another area. 
A, B above can never be exported from GRASS as polygon A with inner ring B
because there are only 2 areas A and B and no island. 
 
A problem could appear if both areas A and B had the same category (attributes).
Then it would be logical to export them as MultiPolygon. In this case
however, the MultiPolygon would be incorrect (SF specification), because 
 "The Boundaries of any 2 Polygons that are elements of a MultiPolygon 
  may not cross and may touch at only a finite number of points."
But I am sure, that GRASS currently does not export any Multi* features.

BTW, I don't see any reason for that rescriction defined for multipolygons
in SF specification. Does anybody has idea why MultiPolygon parts cannot 
touch along a line? 

Radim










More information about the grass-dev mailing list