[R-sig-Geo] more doubts with spTransform()

Agustin Lobo alobolistas at gmail.com
Tue Jul 14 09:42:54 CEST 2009


Inverse transform now:
 > anyellaWGS84 <- readOGR(dsn=".", layer="parcellesAnyellaWGS84")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "parcellesAnyellaWGS84"
with  6  rows and  7  columns
Feature type: wkbPoint with 2 dimensions
 > proj4string(anyellaWGS84)
[1] " +proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs 
+towgs84=0,0,0"
 > anyellaED50notowgs84 <- spTransform(anyellaWGS84,CRS("+proj=utm 
+zone=31 +ellps=intl +units=m +no_defs"))
 > anyellaED50towgs84 <- spTransform(anyellaWGS84,CRS("+proj=utm 
+zone=31 +ellps=intl +units=m +no_defs +towgs84=-87,-98,-121"))
 > coordinates(anyellaWGS84)[1,]
coords.x1 coords.x2
   421005   4683849
 > coordinates(anyellaED50notowgs84)[1,]
coords.x1 coords.x2
 421001.4 4683932.4
 > coordinates(anyellaED50towgs84)[1,]
coords.x1 coords.x2
 421097.5 4684050.9

which is correct? anyellaED50notowgs84 or anyellaED50towgs84 ?

I guess anyellaED50towgs84, but would like to confirm,

Thanks

Agus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090714/e5f6f165/attachment.vcf>


More information about the R-sig-Geo mailing list