naqsha-0.2.0.1: A library for working with geospatial data types.

Safe HaskellNone
LanguageHaskell2010

Naqsha.Geometry.Internal

Description

The internal module that exposes the basic geometric types in naqsha. This interface is subject to change and hence use with caution.

Synopsis

Documentation

newtype Angle #

An abstract angle. Internally, angles are represented as a 64-bit integer with each unit contribute 1/2^64 fraction of a complete circle. This means that angles are accurate up to a resolution of 2 π / 2^64 radians. Angles form a group under the angular addition and the fact that these are represented as integers means one can expect high speed accurate angle arithmetic.

When expressing angles one can use a more convenient notation:

myAngle   = degree 21.71167
yourAngle = degree 21 <> minute 42 <> second 42

Constructors

Angle 

Fields

Instances

Bounded Angle # 
Enum Angle # 
Eq Angle # 

Methods

(==) :: Angle -> Angle -> Bool #

(/=) :: Angle -> Angle -> Bool #

Ord Angle # 

Methods

compare :: Angle -> Angle -> Ordering #

(<) :: Angle -> Angle -> Bool #

(<=) :: Angle -> Angle -> Bool #

(>) :: Angle -> Angle -> Bool #

(>=) :: Angle -> Angle -> Bool #

max :: Angle -> Angle -> Angle #

min :: Angle -> Angle -> Angle #

Read Angle # 
Show Angle # 

Methods

showsPrec :: Int -> Angle -> ShowS #

show :: Angle -> String #

showList :: [Angle] -> ShowS #

Monoid Angle # 

Methods

mempty :: Angle #

mappend :: Angle -> Angle -> Angle #

mconcat :: [Angle] -> Angle #

Bits Angle # 
Group Angle # 

Methods

invert :: Angle -> Angle #

pow :: Integral x => Angle -> x -> Angle #

Unbox Angle # 
Angular Angle # 

Methods

toAngle :: Angle -> Angle #

Vector Vector Angle # 
MVector MVector Angle # 
data Vector Angle # 
data MVector s Angle # 

degree :: Rational -> Angle #

Express angle in degrees.

minute :: Rational -> Angle #

Express angle in minutes.

second :: Rational -> Angle #

Express angle in seconds.

radian :: Double -> Angle #

Express angle in radians

toDegree :: Fractional r => Angle -> r #

Measure angle in degrees. This conversion may lead to loss of precision.

toRadian :: Angle -> Double #

Measure angle in radians. This conversion may lead to loss of precision.

newtype Latitude #

The latitude of a point. Positive denotes North of Equator where as negative South.

Constructors

Latitude 

Fields

Instances

Bounded Latitude # 
Eq Latitude # 
Ord Latitude # 
Read Latitude # 
Show Latitude # 
Bits Latitude # 
Angular Latitude # 

Methods

toAngle :: Latitude -> Angle #

Vector Vector Latitude # 
MVector MVector Latitude # 
data Vector Latitude # 
data MVector s Latitude # 

newtype Longitude #

The longitude of a point. Positive denotes East of the Greenwich meridian where as negative denotes West.

Constructors

Longitude 

Fields

Instances

Bounded Longitude # 
Eq Longitude # 
Ord Longitude # 
Read Longitude # 
Show Longitude # 
Monoid Longitude # 
Bits Longitude # 
Group Longitude # 
Angular Longitude # 

Methods

toAngle :: Longitude -> Angle #

Vector Vector Longitude # 
MVector MVector Longitude # 
data Vector Longitude # 
data MVector s Longitude # 

lat :: Angle -> Latitude #

Construct latitude out of an angle.

lon :: Angle -> Longitude #

Convert angles to longitude.