spherical-0.1.3.0: Geometry on a sphere

Safe HaskellNone
LanguageHaskell98

Math.Geometry.Spherical

Contents

Synopsis

Computations

areaTriangle Source #

Arguments

:: Floating a 
=> a

Radius of the sphere

-> (a, a)

A point given in radians

-> (a, a) 
-> (a, a) 
-> a 

Compute the area of a triangle using L'Huillier's formula

compactness Source #

Arguments

:: Floating a 
=> [(a, a)]

Polygons on surface of the sphere, given in degrees

-> a 

Take the area of the polygon and divide by the perimeter squared. Dimensionless.

relativeCompactness :: Floating a => [(a, a)] -> a Source #

Relative compactness. Dimensionless.

areaConvex Source #

Arguments

:: Floating a 
=> a

Radius of a sphere

-> [(a, a)]

Polygon on the surface of the sphere

-> a 

Compute the area of a convex polygon on the surface of a sphere.

perimeterPolygon Source #

Arguments

:: Floating a 
=> a

Radius of sphere

-> [(a, a)]

Polygon on sphere given in degrees

-> a 

areaPolygon Source #

Arguments

:: Floating a 
=> a

Radius of sphere

-> [(a, a)]

Polygon on the sphere, with points given in degrees.

-> a 

This is morally dubious in that it uses the Bonne projection centered around DC, so it will blow up in some cases.

distance Source #

Arguments

:: Floating a 
=> a

Radius of sphere

-> (a, a)

Point on sphere given in degrees

-> (a, a)

Point on sphere given in degrees

-> a 

Distance in kilometers between two points given in degrees.

Projections

albers Source #

Arguments

:: Floating a 
=> (a, a)

A reference point on the sphere

-> (a, a) -> (a, a) 

Albers projection for a given reference point.

ablers washingtonDC

littow :: Floating a => (a, a) -> (a, a) Source #

Littow retroazimuthal + conformal projection

craig Source #

Arguments

:: (Floating a, Eq a) 
=> (a, a)

Reference point given in radians

-> (a, a) -> (a, a) 

Craig retroazimuthal projection

winkel3 :: (Eq a, Floating a) => (a, a) -> (a, a) Source #

Winkel Tripel projection

mercator :: Floating a => (a, a) -> (a, a) Source #

Mercator projection.

bonne Source #

Arguments

:: Floating a 
=> a

Standard Parallel. If you are unsure of what to put, try radians 45.

-> a

Central meridian. If you are unsure of what to put, try snd washingtonDC.

-> (a, a) 
-> (a, a) 

Bonne projection.

lambertAzimuthal Source #

Arguments

:: Floating a 
=> a

Standard parallel

-> a

Central longitude

-> (a, a) 
-> (a, a) 

See here.

Since: 0.1.3.0

Reference points

washingtonDC :: Floating a => (a, a) Source #

For use as a reference point

mecca :: Floating a => (a, a) Source #

For use as a reference point

Helper functions

radians :: Floating a => a -> a Source #

Convert from degrees to radians.

toRadians :: Floating a => (a, a) -> (a, a) Source #

Convert both coördinates to radians.

project Source #

Arguments

:: (Floating a, Functor f) 
=> ((a, a) -> (a, a))

A projection

-> f (a, a)

A polygon defined by points on the sphere, in degrees

-> f (a, a) 

Project a given polygon