[mapserver-users] Polygon Questions

Frank Warmerdam warmerdam at pobox.com
Thu Nov 8 09:48:07 EST 2001



Stephen Woodbridge wrote:

> Hi again,
> 
> Does mapserver, or shapefiles for that matter, care if polygon points
> are ordered clockwise or counter-clockwise?
> 
> In shapefiles, a polygon can be in multiple parts?
>   1) Does this mean multiple smaller closed polygons which constitue a 
>      large object?
>   2) A large polygon, where the additional parts represent islands in
>      the larger one.
>   3) something else all together :)
> 
> -Stephen Woodbridge



Stephen,

o I don't think MapServer cares about the direction of polygon vertices.

o The Shapefile spec is specific about the ordering of vertices in the
   rings based on whether they are exterior or interior rings; however,
   it doesn't appear that ESRI products depend on this, and many generators
   of shapefiles are careless in generation (notably my own Shapelib!).

o Shapefile polygons can be multiple islands as well as having holes in
   islands.  Both options are correctly handled by MapServer.


I could be wrong on any of the above, but I am pretty sure I am right.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list