Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Geo a where
- contains :: a -> Geometry b -> Bool
- coveredBy :: a -> Geometry b -> Bool
- covers :: a -> Geometry b -> Bool
- crosses :: a -> Geometry b -> Bool
- disjoint :: a -> Geometry b -> Bool
- intersects :: a -> Geometry b -> Bool
- overlaps :: a -> Geometry b -> Bool
- touches :: a -> Geometry b -> Bool
- within :: a -> Geometry b -> Bool
- type SRID = Maybe Int
- data Some :: (* -> *) -> * where
- withSomeGeometry :: Some Geometry -> (forall a. Geometry a -> b) -> b
- data Geometry a where
- PointGeometry :: Point -> SRID -> Geometry Point
- LineStringGeometry :: LineString -> SRID -> Geometry LineString
- LinearRingGeometry :: LinearRing -> SRID -> Geometry LinearRing
- PolygonGeometry :: Polygon -> SRID -> Geometry Polygon
- MultiPointGeometry :: MultiPoint -> SRID -> Geometry MultiPoint
- MultiLineStringGeometry :: MultiLineString -> SRID -> Geometry MultiLineString
- MultiPolygonGeometry :: MultiPolygon -> SRID -> Geometry MultiPolygon
- data Coordinate
- = Coordinate2 !Double !Double
- | Coordinate3 !Double !Double !Double
- dimensionsCoordinate :: Coordinate -> Int
- type CoordinateSequence = Vector Coordinate
- dimensionsCoordinateSequence :: CoordinateSequence -> Int
- newtype Point = Point Coordinate
- newtype LinearRing = LinearRing CoordinateSequence
- newtype LineString = LineString CoordinateSequence
- newtype Polygon = Polygon (Vector LinearRing)
- newtype MultiPoint = MultiPoint (Vector Point)
- newtype MultiLineString = MultiLineString (Vector LineString)
- newtype MultiPolygon = MultiPolygon (Vector Polygon)
Documentation
class Geo a where
contains :: a -> Geometry b -> Bool
coveredBy :: a -> Geometry b -> Bool
covers :: a -> Geometry b -> Bool
crosses :: a -> Geometry b -> Bool
Returns True
if the DE-9IM intersection matrix for the two Geometries is T*T****** (for a point and a curve,a point and an area or a line and an area) 0******** (for two curves).
disjoint :: a -> Geometry b -> Bool
Returns True
if the DE-9IM intersection matrix for the two geometries is FF*FF****.
intersects :: a -> Geometry b -> Bool
Returns True
if disjoint
is False.
overlaps :: a -> Geometry b -> Bool
Returns true if the DE-9IM intersection matrix for the two geometries is T*T***T** (for two points or two surfaces) 1*T***T** (for two curves).
touches :: a -> Geometry b -> Bool
Returns True if the DE-9IM intersection matrix for the two geometries is FT*******, F**T***** or F***T****.
within :: a -> Geometry b -> Bool
Returns True if the DE-9IM intersection matrix for the two geometries is T*F**F***.
withSomeGeometry :: Some Geometry -> (forall a. Geometry a -> b) -> b
data Geometry a where
PointGeometry :: Point -> SRID -> Geometry Point | |
LineStringGeometry :: LineString -> SRID -> Geometry LineString | |
LinearRingGeometry :: LinearRing -> SRID -> Geometry LinearRing | |
PolygonGeometry :: Polygon -> SRID -> Geometry Polygon | |
MultiPointGeometry :: MultiPoint -> SRID -> Geometry MultiPoint | |
MultiLineStringGeometry :: MultiLineString -> SRID -> Geometry MultiLineString | |
MultiPolygonGeometry :: MultiPolygon -> SRID -> Geometry MultiPolygon |
data Coordinate
type CoordinateSequence = Vector Coordinate
newtype LinearRing
newtype LineString
newtype Polygon
In a polygon, the fist LinearRing is the shell, and any following are holes.
newtype MultiPoint
newtype MultiLineString