Learn R Programming

fossil (version 0.4.0)

lats2Shape: Converting a Table of Latitudes and Longitudes to a Shapefile

Description

A helper function to convert a table of latitudes and longitudes (and associated attributes, if applicable) into a shapefile

Usage

lats2Shape(lats)

Arguments

lats

a table with a latitude and longitude column respectively with associated attributes

Value

A shapefile object which can be written to file using write.shapefile

Details

The table to be converted must contain as it's first two columns the latitude (or Y) and longitude (or X) values to be converted. Any other number of columns in any format can also be attached, and will be included in the attribute table.

See Also

msn2Shape

Examples

Run this code
# NOT RUN {
#use fdata.lats as dataset
data(fdata.lats)
shape.lats<-lats2Shape(fdata.lats)
write.shapefile(shape.lats, file='/path/to/write/lats')
# }

Run the code above in your browser using DataLab