| Copyright | (C) 2014-2021 HS-GeoJSON Project |
|---|---|
| License | BSD-style (see the file LICENSE.md) |
| Maintainer | Andrew Newman |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Geospatial.Internal.BasicTypes
Description
Basic types for GeoJSON representations.
Synopsis
- type Latitude = Double
- type Longitude = Double
- type Easting = Double
- type Northing = Double
- type Altitude = Double
- data GeoPositionWithoutCRS
- retrieveXY :: GeoPositionWithoutCRS -> PointXY
- data PointXY = PointXY {}
- data PointXYZ = PointXYZ {}
- data PointXYZM = PointXYZM {}
- newtype DoubleArray = DoubleArray [Double]
- class HasGeoPositionWithoutCRS c where
- type Name = Text
- type Code = Int
- type Href = Text
- type FormatString = Text
- type ProjectionType = Text
- data BoundingBoxWithoutCRS
- data FeatureID
Coordinate types
data GeoPositionWithoutCRS Source #
Constructors
| GeoEmpty | |
| GeoPointXY PointXY | |
| GeoPointXYZ PointXYZ | |
| GeoPointXYZM PointXYZM |
Instances
(GeoPositionWithoutCRS is a catch all for indeterminate CRSs and for expression of positions
before a CRS has been determined
Instances
| NFData PointXY Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| Generic PointXY Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
| |||||
| Show PointXY Source # | |||||
| Eq PointXY Source # | |||||
| type Rep PointXY Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep PointXY = D1 ('MetaData "PointXY" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'False) (C1 ('MetaCons "PointXY" 'PrefixI 'True) (S1 ('MetaSel ('Just "_xyX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "_xyY") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double))) | |||||
Instances
| NFData PointXYZ Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| Generic PointXYZ Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
| |||||
| Show PointXYZ Source # | |||||
| Eq PointXYZ Source # | |||||
| type Rep PointXYZ Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep PointXYZ = D1 ('MetaData "PointXYZ" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'False) (C1 ('MetaCons "PointXYZ" 'PrefixI 'True) (S1 ('MetaSel ('Just "_xyzX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "_xyzY") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "_xyzZ") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))) | |||||
Instances
| NFData PointXYZM Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| Generic PointXYZM Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
| |||||
| Show PointXYZM Source # | |||||
| Eq PointXYZM Source # | |||||
| type Rep PointXYZM Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep PointXYZM = D1 ('MetaData "PointXYZM" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'False) (C1 ('MetaCons "PointXYZM" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_xyzmX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "_xyzmY") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "_xyzmZ") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "_xyzmM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))) | |||||
newtype DoubleArray Source #
Constructors
| DoubleArray [Double] |
Instances
| FromJSON DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| ToJSON DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods toJSON :: DoubleArray -> Value # toEncoding :: DoubleArray -> Encoding # toJSONList :: [DoubleArray] -> Value # toEncodingList :: [DoubleArray] -> Encoding # omitField :: DoubleArray -> Bool # | |||||
| NFData DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods rnf :: DoubleArray -> () # | |||||
| Generic DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
| |||||
| Show DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods showsPrec :: Int -> DoubleArray -> ShowS # show :: DoubleArray -> String # showList :: [DoubleArray] -> ShowS # | |||||
| Eq DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| type Rep DoubleArray Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep DoubleArray = D1 ('MetaData "DoubleArray" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'True) (C1 ('MetaCons "DoubleArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Double]))) | |||||
class HasGeoPositionWithoutCRS c where Source #
Methods
geoPositionWithoutCRS :: Lens' c GeoPositionWithoutCRS Source #
Instances
CRS Reference types
type FormatString = Text Source #
type ProjectionType = Text Source #
Feature Types
data BoundingBoxWithoutCRS Source #
See Section 4 Bounding Boxes of the GeoJSON spec, The length of the list/array must be 2*n where n is the dimensionality of the position type for the CRS with min values first followed by the max values, wich both the min/max sets following the same axis order as the CRS, e.g for WGS84: minLongitude, minLatitude, maxLongitude, maxLatitude The spec mentions that it can be part of a geometry object too but doesnt give an example, This implementation will ignore bboxes on Geometry objects, they can be added if required.
Constructors
| BoundingBoxWithoutCRSXY PointXY PointXY | |
| BoundingBoxWithoutCRSXYZ PointXYZ PointXYZ | |
| BoundingBoxWithoutCRSXYZM PointXYZM PointXYZM |
Instances
| FromJSON BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods parseJSON :: Value -> Parser BoundingBoxWithoutCRS # parseJSONList :: Value -> Parser [BoundingBoxWithoutCRS] # | |||||
| ToJSON BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods toJSON :: BoundingBoxWithoutCRS -> Value # toEncoding :: BoundingBoxWithoutCRS -> Encoding # toJSONList :: [BoundingBoxWithoutCRS] -> Value # toEncodingList :: [BoundingBoxWithoutCRS] -> Encoding # omitField :: BoundingBoxWithoutCRS -> Bool # | |||||
| NFData BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods rnf :: BoundingBoxWithoutCRS -> () # | |||||
| Generic BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
Methods from :: BoundingBoxWithoutCRS -> Rep BoundingBoxWithoutCRS x # to :: Rep BoundingBoxWithoutCRS x -> BoundingBoxWithoutCRS # | |||||
| Show BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods showsPrec :: Int -> BoundingBoxWithoutCRS -> ShowS # show :: BoundingBoxWithoutCRS -> String # showList :: [BoundingBoxWithoutCRS] -> ShowS # | |||||
| Eq BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Methods (==) :: BoundingBoxWithoutCRS -> BoundingBoxWithoutCRS -> Bool # (/=) :: BoundingBoxWithoutCRS -> BoundingBoxWithoutCRS -> Bool # | |||||
| type Rep BoundingBoxWithoutCRS Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep BoundingBoxWithoutCRS = D1 ('MetaData "BoundingBoxWithoutCRS" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'False) (C1 ('MetaCons "BoundingBoxWithoutCRSXY" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXY) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXY)) :+: (C1 ('MetaCons "BoundingBoxWithoutCRSXYZ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXYZ) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXYZ)) :+: C1 ('MetaCons "BoundingBoxWithoutCRSXYZM" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXYZM) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PointXYZM)))) | |||||
Constructors
| FeatureIDText Text | |
| FeatureIDNumber Int |
Instances
| FromJSON FeatureID Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| ToJSON FeatureID Source # | |||||
| NFData FeatureID Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes | |||||
| Generic FeatureID Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes Associated Types
| |||||
| Show FeatureID Source # | |||||
| Eq FeatureID Source # | |||||
| type Rep FeatureID Source # | |||||
Defined in Data.Geospatial.Internal.BasicTypes type Rep FeatureID = D1 ('MetaData "FeatureID" "Data.Geospatial.Internal.BasicTypes" "geojson-4.1.3-39qWD6AMpW6DepGCjU1BIw" 'False) (C1 ('MetaCons "FeatureIDText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "FeatureIDNumber" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) | |||||