Skip to content
Prev 9403 / 29559 Next

Problem with spTransform en +towgs84 ?

Hi,
Just to add that I've also detected some problems in this sense. I've have
exported a shapefile from ArcGIS to KML, and also imported it into R, and
from there to KML. The final KML files differ in some 70m of latitude,
while the longitudes match.

# import the shapefile
[1] " +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000
+ellps=airy +units=m +no_defs"

# Note, the above is OSGB 1936 / British National Grid, which  equals
# CRS("+init=epsg:27700")
# Then:

knapdale.supgeoLL <- spTransform(knapdale.supgeo, CRS("+proj=longlat +
datum=WGS84"))
kmlf <- "knapdale_supgeo.kml"
writeOGR(knapdale.supgeoLL, dsn=kmlf, layer="supgeo", driver="KML")

I'm not saying that the R part is responsible for the difference, but the
mismatch is there. Some details:

ArcGIS 9.3 (Windows XP Pro)
R 2.10.1
Loading required package: sp
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.4.2.0, released 2007/06/27
Path to GDAL shared files: /usr/local/share/gdal
Loaded PROJ.4 runtime: Rel. 4.5.0, 22 Oct 2006
Path to PROJ.4 shared files: (autodetected)

Best regards,
Javier