Hi again R-Geo users, 

after reading previous suggestions from Roger Bivand, I have used that the UTM I have were given  (I believe) in ED50 UTM in zone 30 string is:  "+proj=utm +zone=30 +ellps=intl +units=m towgs84=-87,-98,-121,0,0,0,0"
and the WGS84/LL string is  "+proj=longlat +datum=WGS84"
Hence, using the same example, it would be (hopefully):

library(rgdal)
datosUTM<-data.frame(cbind(c(559994, 559673),c(4781905,4781583)))
names(datosUTM)<-c("x", "y")
coordinates(datosUTM)<-c("x", "y")
proj4string(datosUTM)<-CRS("+proj=utm +zone=30 +ellps=intl +units=m towgs84=-87,-98,-121,0,0,0,0" )
summary(datosUTM)
datosLL<-spTransform(datosUTM, CRS("+proj=longlat +datum=WGS84" ))
datosLL
#SpatialPoints:
             x        y
[1,] -2.261748 43.18594
[2,] -2.265733 43.18306

Hope this way is OK. Otherwise please let me know. Thanks a lot, 

Berta



Hi R-geo users, 
  I am trying to convert a data set in UTM (from Spain, zone=30) to the corresponding 
  data set in longitude-latitude. Using convUL, it gives me strange results. Here I send my code, just in case somebody can tell me what i am missing. I suspect it has something to do with + proj or something that it is needed. 
  Thank you so much in advance,
  Berta

  library(PBSmapping)
  datainUTM<-data.frame(cbind(c(559994, 559673),c(4781905,4781583), c(0, 0), c(1,2)))
  names(datainUTM)<-c("X", "Y", "PID", "POS")
  attr(datainUTM, "projection") <-"UTM"
  attr(datainUTM, "zone") <-30
  datosLL<-convUL(datainUTM)

	[[alternative HTML version deleted]]


