Description
This tool converts length or area values from one unit to another. It is designed simply as a tool to assist users in constructing other command strings. For instance, you might wish to buffer features by 1 mile but the coordinate system is in meters, so this tool could be used to calculate that conversion.
Syntax
convert.units(value, units);
| value | the numerical value to convert | |
| units | the units of the value, and the units to convert to (you can list more than one type of units to convert to) | |
| supported | length units: METERS (M), FEET (FT), KILOMETERS (KM), MILES (MI) | |
| supported | area units: METERS SQUARED (M^2), FEET SQUARED (FT^2), KILOMETERS SQUARED (KM^2), MILES SQUARED (MI^2), HECTARES (H), ACRES (A) |
Example
convert.units(value=12.3456, units=c("A", "H"));
convert.units(value=12.3456, units=c("M", "FT", "MI", "KM"));
The second example would result in the following:
12.3456 METERS = 40.50393706944 FEET
12.3456 METERS = 0.0076712001879552 MILES
12.3456 METERS = 0.0123456 KILOMETERS