Opened 16 years ago
Closed 16 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 |
Cc: |
Description
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:
From:
PROJCS["RT90_DIRPRJ",GEOGCS["Latitud/longitud.SWEREF99",DATUM["SWEREF99",SPHEROID["anon",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["grader",0.0174532925199433]],PROJECTIONTransverse_Mercator,PARAMETER["Central_Meridian",15.8062845294444],PARAMETER["False_Easting",1500064.274],PARAMETER["False_Northing",-667.711],PARAMETER["Latitude_of_Origin",0],PARAMETER["Scale_Factor",1.00000561024],UNIT["m",1]]
To:
PROJCS["SWEREF99_TM",GEOGCS["Latitud/longitud.SWEREF99",DATUM["SWEREF99",SPHEROID["anon",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["grader",0.0174532925199433]],PROJECTIONTransverse_Mercator,PARAMETER["Central_Meridian",15.0000000000000],PARAMETER["False_Easting",500000.0000],PARAMETER["False_Northing",0.000000],PARAMETER["Latitude_of_Origin",0],PARAMETER["Scale_Factor",0.99960000000],UNIT["m",1]]
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 by , 16 years ago
Component: | default → OGR_SRS |
---|---|
Keywords: | proj4 scale factor precision added |
Milestone: | → 1.4.4 |
Status: | new → assigned |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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:
Note the truncation of the scalefactor.