to_wgs84: to_wgs84

Description Usage Value Examples

Description

to_wgs84 is a convenience function that transforms the CRS of an sp class object to the WGS 1984 (EPSG:4326) coordinate system.

Usage

1

Value

An sp class object.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# plot 2015 homicides on web contextual layer
h2015 <- subset(crimes.munged, OFFENSE1 == "HOMICIDE" & year == "2015")
h2015 <- to_wgs84(h2015) # projection used for webmaps
m <- data.frame(slot(h2015, "coords"), slot(h2015, "data"))
names(m)[1:2] <- c("lon", "lat")

## End(Not run)

MatthewSchumwinger/mkedata documentation built on May 7, 2019, 4:34 p.m.