shapeinfo - Information about shapefile

Syntax

info = shapeinfo(filename)

info = shapeinfo(filename) returns a structure, info, whose fields contain information about the contents of a shapefile.

The shapefile format was defined by the Environmental Systems Research Institute (ESRI) to store nontopological vector geometry and attribute information for spatial features. A shapefile consists of a main file, an index file, and an xBASE table. All three files have the same base name and are distinguished by the extensions .SHP, .SHX, and .DBF, respectively (e.g., given the base name 'roads' the shapefile filenames would be 'roads.SHP', 'roads.SHX', and 'roads.DBF').

filename can be the base name or the full name of any one of the component files. shapeinfo reads all three files as long as they exist in the same directory and have valid file extensions. If the main file (with extension .SHP) is missing, shapeinfo returns an error. If either of the other files is missing, shapeinfo returns a warning.

Field Descriptions

The info structure contains the following fields:

Filename

Char array containing the names of the files that were read

ShapeType

String containing the shape type

BoundingBox

Numerical array of size 2-by-N that specifies the minimum (row 1) and maximum (row 2) values for each dimension of the spatial data in the shapefile

Attributes

Structure array of size 1-by-numAttributes that describes the attributes of the data

NumFeatures

The number of spatial features in the shapefile

The Attributes structure contains these fields:

See Also

shaperead

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS