Select to view content in your preferred language

Polygon and Polyline structure support for MultiPolys?

858
2
09-20-2011 04:11 PM
JoeShmoe
Deactivated User
I had a question about Polyline and Polygon in the ESRI Silverlight API:
http://help.arcgis.com/en/webapi/silverlight/2.1/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Geomet...
http://help.arcgis.com/en/webapi/silverlight/2.1/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Geomet...

Polyline's data structure seems to allow multiple Paths inside a single "Polyline".  Similarly, Polygon seems to allow multiple Rings within a single "Polygon".  MapPoints, on the other hand, have an entirely different class (MultiPoint) to support multiple MapPoints with a single Geometry.  Is it intended that Polyline and Polygon class should also satisfy the need for MulitPolylines and MultiPolygons?

Additionally, there is the question of holes (interior rings) in Polygons.  Is the right-hand-rule used to determine whether a Ring is a hole or not?  Should the Rings within a Polygon be ordered in any particular way to ensure proper parsing?  It seems rather cumbersome that Polygon should support multiple Rings and multiple holes in an arbitrary, unsorted order.  Is there any way to determine which holes go with which Rings?

Thanks!!!
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
I think MultiPolyline/Polygon can be achieved by having multiple paths/rings.

Should there be any holes or polygon was drawn in counter clockwise direction, you can use this utility:
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Geom...
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Simplify
0 Kudos
JoeShmoe
Deactivated User
I was able to confirm empirically that multi-polygons are supported, that the stacking order is basically the ring, all of its holes, the next ring, etc..  You must use the right-hand rule to determine if a polygon is a ring or a hole.  Its all pretty much like I assumed it was.
0 Kudos