SpatialEpi (version 1.2.3)

grid2latlong: Convert Coordinates from Grid to Latitude/Longitude

Description

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

Usage

grid2latlong(input)

Arguments

input

A data frame with columns named x and y of the UTM coordinates to convert

input

either an n x 2 matrix of grid coordinates or an object of class SpatialPolygons (See SpatialPolygons-class)

Value

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

Details

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

See Also

latlong2grid

Examples

Run this code
# NOT RUN {
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