data-r-tree-0.6.0: R-Tree is a spatial data structure similar to Quadtrees or B-Trees.

CopyrightCopyright (c) 2015 Birte Wagner Sebastian Philipp
LicenseMIT
MaintainerBirte Wagner, Sebastian Philipp (sebastian@spawnhost.de)
Stabilityexperimental
Portabilitynot portable
Safe HaskellSafe
LanguageHaskell2010

Data.RTree.MBB

Description

This module provides a minimal bounding box.

Synopsis

Documentation

data MBB Source #

Minimal bounding box

Constructors

MBB 

Fields

Instances
Eq MBB Source # 
Instance details

Defined in Data.RTree.MBB

Methods

(==) :: MBB -> MBB -> Bool #

(/=) :: MBB -> MBB -> Bool #

Ord MBB Source # 
Instance details

Defined in Data.RTree.MBB

Methods

compare :: MBB -> MBB -> Ordering #

(<) :: MBB -> MBB -> Bool #

(<=) :: MBB -> MBB -> Bool #

(>) :: MBB -> MBB -> Bool #

(>=) :: MBB -> MBB -> Bool #

max :: MBB -> MBB -> MBB #

min :: MBB -> MBB -> MBB #

Show MBB Source # 
Instance details

Defined in Data.RTree.MBB

Methods

showsPrec :: Int -> MBB -> ShowS #

show :: MBB -> String #

showList :: [MBB] -> ShowS #

Generic MBB Source # 
Instance details

Defined in Data.RTree.MBB

Associated Types

type Rep MBB :: Type -> Type #

Methods

from :: MBB -> Rep MBB x #

to :: Rep MBB x -> MBB #

Binary MBB Source # 
Instance details

Defined in Data.RTree.MBB

Methods

put :: MBB -> Put #

get :: Get MBB #

putList :: [MBB] -> Put #

type Rep MBB Source # 
Instance details

Defined in Data.RTree.MBB

type Rep MBB = D1 (MetaData "MBB" "Data.RTree.MBB" "data-r-tree-0.6.0-HxW7KWxwR847heBr9qHG8D" False) (C1 (MetaCons "MBB" PrefixI True) ((S1 (MetaSel (Just "getUlx") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double) :*: S1 (MetaSel (Just "getUly") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double)) :*: (S1 (MetaSel (Just "getBrx") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double) :*: S1 (MetaSel (Just "getBry") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double))))

mbb Source #

Arguments

:: Double

x - coordinate of first point

-> Double

y - coordinate of first point

-> Double

x - coordinate of second point

-> Double

x - coordinate of second point

-> MBB 

created a minimal bounding box (or a rectangle) The first point must be smaller, than the second one. This is unchecked.

area :: MBB -> Double Source #

calculates the area of the rect

containsMBB :: MBB -> MBB -> Bool Source #

returns True, when the first mbb contains the second

unionMBB :: MBB -> MBB -> MBB Source #

unifies two MBBs into one

unionsMBB :: [MBB] -> MBB Source #

internal only.

intersectMBB :: MBB -> MBB -> Maybe MBB Source #

returns the intersection of both mbbs. Returns Nothing, if they don't intersect.

isValidMBB :: MBB -> Bool Source #

the property, that a MBB must hold