shapefiles and objectClass

12 views
Skip to first unread message

Steve Cumming

unread,
Oct 14, 2016, 10:59:48 AM10/14/16
to SpaDES Users
Hi all: what would be the conventional objectClass for a shp?

sc

Eliot McIntire

unread,
Oct 14, 2016, 11:29:51 AM10/14/16
to SpaDES Users
If it is a polygon shapefile, then: SpatialPolygonsDataFrame
If it is a points shapefile, then: SpatialPointsDataFrame
If it is a lines shapefile, then: SpatialLinesDataFrame

They are defined in the sp package.
Importing shp files to those formats can be done many ways, but easily with shapefile function in raster package. This function, and others, usually go through gdal (see help for ?shapefile)
Reply all
Reply to author
Forward
0 new messages