module Data.Geospatial.Internal.GeoPosition (
GeoPosition(..)
, stripCRSFromPosition
) where
import qualified Data.Geospatial.Internal.BasicTypes as BasicTypes
data GeoPosition =
LonLat BasicTypes.Longitude BasicTypes.Latitude
| LonLatAlt BasicTypes.Longitude BasicTypes.Latitude BasicTypes.Altitude
| EastingNorthing BasicTypes.Easting BasicTypes.Northing
| EastingNorthingAlt BasicTypes.Easting BasicTypes.Northing BasicTypes.Altitude
stripCRSFromPosition :: GeoPosition -> BasicTypes.GeoPositionWithoutCRS
stripCRSFromPosition (LonLat lon lat) = BasicTypes.GeoPointXY $ BasicTypes.PointXY lon lat
stripCRSFromPosition (LonLatAlt lon lat alt) = BasicTypes.GeoPointXYZ $ BasicTypes.PointXYZ lon lat alt
stripCRSFromPosition (EastingNorthing easting northing) = BasicTypes.GeoPointXY $ BasicTypes.PointXY easting northing
stripCRSFromPosition (EastingNorthingAlt easting northing alt) = BasicTypes.GeoPointXYZ $ BasicTypes.PointXYZ easting northing alt