[R] mapproject Lambert in metres

Nevil Amos nevil.amos at gmail.com
Mon Jun 21 06:07:51 CEST 2010


I have the following script to convert Longitude and Latitude into 
lambert projection ( adapted from Geneland manual).  How do I get the 
proejction with units in metres rather than whatever they are 
currently?  alos is it possible to add a fualse XY so that all values 
are positive ( all my lattidudes are south ie negative)

Many thanks

Nevil Amos

Monash University

LONGLAT is a headerless two column file of longitude and latitude
such as

141 -32
142 -35
136 -20

## load packages
require(mapproj)
require(maps)
## read raw data
coord.lonlat <- LONGLAT
## convert (Lon,Lat) coordinates into Lambert
mapproj.res <- mapproject(x=coord.lonlat[,1],
y=coord.lonlat[,2],
projection="lambert",
param=c(min(coord.lonlat[,2]),max(coord.lonlat[,2])))
## save planar coordinates as a two-column matrix
coord.lamb <- cbind(mapproj.res$x,mapproj.res$y)



More information about the R-help mailing list