anoved / Shapetcl

Simple shapefile access for Tcl.
MIT License
3 stars 0 forks source link

Cache shape type base type and dimension type #42

Closed anoved closed 11 years ago

anoved commented 11 years ago

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.