Turf.Helpers
- Package
- purescript-turf
- Repository
- jisantuc/purescript-turf
#Feature Source
data Feature aA Feature a represents a GeoJSON feature with geometry of type a.
Constructors
Feature { geometry :: a, properties :: FeatureProperties }
Instances
(DecodeJson a) => DecodeJson (Feature a)(EncodeJson a) => EncodeJson (Feature a)(EncodeJson a) => Show (Feature a)(Arbitrary a) => Arbitrary (Feature a)(Eq a) => Eq (Feature a)
#FeatureProperties Source
type FeatureProperties = Object JsonFeatureProperties represent the JSON object that GeoJSON features
have in their properties field.
#featureGeometry Source
featureGeometry :: forall a. Feature a -> aSince turf returns features from all of its helper methods, it's convenient
to have a short-hand for getting the geometry back out.
#LineStringGeom Source
newtype LineStringGeomA LineStringGeom is at least two points forming a linestring.
Constructors
LineStringGeom { first :: PointGeom, next :: PointGeom, rest :: Array PointGeom }
Instances
#LineStringFeature Source
type LineStringFeature = Feature LineStringGeomA LineStringFeature is a Feature with geometry of type LineStringGeom
#lineString Source
lineString :: LineStringGeom -> FeatureProperties -> Either JsonDecodeError LineStringFeatureConstruct a LineStringFeature using the @turf/helpers lineString method
#MultiLineStringGeom Source
newtype MultiLineStringGeomA MultiLineStringGeom is a collection of unrelated LineStringGeoms
Constructors
Instances
#MultiLineStringFeature Source
type MultiLineStringFeature = Feature MultiLineStringGeomA MultiLineStringFeature is a Feature with geometry of type MultiLineStringGeom
#multiLineString Source
multiLineString :: MultiLineStringGeom -> FeatureProperties -> Either JsonDecodeError MultiLineStringFeatureConstruct a MultiLineStringFeature using the @turf/helpers multiLineString method
#PointFeature Source
type PointFeature = Feature PointGeomA PointFeature is a Feature with geometry of type PointGeom
#point Source
point :: PointGeom -> FeatureProperties -> Either JsonDecodeError PointFeatureConstruct a PointFeature using the @turf/helpers point method
#MultiPointGeom Source
newtype MultiPointGeomA MultiPointGeom represents a collection of un-connected PointGeoms
Constructors
Instances
#MultiPointFeature Source
type MultiPointFeature = Feature MultiPointGeomA MultiPointFeature is a Feature with geometry of type MultiPointGeom
#multiPoint Source
multiPoint :: MultiPointGeom -> FeatureProperties -> Either JsonDecodeError MultiPointFeatureConstruct a MultiPointFeature using the @turf/helpers multiPoint method
#LinearRing Source
newtype LinearRingA LinearRing is a collection of at least four points where the first and last
points are the same.
Instances
#mkLinearRing Source
mkLinearRing :: PointGeom -> PointGeom -> PointGeom -> Array PointGeom -> LinearRingConstruct a linear ring from the first three points and the remaining points. This method ensures that if you've failed to match the first and last points, a correct last point will be appended for you.
#PolygonGeom Source
newtype PolygonGeomA PolygonGeom represents an exterior with possibly zero holes.
Note that nothing forbids you from making holes outside the polygon.
@turf/helpers polygon method also doesn't get mad about this, so
while it doesn't really make sense, it's technically allowed.
Constructors
PolygonGeom { exteriorRing :: LinearRing, holes :: Array LinearRing }
Instances
#PolygonFeature Source
type PolygonFeature = Feature PolygonGeomA PolygonFeature is a Feature with geometry of type PolygonGeom
#polygon Source
polygon :: PolygonGeom -> FeatureProperties -> Either JsonDecodeError PolygonFeatureConstruct a PolygonFeature using the @turf/helpers polygon method
#MultiPolygonGeom Source
newtype MultiPolygonGeomA MultiPolygonGeom represents a collection of PolygonGeoms.
Constructors
Instances
#MultiPolygonFeature Source
type MultiPolygonFeature = Feature MultiPolygonGeomA MultiPolygonFeature is a Feature with geometry of type MultiPolygonGeom
#multiPolygon Source
multiPolygon :: MultiPolygonGeom -> FeatureProperties -> Either JsonDecodeError MultiPolygonFeatureConstruct a MultiPolygonFeature using the @turf/helpers multiPolygon method
- Modules
- Turf.
Helpers