Class Geography.Position
- Description
This class contains a geographical position, ie a point on the earths surface. The resulting position object implements comparision methods (__hash, `==, `< and `>) so that you can compare and sort positions as well as using them as index in mappings. Comparision is made primary on latidue and secondly on longitude. It does not currently take the ellipsoid into account.
It is possible to cast a position into an array, which will yield ({ float latitude, float longitude }), as well as into a string.
- Constant
ellipsoids
constantGeography.Position.ellipsoids- Description
A mapping with reference ellipsoids, which can be fed to the UTM converter. The mapping maps the name of the ellipsoid to an array where the first element is a float describing the equatorial radius and the second element is a float describing the polar radius.
- Variable
alt
floatGeography.Position.alt- Description
Altitud of the position, in meters. Positive numbers is up. Zero is the shell of the current ellipsoid.
- Variable
equatorial_radius
floatGeography.Position.equatorial_radius- Description
The equatorial radius is how many meters the earth radius is at the equator (east-west direction).
- Variable
lat
floatGeography.Position.lat- Description
Latitude (N--S) of the position, in degrees. Positive number is north, negative number is south.
- Variable
long
floatGeography.Position.long- Description
Longitude (W--E) of the position, in degrees. Positive number is east, negative number is west.
- Variable
polar_radius
floatGeography.Position.polar_radius- Description
The polar radius is how many meters the earth radius is at the poles (north-south direction).
- Method
create
Geography.Position Geography.Position(int|floatlat,int|floatlong,void|int|floatalt)
Geography.Position Geography.Position(stringlat,stringlong)
Geography.Position Geography.Position(stringposition)
Geography.Position Geography.Position()- Description
Constructor for this class. If fed with strings, it will perform a dwim scan on the strings. If they fails to be understood, there will be an exception.