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)

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to