Once a shapefile is opened or created, it's not going to change geometry type, so we can safely cache categorical information about the type in ShapefilePtr. Cache the info returned by [shp type base] and [shp type dimension]. Use these basetype and dimensiontype variables to simplify the large conditional expressions currently used in [coords] and [bounds] to select behavior based on shape type.
Once a shapefile is opened or created, it's not going to change geometry type, so we can safely cache categorical information about the type in ShapefilePtr. Cache the info returned by [shp type base] and [shp type dimension]. Use these basetype and dimensiontype variables to simplify the large conditional expressions currently used in [coords] and [bounds] to select behavior based on shape type.