getlatlong: getlatlong converts a SpatialPolygonsDataFrame to a...

Description Usage Arguments Value Examples

Description

getlatlong takes a SpatialPolygonsDataFrame, from the sp package, and converts it into a classic data.frame and includes the long and lat of each record as the last two columns. Thanks to Craig Mundy for this function.

Usage

1

Arguments

x

a SpatialPolygonsDataFrame, from the sp package

Value

a data.frame equivalent to x_at_data plus the long and lat as the last two columns

Examples

1
2
3
4
5
## Not run: 
 # ab <- readRDS(paste0(datadir,"G1Ha_2018_10_23.rds"))#get spatial obj
 # abdat <- getlatlong(ab)     # convert to data.frame + lat long

## End(Not run)

haddonm/abspatial documentation built on June 7, 2019, 9:54 a.m.