geos-0.4.1: Bindings for GEOS.

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Geos.Raw.STRTree

Synopsis

Documentation

class STRTreeLike t where Source #

Minimal complete definition

withSTRTree

Methods

withSTRTree :: t a -> (Ptr GEOSSTRTree -> IO b) -> IO b Source #

newtype STRTree a Source #

A query-only data structure

Instances

STRTreeLike STRTree Source # 

Methods

withSTRTree :: STRTree a -> (Ptr GEOSSTRTree -> IO b) -> IO b Source #

Eq (STRTree a) Source # 

Methods

(==) :: STRTree a -> STRTree a -> Bool #

(/=) :: STRTree a -> STRTree a -> Bool #

Show (STRTree a) Source # 

Methods

showsPrec :: Int -> STRTree a -> ShowS #

show :: STRTree a -> String #

showList :: [STRTree a] -> ShowS #

newtype STRTreeBuilder a Source #

A mutable data structure. Must build into an STRTree before querying.

type Finalizer a b = Ptr a -> Ptr b -> IO () Source #

wrap2 :: (Ptr a -> Ptr () -> IO ()) -> IO (GEOSQueryCallback a) Source #

createSTRTreeBuilder :: Int -> Geos (STRTreeBuilder a) Source #

Create a new R-tree using the Sort-Tile-Recursive algorithm (STRtree) for two-dimensional spatial data.

@param nodeCapacity the maximum number of child nodes that a node may have. The minimum recommended capacity value is 4. If unsure, use a default node capacity of 10.

build :: STRTreeBuilder a -> Geos (STRTree a) Source #

Builds the STRTree by performing a trivial query on it.

insert :: (Storable b, Geometry a) => STRTreeBuilder b -> a -> b -> Geos () Source #

Insert an item into an STRtree

param tree the STRtree in which the item should be inserted param geometry a Geometry whose envelope corresponds to the extent of item @param item the item to insert into the tree

foldr :: (STRTreeLike t, Storable a) => (a -> b -> b) -> b -> t a -> Geos b Source #

query :: (Storable b, Geometry a) => STRTree b -> a -> Geos (Vector b) Source #