SpatialEpi (version 1.2.8)

grid2latlong: Convert Coordinates from Grid to Latitude/Longitude

Description

Convert geographic coordinates from Universal Transverse Mercator system to Latitude/Longitude.

Usage

grid2latlong(input)

Value

Either a data frame with the corresponding longitude and latitude, or a SpatialPolygons object with the coordinates changed.

Arguments

input

A data frame with columns named x and y of the UTM coordinates to convert or an n x 2 matrix of grid coordinates or an object of class SpatialPolygons (See SpatialPolygons-class)

Author

Lance A. Waller

Details

Longitude/latitudes are not a grid-based coordinate system: latitudes are equidistant but the distance between longitudes varies.

Examples

Run this code
coord <- data.frame(rbind(
# Montreal, QC
c(-6414.30, 5052.849),
# Vancouver, BC
c(-122.6042, 45.6605)
))

grid2latlong(coord)

Run the code above in your browser using DataLab