GME

Geospatial Modelling Environment

convert.units (Convert Units)

Converts length or area values from one unit to another (an interactive command line tool)

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);

valuethe numerical value to convert
unitsthe units of the value, and the units to convert to (you can list more than one type of units to convert to), e.g. c("M^2","A"); supported units: METERS (M), FEET (FT), KILOMETERS (KM), MILES (MI), 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


Messages

Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently  Read more...

Links

Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn