Cartographic projection library (proj) built without datum conversion grid data
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.
wget ftp://ftp.
tar xzf proj-4.6.1.tar.gz
cd proj-4.6.1/nad
tar xzf ../../proj-
cd ..
./configure --prefix=/usr && make
The build will now properly convert datums between NAD83 and NAD27. Without the proj-datumgrid-
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.
I should have remarked on the source package I'm referring to. It's this one:
https:/ /launchpad. net/ubuntu/ +source/ proj