Package com.mapbox.turf
Class TurfConstants
java.lang.Object
com.mapbox.turf.TurfConstants
This class holds the Turf constants which are useful when specifying additional information such
as units prior to executing the Turf function. For example, if I intend to get the distance
between two GeoJson Points using
TurfMeasurement.distance(Point, Point, String) the third
optional parameter can define the output units.
Note that TurfConversion.convertLength(double, String, String) can be used to transform
one unit to another, such as miles to feet.
- Since:
- 1.2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceRetention policy for the various Turf units. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA centimeter (American spelling) is a unit of length in the metric system, equal to one hundredth of a meter.static final StringA centimetre (international spelling) is a unit of length in the metric system, equal to one hundredth of a meter.static final StringThe default unit used in most Turf methods when no other unit is specified is kilometers.static final StringA degree, is a measurement of a plane angle, defined so that a full rotation is 360 degrees.static final StringThe foot is a unit of length in the imperial and US customary systems of measurement.static final StringThe inch (abbreviation: in or ") is a unit of length in the (British) imperial and United States customary systems of measurement now formally equal to 1/36th yard but usually understood as 1/12th of a foot.static final StringThe kilometer (American spelling) is a unit of length in the metric system, equal to one thousand meters.static final StringThe kilometre (international spelling) is a unit of length in the metric system, equal to one thousand metres.static final StringThe metre (international spelling) or meter (American spelling) is the base unit of length in the International System of Units (SI).static final StringThe metre (international spelling) is the base unit of length in the International System of Units (SI).static final StringThe mile is an English unit of length of linear measure equal to 5,280 feet, or 1,760 yards, and standardised as exactly 1,609.344 meters by international agreement in 1959.static final StringThe nautical mile per hour is known as the knot.static final StringThe radian is the standard unit of angular measure, used in many areas of mathematics.static final StringThe yard (abbreviation: yd) is an English unit of length, in both the British imperial and US customary systems of measurement, that comprises 3 feet or 36 inches. -
Method Summary
-
Field Details
-
UNIT_MILES
The mile is an English unit of length of linear measure equal to 5,280 feet, or 1,760 yards, and standardised as exactly 1,609.344 meters by international agreement in 1959.- Since:
- 1.2.0
- See Also:
-
UNIT_NAUTICAL_MILES
The nautical mile per hour is known as the knot. Nautical miles and knots are almost universally used for aeronautical and maritime navigation, because of their relationship with degrees and minutes of latitude and the convenience of using the latitude scale on a map for distance measuring.- Since:
- 1.2.0
- See Also:
-
UNIT_KILOMETERS
The kilometer (American spelling) is a unit of length in the metric system, equal to one thousand meters. It is now the measurement unit used officially for expressing distances between geographical places on land in most of the world; notable exceptions are the United States and the road network of the United Kingdom where the statute mile is the official unit used.In many Turf calculations, if a unit is not provided, the output value will fallback onto using this unit. See
UNIT_DEFAULTfor more information.- Since:
- 1.2.0
- See Also:
-
UNIT_RADIANS
The radian is the standard unit of angular measure, used in many areas of mathematics.- Since:
- 1.2.0
- See Also:
-
UNIT_DEGREES
A degree, is a measurement of a plane angle, defined so that a full rotation is 360 degrees.- Since:
- 1.2.0
- See Also:
-
UNIT_INCHES
The inch (abbreviation: in or ") is a unit of length in the (British) imperial and United States customary systems of measurement now formally equal to 1/36th yard but usually understood as 1/12th of a foot.- Since:
- 1.2.0
- See Also:
-
UNIT_YARDS
The yard (abbreviation: yd) is an English unit of length, in both the British imperial and US customary systems of measurement, that comprises 3 feet or 36 inches.- Since:
- 1.2.0
- See Also:
-
UNIT_METERS
The metre (international spelling) or meter (American spelling) is the base unit of length in the International System of Units (SI).- Since:
- 1.2.0
- See Also:
-
UNIT_CENTIMETERS
A centimeter (American spelling) is a unit of length in the metric system, equal to one hundredth of a meter.- Since:
- 1.2.0
- See Also:
-
UNIT_FEET
The foot is a unit of length in the imperial and US customary systems of measurement.- Since:
- 1.2.0
- See Also:
-
UNIT_CENTIMETRES
A centimetre (international spelling) is a unit of length in the metric system, equal to one hundredth of a meter.- Since:
- 3.0.0
- See Also:
-
UNIT_METRES
The metre (international spelling) is the base unit of length in the International System of Units (SI).- Since:
- 3.0.0
- See Also:
-
UNIT_KILOMETRES
The kilometre (international spelling) is a unit of length in the metric system, equal to one thousand metres. It is now the measurement unit used officially for expressing distances between geographical places on land in most of the world; notable exceptions are the United States and the road network of the United Kingdom where the statute mile is the official unit used.- Since:
- 3.0.0
- See Also:
-
UNIT_DEFAULT
The default unit used in most Turf methods when no other unit is specified is kilometers.- Since:
- 1.2.0
- See Also:
-