Ticket #64 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

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:

Description

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

patch1.patch Download (0.9 KB) - added by siramon 3 years ago.
both workarounds coexisting
patch2.patch Download (1.0 KB) - added by siramon 3 years ago.
Existing workaround overwritten

Change History

Changed 3 years ago by siramon

both workarounds coexisting

Changed 3 years ago by siramon

Existing workaround overwritten

Changed 3 years ago by siramon

  • version set to trunk

Changed 2 years ago by madair

  • status changed from new to closed
  • resolution set to fixed

patch2 applied at rev [2156].

Thanks for the patch!

Changed 2 years ago by madair

  • milestone changed from 1.0.2 to 1.0.3
Note: See TracTickets for help on using tickets.