[R-sig-Geo] spTransform: wrong results??

Roger Bivand Roger.Bivand at nhh.no
Fri Jul 10 19:19:26 CEST 2009


On Fri, 10 Jul 2009, Agustin Lobo wrote:

> Regarding the towgs84 parameters, I've found
> http://www.mail-archive.com/gdal-dev@lists.osgeo.org/msg02921.html
> and from there
> http://earth-info.nga.mil/GandG/coordsys/onlinedatum/CountryEuropeTable.html
>
> I'll test these values for my ED50, compare to GlobalMapper results
> and let the list know.

Fine, thanks.

>
> Where you say:
>
> 2009/7/10 Roger Bivand <Roger.Bivand at nhh.no>:
>> On Fri, 10 Jul 2009, Agustin Lobo wrote:
>>
>>> I'll try and let you know. For the future, no way to compile the
>>> towgs84 parameter so that could be automatically used
>>> by spTransform? This must be what programs like GlobalMapper do, as
>>> you just define input and output datum.
>>
>> No way. Choosing the 3 or 7 parameter datum transforms has to be the
>> responsibility of the user when there is no unequivocal authority. Having a
>> known ground control point (a GPS reading from a known point that has a
>> known CRS) can be used to see which CRS settings let you reproduce it. But
>> with legacy maps, this isn't so easy. GlobalMapper must I suppose be making
>> choices and using authorities that it acknowledges, but reading G&D does not
>> make me optimistic.
>
> I disagree, you could just use a default table of values letting the 
> user enter his/her own in case he/she considers that those of the table 
> are not appropriate (or do not exist). That's why default values exist 
> in R.  Let me know if can help.

It seems to me that the "right" place is the EPSG database. When there is 
an unequivocal +towgs84, it gets retrieved when the CRS is given as 
"+init=epsg:<#>" where <#> is the EPSG code. Since lots of software uses 
EPSG (and GDAL and PROJ.4), maintaining a separate database will risk 
getting out of date very soon - there are strong advantages in following 
the lead of people who really know about these things, unlike me, for 
example. This is about how to encapsulate expert knowledge, really. The 
EPSG and PROJ.4 route is only to set what is known to be right, and to 
leave it up to the user to choose.

It may be costly to have to survey a local ground control point (by DGPS 
or GPS if that is close enough, for example), but if that is what is 
required to integrate legacy maps, maybe there isn't an alternative. It is 
obvious from the sources you cite that ED50 +towgs84 parameters lie in 
intervals of +/-3m at best and +/-8m at worst, which isn't great, really - 
those are differences that you can see easily.

So I'll go for adding some attention-grabbing documentation in sensible 
places, maybe "ignoring datum declarations can seriously damage your 
health" near cliffs?

Roger

>
> Agus
>
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> Lluis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> e-mail Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list