Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#64 closed enhancement (fixed)

Handling of projections with towgs84 parameter

Reported by: siramon Owned by: madair
Priority: major Milestone: 1.0.3
Component: core Version: trunk
Keywords: towgs84 Cc:


Currently the transformation between projections with a +towgs84 and non wgs84 projections do not work correctly. The configured shifting towards WGS84 is ignored.

For example the transformation between a Swiss CH1903/LV03 projection (EPSG:21781) and Spherical Mercator (EPSG:900913) will result like this: 699212,227132 --> 973920.41319,5972983.93373 which is not correct. It should be: 699212,227132 --> 973791.60867,5972764.60117

The attached patch (Patch 1) will transform any source-projection with a towgs84-parameter first to the WGS84 projection and then to the desired destination projection. This works also the other way around.

There is already a workaround handling some Spherical Mercator transformation first to WGS84. This workaround does not work for the example above because dest.datum_params (which is actually only set, if there is a towgs84-parameter ??) is set in the above scenario and therefore the workaround doesn't handle it correctly.

Perhaps it's even possible to replace the current implemented workaround completely with the new one (Patch 2 handles this scenario).

Kind regards Rolf

Attachments (2)

patch1.patch (944 bytes ) - added by siramon 12 years ago.
both workarounds coexisting
patch2.patch (1.0 KB ) - added by siramon 12 years ago.
Existing workaround overwritten

Download all attachments as: .zip

Change History (5)

by siramon, 12 years ago

Attachment: patch1.patch added

both workarounds coexisting

by siramon, 12 years ago

Attachment: patch2.patch added

Existing workaround overwritten

comment:1 by siramon, 12 years ago

Version: trunk

comment:2 by madair, 12 years ago

Resolution: fixed
Status: newclosed

patch2 applied at rev [2156].

Thanks for the patch!

comment:3 by madair, 12 years ago

Note: See TracTickets for help on using tickets.