Safe Haskell | None |
---|---|
Language | Haskell2010 |
- convertGeometryFromRaw :: Geometry -> Geos (Some Geometry)
- convertGeometryToRaw :: Geometry a -> Geos Geometry
- interpolate :: Geometry LineString -> Double -> Geometry Point
- interpolateNormalized :: Geometry LineString -> Double -> Some Geometry
- project :: Geometry Point -> Geometry LineString -> Double
- projectNormalized :: Geometry Point -> Geometry LineString -> Double
- covers :: Geo a => a -> Geometry b -> Bool
- coveredBy :: Geo a => a -> Geometry b -> Bool
- equalsExact :: Geometry a -> Geometry a -> Double -> Bool
- equals :: Geometry a -> Geometry a -> Bool
- overlaps :: Geo a => a -> Geometry b -> Bool
- contains :: Geo a => a -> Geometry b -> Bool
- within :: Geo a => a -> Geometry b -> Bool
- crosses :: Geo a => a -> Geometry b -> Bool
- touches :: Geo a => a -> Geometry b -> Bool
- disjoint :: Geo 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 -> Geos (Some Geometry)
convertGeometryToRaw :: Geometry a -> Geos Geometry
interpolate :: Geometry LineString -> Double -> Geometry Point
Given a distance, returns the point (or closest point) within the geometry LineString that distance.
interpolateNormalized :: Geometry LineString -> Double -> Some Geometry
Like interpolate
, but takes the distance as a double between 0 and 1.
project :: Geometry Point -> Geometry LineString -> Double
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 Point -> Geometry LineString -> Double
Like project
, but returns the distance as a Double between 0 and 1.
equalsExact :: Geometry a -> Geometry a -> Double -> Bool
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
Returns True if the DE-9IM intersection matrix for the two geometries is T*F**FFF*.
overlaps :: Geo a => 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).
within :: Geo a => a -> Geometry b -> Bool
Returns True if the DE-9IM intersection matrix for the two geometries is T*F**F***.
crosses :: Geo a => 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).
touches :: Geo a => a -> Geometry b -> Bool
Returns True if the DE-9IM intersection matrix for the two geometries is FT*******, F**T***** or F***T****.
disjoint :: Geo a => a -> Geometry b -> Bool
Returns True
if the DE-9IM intersection matrix for the two geometries is FF*FF****.
geometryLength :: Geometry a -> Double
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
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.
hausdorffDistance :: Geometry a -> Geometry a -> Double
nearestPoints :: Geometry a -> Geometry a -> (Coordinate, Coordinate)
Returns the closest points of the two geometries. The first point comes from g1 geometry and the second point comes from g2.