Opened 12 years ago

Closed 12 years ago

#1970 closed defect (fixed)

Scale_Factor are rounded to 6 digits

Reported by: km5miel Owned by: warmerdam
Priority: normal Milestone: 1.4.4
Component: OGR_SRS Version: unspecified
Severity: normal Keywords: proj4 scale factor precision


I’m using PROJ4 to project data from Swedish RT90 to Swedish SWEREF99. Although these are different datums, the national land survey recommend that one uses a projection on GRS 80 to go from RT90 to SWEREF99. The WKT:s that shall be used are:





Using PROJ4 I do however get a result that an approximately 3 meter from what I expect

One of the engineers at the Swedish land survey have looked at this and it’s likely that internal accuracy of the “Scale_Factor” are causing the problem. Changing the Scale_Factor from 1.00000561024 to 1.000006 gives about the same error in another more accurate software.

Change History (2)

comment:1 Changed 12 years ago by warmerdam

Component: defaultOGR_SRS
Keywords: proj4 scale factor precision added
Milestone: 1.4.4
Status: newassigned

A preliminary analysis suggests the problem is with OGRSpatialReference::ExportToProj4() using %f for scale factors instead of the %.16g used for most other numbers. For instance, testepsg on the RT90 definition reports:

+proj=tmerc +lat_0=0 +lon_0=15.8062845294444 +k=1.000006 +x_0=1500064.274 +y_0=-667.711 +ellps=GRS80 +units=m +no_defs

Note the truncation of the scalefactor.

comment:2 Changed 12 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

Fixed in trunk as r12624 and 1.4 branch as r12625. A regression test added in trunk as r12623.

Note: See TracTickets for help on using tickets.