Maps > Map Projections > Unit Converters > Using Predefined Unit Converters
 
Using Predefined Unit Converters
The library contains a list of predefined unit converters. A predefined unit converter is referenced by its name. To access a predefined unit converter, use the static function GetRegisteredConverter of the class IlvUnitConverter.
The following example instantiates a Mercator projection and converts its output to international nautical miles.
IlvUnitConverter* converter =
IlvUnitConverter::GetRegisteredConverter("kmi");
IlvMercatorProjection projection;
projection.setUnitConverter(*converter);
List of Predefined Unit Converters
The table below contains a list of the predefined unit converters supplied with the Rogue Wave Views Maps projection library.
Name
Comment
ToMeters
km
Kilometer
1000.0
m
Meter
1.0
dm
Decimeter
0.1
cm
Centimeter
0.01
mm
Millimeter
0.001
kmi
International Nautical Mile
1852.0
in
International Inch
0.0254
ft
International Foot
0.3048
yd
International Yard
0.9144
mi
International Statute Mile
1609.344
fath
International Fathom
1.8288
ch
International Chain
20.1168
link
International Link
0.201168
us-in
U.S. Surveyor’s Inch
0.025400050800101603
us-ft
U.S. Surveyor’s Foot
0.304800609601219
us-yd
U.S. Surveyor’s Yard
0.914401828803658
us-ch
U.S. Surveyor’s Chain
20.11684023368047
us-mi
U.S. Surveyor’s Statute Mile
1609.347218694437
ind-yd
Indian Yard
0.91439523
ind-ft
Indian Foot
0.30479841
ind-ch
Indian Chain
20.11669506

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.