Copyright | (C) Richard Cook, 2016 |
---|---|
License | MIT |
Maintainer | rcook@rcook.org |
Stability | experimental |
Portability | portable |
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)
- createCoordSeq :: Context -> Word -> Word -> IO (Maybe CoordinateSequence)
- createLinearRing :: CoordinateSequence -> IO (Maybe Geometry)
- envelope :: Geometry -> IO (Maybe Geometry)
- geomTypeId :: Geometry -> IO (Maybe GeometryType)
- getCoordSeq :: Geometry -> IO (Maybe CoordinateSequence)
- getErrorMessage :: IO String
- 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)
- setX :: CoordinateSequence -> Word -> Double -> IO (Maybe ())
- setY :: CoordinateSequence -> Word -> Double -> IO (Maybe ())
- setZ :: CoordinateSequence -> Word -> Double -> IO (Maybe ())
- 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
createCoordSeq :: Context -> Word -> Word -> IO (Maybe CoordinateSequence) Source
Creates an empty CoordinateSequence
instance
createLinearRing :: CoordinateSequence -> IO (Maybe Geometry) Source
Returns a linear ring Geometry
instance from the given coordinate
sequence
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
getErrorMessage :: IO String Source
Returns message in case of error
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
setX :: CoordinateSequence -> Word -> Double -> IO (Maybe ()) Source
Sets an "x" ordinate value within a coordinate sequence
setY :: CoordinateSequence -> Word -> Double -> IO (Maybe ()) Source
Sets an "y" ordinate value within a coordinate sequence
setZ :: CoordinateSequence -> Word -> Double -> IO (Maybe ()) Source
Sets an "z" ordinate value within a coordinate sequence