
Interior rings must always follow the exterior ring they partition "The order of rings in the points array is not significant." (though in practice, at least for Esri-generated shapefiles, interior rings nearly always follow the exterior ring they partition). Exterior rings must be clockwise, while interior rings must be counter-clockwise (this convention is known as right-hand rule since the shape would always be on your right-hand side as you walk the perimeter unfortunately, it can also be known as left-hand rule, because the exterior rings follow the direction of a curled left hand with the thumb pointed upward from the top of the figure). The shapefile specification does state that: Of course, having multiple exteriors doesn't prevent having one or more interior rings on each shape. If a shape has multiple rings, they can be exterior and interior (e.g., form a doughnut), or multiple exterior (e.g., island chain). Shapefile polygons are constructed from one or more closed rings. Each Curve in the boundary of the MultiPolygon is in the boundary of exactly 1 element Polygon, and every Curve in the boundary of an element Polygon is in the boundary of the MultiPolygon. The boundary of a MultiPolygon is a set of closed Curves (LineStrings) corresponding to the boundaries of its element Polygons. The interior of a MultiPolygon with more than 1 Polygon is not connected the number of connected components of the interior of a MultiPolygon is equal to the number of Polygons in the MultiPolygon. A MultiPolygon may not have cut lines, spikes or punctures, a MultiPolygon is a regular closed Point set. A MultiPolygon is defined as topologically closed. May not “cross” and may touch at only a finite number of Points The boundaries of any 2 Polygons that are elements of a MultiPolygon. The interiors of 2 Polygons that are elements of a MultiPolygon may not intersect. The assertions for MultiPolygons are as follows: Each hole defines a connected component of the exterior.Ī MultiPolygon is a MultiSurface whose elements are Polygons. The exterior of a Polygon with 1 or more holes is not connected. The interior of every Polygon is a connected point set. A Polygon may not have cut lines, spikes or punctures.
No two Rings in the boundary cross and the Rings in the boundary ofĪ Polygon may intersect at a Point but only as a tangent.The boundary of a Polygon consists of a set of LinearRings that make.
The assertions for Polygons (the rules that define valid Polygons) are as follows: The interior LinearRings will have the opposite orientation, and appear as clockwise when viewed from the "top". The exterior boundary LinearRing defines the “top” of the surface which is the side of the surface from which the exterior boundary appears to traverse the boundary in a counter clockwise direction. Each interior boundary defines a hole in the Polygon. In this case what I needed was simple polygon geometry without any attribute (Not sure this example make any distinction.)įrom a more formal point of view, I report the definition for both a polygon and a multipolygon (the following text and images come from this document of the OGC® Standards, all credits to the cited source).Ī Polygon is a planar Surface defined by 1 exterior boundary and 0 or more interior boundaries. Working mainly on shapefiles it seemed I was supposed to choose Multipolygon, although I needed only one polygon. One recent situation I have come to choose Polygon/Multipolygon was Changing parallel line length to split polygon in QGIS? in which I draw a dummy polygon as a background layer. (I had confused multi-polygon with multipart-polygon, so I used to choose Polygon.) How should I choose one of them (Polygon or Multipolygon) when I create a new polygon layer? Reading a new book "Mastering QGIS" (through this answer by Joseph to What does buffer mean in QGIS Voronoi dialog?), authors' comment was "ESRI shapefiles store geospatial data in multi- type geometry, so using multi- type geometry is a good practice if you plan on converting between formats."
Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them.