Cartographic projection library (proj) built without datum conversion grid data

Bug #368065 reported by tvrusso
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
proj (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: proj

I am using Ubuntu 8.04 (Hardy). This bug report pertains to the proj-4.6.0_1 package, which I no longer have installed due to this bug (I've installed from source instead).

The cartographic projection library, proj, is advertised as now containing built-in datum conversion capability. Yet in all the binary packages I have checked (in Hardy and in Intrepid), the binary has been built without the NAD27/NAD83 datum conversion grid data.

Without this data, attempts to use libproj to convert between NAD27 and NAD83 result in no datum conversion at all (this is a flaw in the design, IMHO, because it should *TELL* you that there's a problem instead of just doing nothing, but that's not Ubuntu's fault). To demonstrate the issue, enter the following command on a system that has had the proj-4.6.0 binary installed:

cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83

This command should take longitude/latitude coordinates in NAD27 datum and transform them to NAD83 datum. Give it the following input:
106d35'27"W 36d10'15"N

The correct output would be:
106d35'29.13"W 36d10'15.063"N 0.000

which represents the correct datum shift between NAD27 and NAD83. Conversion between these two datums is impossible without the grid shift data due to the nature of the shift (which is non-uniform across the continent and must be tabulated).

On all versions of Ubuntu on which I've tried this, the answer is incorrect, returning instead exactly the same coordinates as the input. The error can be large --- in my part of the country, the error is 50 meters of east/west shift not being properly applied.

This indicates that the datum conversion grids were not added to the source code when the package was built. To build proj with the datum grids one has to do this (I am using the proj-4.6.1 source code to demonstrate, but it applies to 4.6.0 as well):

wget ftp://ftp.remotesensing.org/proj/proj-4.6.1.tar.gz
wget ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.4.tar.gz

tar xzf proj-4.6.1.tar.gz
cd proj-4.6.1/nad
tar xzf ../../proj-datumgrid-1.4.tar.gz
cd ..
./configure --prefix=/usr && make

The build will now properly convert datums between NAD83 and NAD27. Without the proj-datumgrid-1.4.tar.gz file being first untarred in the "nad" directory before building, the result is incorrect. This is a serious error when proj libraries are used in GIS software on data for North America, and the packages should be rebuilt for all versions of Ubuntu. I am told that this problem also exists in several other Debian-based systems such as Mepis.

Until the package is corrected, users of proj in North America would be advised to install from source using the instructions above rather than using the package. The package "libgeotiff" requires the "proj" package, so users of libgeotiff will have to install that package from source as well.

Revision history for this message
tvrusso (russo-bogodyn) wrote :

I should have remarked on the source package I'm referring to. It's this one:

https://launchpad.net/ubuntu/+source/proj

Revision history for this message
tvrusso (russo-bogodyn) wrote :

And further, I should note that the problem is not just for North America. The proj-datumgrid file includes information for US, Canadian, French and New Zealand that presumably also makes datum conversions for those areas incorrect when the grids are missing.

Revision history for this message
Alan Boudreault (aboudreault) wrote :

You can also use the proj packages in UbuntuGIS: https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
The issue is fixed is those packages.

Revision history for this message
Florian Hars (hars) wrote :

I can confirm that this bug is still present in the jaunty version of proj and that it is fixed in the proj from the ubuntugis ppa.

Changed in proj (Ubuntu):
status: New → Confirmed
Revision history for this message
tvrusso (russo-bogodyn) wrote :

This issue is still present in Karmic. It means that any user of GIS software in the Ubuntu repositories that depends on proj.4 will get incorrect results when working between NAD27 and NAD83 datums. This is a serious problem, and the fix is simple (I posted the commands for building it properly). Most users will not be aware of the issue until it bites them, and the ubuntugis ppa is not a solution they'll find quickly. Could someone please commit a fixed package built properly with datum shift grids, and backport it to older releases, too?

Revision history for this message
hamish (hamish-b) wrote :

try installing the "proj-data" package. :)

http://packages.ubuntu.com/karmic/i386/proj-data/filelist

it is missing as a dependency. I'll address that upstream in the DebianGIS package.

or is there something else going here on? (Alan?)

Hamish

Revision history for this message
hamish (hamish-b) wrote :

sorry, I had that a bit wrong.

In Karmic proj depends of libproj0 which depends on proj-data.

so if proj-data somehow manages not to be installed I'm not sure what the problem is/was.

Hamish

Revision history for this message
Bas Couwenberg (sebastic) wrote :

This has long since been fixed.

Changed in proj (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.