Following How many interior and exterior rings can a polygon have in a standard ArcGIS shapefile?, can I have a mixture of two kinds of geometry in a shapefile of type point. Just like I have about shapefiles of type polygon or I should always create a shapefile of type multipoint in order to support multipoints in my layer?
My problem is as you see at How can I use ogrinfo to reach information about a .shp?, I can't use ogrinfo
in order to understand that the geometry type of a multipoint shapefile will be known as wkbMultipoint
or wkbPoint
when I use this line of code:
OGRwkbGeometryType GeometryType = poLayer ->GetGeomType();
for a layer of type multipoint
before programming.
- Will OGR know a layer of type
multipoint
aswkbpoint
orwkbmultipoint
? - When we create a shapefile in ArcCatalog, we have point and multipoint, but not multipolyline or multipolygon for polyline and polygon.Why?
Answer
Quoting the shapefile specification (page 4):
All the non-Null shapes in a shapefile are required to be of the same shape type.
You may choose point OR multipoint OR polygon, but you cannot use multiple geometry types in a single shapefile. Multi-part geometries are permitted in all flavors of multipoint, polyline, and polygon shapefiles.
No comments:
Post a Comment