Copyright | (C) Richard Cook, 2016 |
---|---|

License | MIT |

Maintainer | rcook@rcook.org |

Stability | experimental |

Portability | POSIX |

Safe Haskell | Safe |

Language | Haskell2010 |

A high-level API for interoperating with GEOS C API which includes automatic management of lifetimes of objects such as readers, writers and geometries.

For the low-level FFI bindings, see Data.Geolocation.GEOS.Imports.

For the monad transformer wrappers, see Data.Geolocation.GEOS.Trans.

- data Context
- data CoordinateSequence
- data Geometry
- data GeometryType
- data Reader
- data Writer
- area :: Geometry -> IO (Maybe Double)
- envelope :: Geometry -> IO (Maybe Geometry)
- geomTypeId :: Geometry -> IO (Maybe GeometryType)
- getCoordSeq :: Geometry -> IO (Maybe CoordinateSequence)
- getExteriorRing :: Geometry -> IO (Maybe Geometry)
- getGeometry :: Geometry -> Int -> IO (Maybe Geometry)
- getNumGeometries :: Geometry -> IO (Maybe Int)
- getSize :: CoordinateSequence -> IO (Maybe Word)
- getX :: CoordinateSequence -> Word -> IO (Maybe Double)
- getY :: CoordinateSequence -> Word -> IO (Maybe Double)
- getZ :: CoordinateSequence -> Word -> IO (Maybe Double)
- intersection :: Geometry -> Geometry -> IO (Maybe Geometry)
- isEmpty :: Geometry -> IO (Maybe Bool)
- mkReader :: Context -> IO (Maybe Reader)
- mkWriter :: Context -> IO (Maybe Writer)
- readGeometry :: Reader -> String -> IO (Maybe Geometry)
- version :: IO String
- withGEOS :: (Context -> IO a) -> IO a
- writeGeometry :: Writer -> Geometry -> IO (Maybe String)

# Documentation

data CoordinateSequence Source

References a GEOS coordinate sequence

data GeometryType Source

Represents a GEOS geometry type ID

geomTypeId :: Geometry -> IO (Maybe GeometryType) Source

Returns type of a `Geometry`

instance

getCoordSeq :: Geometry -> IO (Maybe CoordinateSequence) Source

Returns a `CoordinateSequence`

from the supplied `Geometry`

getNumGeometries :: Geometry -> IO (Maybe Int) Source

Gets the number of geometries in a `Geometry`

instance

getX :: CoordinateSequence -> Word -> IO (Maybe Double) Source

Gets an "x" ordinate value from a coordinate sequence

getY :: CoordinateSequence -> Word -> IO (Maybe Double) Source

Gets a "y" ordinate value from a coordinate sequence

getZ :: CoordinateSequence -> Word -> IO (Maybe Double) Source

Gets a "z" ordinate value from a coordinate sequence

isEmpty :: Geometry -> IO (Maybe Bool) Source

Returns value indicating if specified `Geometry`

instance is empty