Get shapefile header information; the file should be given including its ".shp" extension, and the function will reconstruct the names of the database (dbf) file and the index (shx) file from these.

getinfo.shape(filen)
# S3 method for shapehead
print(x, ...)

Arguments

filen

name of file with *.shp extension

x

a shapehead list as returned by getinfo.shape

...

other arguments passed to print

Details

The function calls code from shapelib to read shapefiles, a file format used by ESRI GIS software among others

Value

The function returns a list of class shapehead.

References

http://shapelib.maptools.org/

Examples

res <- getinfo.shape(system.file("shapes/fylk-val.shp", package="maptools")[1]) res
#> Shapefile type: PolyLine, (3), # of Shapes: 97
str(res)
#> List of 5 #> $ fname : chr "/tmp/RtmpzUfsIM/temp_libpath464595bd55c54/maptools/shapes/fylk-val.shp" #> $ type : int 3 #> $ entities : int 97 #> $ minbounds: num [1:4] -4868 6456207 0 0 #> $ maxbounds: num [1:4] 1084722 7841997 0 0 #> - attr(*, "class")= chr "shapehead"