Safe Haskell | None |
---|---|
Language | Haskell2010 |
- convertGeometryFromRaw :: (Geometry a, CoordSeqInput a ~ cb, CoordinateSequence cb) => a -> Geos (Some Geometry)
- convertGeometryToRaw :: (Geometry a, CoordSeqInput a ~ cb, CoordinateSequence cb) => Geometry b -> Geos a
- convertMultiPolygonFromRaw :: (Geometry a, CoordSeqInput a ~ ca, CoordinateSequence ca) => a -> Geos MultiPolygon
- ensurePoint :: Some Geometry -> Geometry Point
- ensureLineString :: Some Geometry -> Geometry LineString
- ensureLinearRing :: Some Geometry -> Geometry LinearRing
- ensurePolygon :: Some Geometry -> Geometry Polygon
- ensureMultiPoint :: Some Geometry -> Geometry MultiPoint
- ensureMultiPolygon :: Some Geometry -> Geometry MultiPolygon
- ensureMultiLineString :: Some Geometry -> Geometry MultiLineString
- interpolate :: Geometry LineString -> Double -> Geometry Point
- interpolateNormalized :: Geometry LineString -> Double -> Geometry Point
- project :: Geometry LineString -> Geometry Point -> Double
- projectNormalized :: Geometry LineString -> Geometry Point -> Double
- covers :: Relatable a => a -> Geometry b -> Bool
- coveredBy :: Relatable a => a -> Geometry b -> Bool
- equalsExact :: Geometry a -> Geometry a -> Double -> Bool
- equals :: Geometry a -> Geometry a -> Bool
- overlaps :: Relatable a => a -> Geometry b -> Bool
- contains :: Relatable a => a -> Geometry b -> Bool
- within :: Relatable a => a -> Geometry b -> Bool
- crosses :: Relatable a => a -> Geometry b -> Bool
- touches :: Relatable a => a -> Geometry b -> Bool
- disjoint :: Relatable a => a -> Geometry b -> Bool
- area :: Geometry a -> Double
- geometryLength :: Geometry a -> Double
- distance :: Geometry a -> Geometry a -> Double
- hausdorffDistance :: Geometry a -> Geometry a -> Double
- nearestPoints :: Geometry a -> Geometry a -> (Coordinate, Coordinate)
Documentation
convertGeometryFromRaw :: (Geometry a, CoordSeqInput a ~ cb, CoordinateSequence cb) => a -> Geos (Some Geometry) Source #
convertGeometryToRaw :: (Geometry a, CoordSeqInput a ~ cb, CoordinateSequence cb) => Geometry b -> Geos a Source #
convertMultiPolygonFromRaw :: (Geometry a, CoordSeqInput a ~ ca, CoordinateSequence ca) => a -> Geos MultiPolygon Source #
interpolate :: Geometry LineString -> Double -> Geometry Point Source #
Given a distance, returns the point (or closest point) within the geometry LineString that distance.
interpolateNormalized :: Geometry LineString -> Double -> Geometry Point Source #
Like interpolate
, but takes the distance as a double between 0 and 1.
project :: Geometry LineString -> Geometry Point -> Double Source #
Returns the distance from the origin of LineString to the point projected on the geometry (that is to a point of the line the closest to the given point).
projectNormalized :: Geometry LineString -> Geometry Point -> Double Source #
Like project
, but returns the distance as a Double between 0 and 1.
equalsExact :: Geometry a -> Geometry a -> Double -> Bool Source #
Returns True if the two geometries are exactly equal, up to a specified tolerance. The tolerance value should be a floating point number representing the error tolerance in the comparison, e.g., equalsExact g1 g2 0.001
will compare equality to within one thousandth of a unit.
equals :: Geometry a -> Geometry a -> Bool Source #
Returns True if the DE-9IM intersection matrix for the two geometries is T*F**FFF*.
overlaps :: Relatable a => a -> Geometry b -> Bool Source #
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).
within :: Relatable a => a -> Geometry b -> Bool Source #
Returns True if the DE-9IM intersection matrix for the two geometries is T*F**F***.
crosses :: Relatable a => a -> Geometry b -> Bool Source #
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).
touches :: Relatable a => a -> Geometry b -> Bool Source #
Returns True if the DE-9IM intersection matrix for the two geometries is FT*******, F**T***** or F***T****.
disjoint :: Relatable a => a -> Geometry b -> Bool Source #
Returns True
if the DE-9IM intersection matrix for the two geometries is FF*FF****.
geometryLength :: Geometry a -> Double Source #
Returns the length of this geometry (e.g., 0 for a Point, the length of a LineString, or the circumference of a Polygon).
distance :: Geometry a -> Geometry a -> Double Source #
NOTE: Data.Geometry.Geos distance calculations are linear – in other words, Data.Geometry.Geos does not perform a spherical calculation even if the SRID specifies a geographic coordinate system.
nearestPoints :: Geometry a -> Geometry a -> (Coordinate, Coordinate) Source #
Returns the closest points of the two geometries. The first point comes from g1 geometry and the second point comes from g2.