Does the shapefile support mixed geometry types (ie. point and polygon all in the same file)?
Answer
Answer can be found from the official specification http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf.
All the non-Null shapes in a shapefile are required to be of the same shape type. The
values for shape type are as follows:
Value Shape Type
0 Null Shape
1 Point
3 PolyLine
5 Polygon
8 MultiPoint
11 PointZ
13 PolyLineZ
15 PolygonZ
18 MultiPointZ
21 PointM
23 PolyLineM
25 PolygonM
28 MultiPointM
31 MultiPatch
Shape types not specified above (2, 4, 6, etc., and up to 33) are reserved for future use.
Currently, shapefiles are restricted to contain the same type of shape as specified above.
In the future, shapefiles may be allowed to contain more than one shape type. If mixed
shape types are implemented, the shape type field in the header will flag the file as such.
Notice also that points and multipoints can't be saved into same shapefile while lines and polylines can, as well as polygons and multipolygons.
No comments:
Post a Comment