Saturday, 28 February 2015

arcgis desktop - Storing two kinds of point geometry in shapefile or creating multipoint shapefiles?



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 wkbPointwhen 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 as wkbpoint or wkbmultipoint?


  • 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

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...