[R] Using transform on spproj package.

Ernesto Jardim ernesto at ipimar.pt
Thu Jun 9 17:15:15 CEST 2005


Hi,

I'm trying to use transform my mercator locations into utm but I'm doing 
something wrong because only x is transformed ... see

 > xy.sp
SpatialPoints:
        loni  lati
  [1,] -8.85 38.16
  [2,] -9.19 37.99
  [3,] -9.11 37.97
  [4,] -9.06 38.15
  [5,] -9.03 37.87
  [6,] -9.14 37.81
  [7,] -9.09 37.70
  [8,] -8.95 37.45
  [9,] -9.17 37.37
[10,] -9.00 37.34
Coordinate Reference System (CRS) arguments: +proj=merc +datum=WGS84
 > transform(xy.sp, CRS("+proj=utm +zone=29"))
SpatialPoints:
          loni     lati
  [1,] 1505638 38.62347
  [2,] 1505638 38.45141
  [3,] 1505638 38.43116
  [4,] 1505638 38.61335
  [5,] 1505638 38.32995
  [6,] 1505638 38.26922
  [7,] 1505638 38.15788
  [8,] 1505638 37.90485
  [9,] 1505638 37.82388
[10,] 1505638 37.79351
Coordinate Reference System (CRS) arguments:  +proj=utm +zone=29 
+ellps=WGS84

What am I doing wrong ?

Thanks

EJ




More information about the R-help mailing list