Copyright | (C) Richard Cook, 2016 |
---|---|
License | MIT |
Maintainer | rcook@rcook.org |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
A high-level API for interoperating with Geometry Engine Open Source 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 GEOSError
- data Geometry
- data GeometryType
- data Reader
- data Writer
- area :: Geometry -> IO Double
- createCollection :: GeometryType -> [Geometry] -> IO Geometry
- createCoordSeq :: Context -> Word -> Word -> IO CoordinateSequence
- createEmptyPolygon :: Context -> IO Geometry
- createLinearRing :: CoordinateSequence -> IO Geometry
- createPolygon :: Geometry -> [Geometry] -> IO Geometry
- envelope :: Geometry -> IO Geometry
- geomTypeId :: Geometry -> IO GeometryType
- getCoordSeq :: Geometry -> IO CoordinateSequence
- getErrorMessage :: IO String
- getExteriorRing :: Geometry -> IO Geometry
- getGeometry :: Geometry -> Int -> IO Geometry
- getNumGeometries :: Geometry -> IO Int
- getOrdinate :: CoordinateSequence -> Word -> Word -> IO Double
- getSize :: CoordinateSequence -> IO Word
- getX :: CoordinateSequence -> Word -> IO Double
- getY :: CoordinateSequence -> Word -> IO Double
- getZ :: CoordinateSequence -> Word -> IO Double
- intersection :: Geometry -> Geometry -> IO Geometry
- isEmpty :: Geometry -> IO Bool
- mkReader :: Context -> IO Reader
- mkWriter :: Context -> IO Writer
- readGeometry :: Reader -> String -> IO Geometry
- setOrdinate :: CoordinateSequence -> Word -> Word -> Double -> IO ()
- setX :: CoordinateSequence -> Word -> Double -> IO ()
- setY :: CoordinateSequence -> Word -> Double -> IO ()
- setZ :: CoordinateSequence -> Word -> Double -> IO ()
- version :: IO String
- withGEOS :: (Context -> IO a) -> IO a
- writeGeometry :: Writer -> Geometry -> IO String
Documentation
data CoordinateSequence Source
References a GEOS coordinate sequence
Encapsulates an exception thrown by GEOS library
data GeometryType Source
Represents a GEOS geometry type ID
createCollection :: GeometryType -> [Geometry] -> IO Geometry Source
Creates a Geometry
collection
createCoordSeq :: Context -> Word -> Word -> IO CoordinateSequence Source
Creates an empty CoordinateSequence
instance
createLinearRing :: CoordinateSequence -> IO Geometry Source
Returns a linear ring Geometry
instance from the given coordinate
sequence
createPolygon :: Geometry -> [Geometry] -> IO Geometry Source
Returns a polygon Geometry
instance from the given shell and optional
array of holes
geomTypeId :: Geometry -> IO GeometryType Source
Returns type of a Geometry
instance
getCoordSeq :: Geometry -> IO CoordinateSequence Source
Returns a CoordinateSequence
from the supplied Geometry
getErrorMessage :: IO String Source
Returns message in case of error
getExteriorRing :: Geometry -> IO Geometry Source
getOrdinate :: CoordinateSequence -> Word -> Word -> IO Double Source
Gets an ordinate value from a coordinate sequence
getSize :: CoordinateSequence -> IO Word Source
Gets the size from a coordinate sequence
getX :: CoordinateSequence -> Word -> IO Double Source
Gets an x-ordinate value from a coordinate sequence
getY :: CoordinateSequence -> Word -> IO Double Source
Gets a y-ordinate value from a coordinate sequence
getZ :: CoordinateSequence -> Word -> IO Double Source
Gets a z-ordinate value from a coordinate sequence
isEmpty :: Geometry -> IO Bool Source
Returns value indicating if specified Geometry
instance is empty
setOrdinate :: CoordinateSequence -> Word -> Word -> Double -> IO () Source
Sets an x-ordinate value within a coordinate sequence
setX :: CoordinateSequence -> Word -> Double -> IO () Source
Sets an x-ordinate value within a coordinate sequence
setY :: CoordinateSequence -> Word -> Double -> IO () Source
Sets a y-ordinate value within a coordinate sequence
setZ :: CoordinateSequence -> Word -> Double -> IO () Source
Sets a z-ordinate value within a coordinate sequence