Bug report #10800

Datum Transformation with target_crs_code different than 4326 gives huge errors

Added by Pedro Venâncio over 10 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Marco Hugentobler
Category:Projection Support
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:19179

Description

I've been doing some tests and found that, using a different target_crs_code than 4326 (wgs84), Datum Transformation simply ignores the values ​​of transformation.

Please test using this queries to insert a new tfm (EPSG:5037 http://epsg.io/5037) in srs.db:

insert into tbl_datum_transform (coord_op_code,source_crs_code,target_crs_code,coord_op_method_code,p1,p2,p3,p4,p5,p6,p7,remarks,scope,preferred,deprecated,area_of_use_code)
values (100050,4274,4258,9606,-230.994,102.591,25.199,0.633,-0.239,0.900,1.950,'Derived in July 2009 from 119 common stations. Residuals at 833 test points under 2m. Replaces Datum 73 to ETRS89 (3) (tfm code 1992).','2-metre accuracy.',0,0,1294);

insert into tbl_datum_transform (coord_op_code,source_crs_code,target_crs_code,coord_op_method_code,p1,p2,p3,p4,p5,p6,p7,remarks,scope,preferred,deprecated,area_of_use_code)
values (100051,4274,4326,9606,-230.994,102.591,25.199,0.633,-0.239,0.900,1.950,'Derived in July 2009 from 119 common stations. Residuals at 833 test points under 2m. Replaces Datum 73 to ETRS89 (3) (tfm code 1992).','2-metre accuracy.',0,0,1294);

The only difference between them is target_crs_code. See the result of Datum Transformation tool in the images attached:
- tfm 5037 (4274 - > 4258): more than 123m error!
- tfm 5037 changed, using exactly the same transformation parameters, but with target_crs_code 4326 (4274 - > 4326): error ~0.313m.

The error we get is huge, and I get exactly the same error if I set the shift values all to zero. It simply ignores the transformation using a different target_crs than 4326. The exception are NTv2 grids. Assigning them different target_crs, work well (there is one with target_crs 4150 and seven with 4258).

Actually it's even worse than ignoring, because if I do not choose any transformation and do "Cancel" on the Datum Transformation window, the point is reprojected based on the values ​​of default CRS +towgs84 parameter (gives an error of about 1.13m). With this data I am testing (EPSG:3763 vs. EPSG:27493), even without using on-the-fly reprojection, the difference between the point is only about 3.2m. Using target_crs 4258 in srs.db, regardless of the values​​, the error is more than 123m.

The most recent transformations in some European countries are calculated for 4258 and with this issue we can not use them in QGIS.

test_data.zip (5.21 KB) Pedro Venâncio, 2014-07-03 01:14 PM

tmf_5037_source4274_target4258.png (57.3 KB) Pedro Venâncio, 2014-07-03 01:14 PM

tmf_5037_source4274_target4326.png (55.3 KB) Pedro Venâncio, 2014-07-03 01:14 PM

History

#1 Updated by Giovanni Manghi over 10 years ago

please raise the issue also on the developers mailing list, if not already. Thanks!

#2 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF