You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am okay with geod not being able to convert to dm, cm or mm but right now the application advertises that it can do it:
C:\dev\build\proj4>bin\Release\geod.exe -lu
km 1000. Kilometer
m 1. Meter
dm 1/10 Decimeter
cm 1/100 Centimeter
mm 1/1000 Millimeter
kmi 1852.0 International Nautical Mile
in 0.0254 International Inch
ft 0.3048 International Foot
yd 0.9144 International Yard
mi 1609.344 International Statute Mile
fath 1.8288 International Fathom
ch 20.1168 International Chain
link 0.201168 International Link
us-in 1./39.37 U.S. Surveyor's Inch
us-ft 0.304800609601219 U.S. Surveyor's Foot
us-yd 0.914401828803658 U.S. Surveyor's Yard
us-ch 20.11684023368047 U.S. Surveyor's Chain
us-mi 1609.347218694437 U.S. Surveyor's Statute Mile
ind-yd 0.91439523 Indian Yard
ind-ft 0.30479841 Indian Foot
ind-ch 20.11669506 Indian Chain
The problem is likely to originate in the "1/x" conversion factor values. The us-in unit follows this pattern at least.
The text was updated successfully, but these errors were encountered:
This should be straightforward to fix. geod should just use the double factor field of PJ_UNITS, instead of decoding the check* to_meter field. I'll take a crack at this.
cffk
added a commit
to cffk/proj.4
that referenced
this issue
Jul 11, 2018
Previously, unit conversion using atof(unit_list[i].to_meter) which
gives the wrong answer with, e.g., "1/10". Now it directly uses
unit_list[i].factor (e.g., 0.1).
Also fix all the conversion factors for the US Surveyor units so that
they are the closest doubles. E.g., the conversion factors for US
feet are
factor rel error
old 0.304800609601219 6e-16
12/39.37 1e-16
now 1200/3937.0 5e-17
Maybe someone should check the Indian units (but it's possible that
India and Pakistan have different standards).
I shall explain by example:
Here I would expect the third value to change with each call to geod. Other units suchs as US feet works as expected:
I am okay with
geod
not being able to convert to dm, cm or mm but right now the application advertises that it can do it:The problem is likely to originate in the "1/x" conversion factor values. The
us-in
unit follows this pattern at least.The text was updated successfully, but these errors were encountered: