Skip to content

Conversion of points from AGD66 to WGS84?

2 messages · Adam, Michael Sumner

#
As far as I know, the EPSG 4202 init form is not sufficient, and you
need to specify the datum parameters explicitly.  Wherever in the
database "aust_SA" is defined it is not getting the actual parameters
for some reason - I don't know if that requires an install/build
configuration, but I've just done it manually in the past and stored
the values myself.

So,

pts <- matrix(c(145.1167, -37.83333), ncol = 2)

aust_SA <- SpatialPoints(pts, CRS("+init=epsg:4202"))

agd66 <- SpatialPoints(pts, CRS("+proj=longlat +towgs84=-127.8,-52.3,152.9"))

## no difference
spTransform(aust_SA, CRS("+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0"))

##SpatialPoints:
##    coords.x1 coords.x2
##[1,]  145.1167 -37.83333
##Coordinate Reference System (CRS) arguments: +proj=longlat
+datum=WGS84 +ellps=WGS84 +towgs84=0,0,0

## works now
spTransform(agd66, CRS("+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0"))

##SpatialPoints:
##     coords.x1 coords.x2
##[1,]   145.118 -37.83183
##Coordinate Reference System (CRS) arguments: +proj=longlat
+datum=WGS84 +ellps=WGS84 +towgs84=0,0,0

It doesn't seem to matter if I use the 3-parameter towgs84 argument
for AGD66 or the 7-param one listed here, but I don't know the details
of why:
http://www.osgeo.org/pipermail/gdal-dev/2006-February/008090.html

There's also this for what it's worth:
http://www.osgeo.org/pipermail/gdal-dev/2007-November/014762.html

I don't know apart from a matter of experience how to find out if the
EPSG presets are appropriate or not, so I'd just recommend doing some
reading on the topic to convince yourself.

(I checked that transformation above against the presets available in
Manifold GIS, which I happen to have verified for this quite some time
ago so I'm confident that it's right.)

There are several resources on the web for verifying this transformation, i.e.

http://www.ga.gov.au/earth-monitoring/geodesy/geodetic-datums/about.html

Cheers, Mike.

On Wed, Apr 4, 2012 at 2:11 PM, ADAM PETER CARDILINI
<apcar at deakin.edu.au> wrote: