make_EPSG chile
On 27/01/13 22:09, Orietta Nicolis wrote:
Dear R users, I'm trying to run the following example with data of Chile, but I didn't find a EPSG code for this country which could be used in R.
Hi Orietta,
AFAIK, in Chile there are two main local projections:
PSAD56 / UTM zone 18S, and
PSAD56 / UTM zone 19S
which are used depending on the latitude you are working on.
For PSAD56_Z19S, you may try:
library(sp)
psad56.p4s <- CRS("+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs")
which is equivalent to use EPSG:24879
if you need higher precision, you may need to add the '+towgs84'
argument to 'psad56.p4s'
Saludos,
Mauricio
PS,
I'm happy to know there are people in Chile using R !
================================================= Water Resources Unit Institute for Environment and Sustainability (IES) Joint Research Centre (JRC), European Commission TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT webinfo : http://floods.jrc.ec.europa.eu/ ================================================= DISCLAIMER: "The views expressed are purely those of the writer and may not in any circumstances be regarded as sta- ting an official position of the European Commission" ================================================= Linux user #454569 -- Ubuntu user #17469 ================================================= "True courage is a result of reasoning. A brave mind is always impregnable" (Jeremy Collier) > data<http://inside-r.org/r-doc/utils/data>(meuse) > coordinates(meuse)<-~x+y proj4string(meuse)<- CRS('+init=epsg:28992') > # Line data > data<http://inside-r.org/r-doc/utils/data>(meuse.grid) > coordinates(meuse.grid)<-c<http://inside-r.org/r-doc/base/c>('x','y') > meuse.grid<-as<http://inside-r.org/r-doc/methods/as>(meuse.grid, > 'SpatialPixelsDataFrame') > im<-as.image.SpatialGridDataFrame(meuse.grid['dist']) > cl<-ContourLines2SLDF(contourLines<http://inside-r.org/r-doc/grDevices/contourLines> > (im)) > proj4string(cl)<- CRS('+init=epsg:28992') > > > I run the script: > > make_EPSG("Chile") > > but it gives the following error: > > In file(file, open = "r") : > cannot open file 'Chile': No such file or directory > Please, can anyone suggest me how to solve this problem? > Thank you very much, > Orietta > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo >