PureScript FFI bindings into the Turf JS library.
Install turf
with Spago.
spago install turf
Currently the only implemented Turf module is the helpers module, with the exception of
the feature
, featureCollection
, and geometryCollection
methods.
This means that you can construct all of the non-collection and non-feature geometry types. For example, you can construct a PointGeom
, then ship that off to Turf to get
a PointFeature
back with the point
method:
import Turf.Helpers
import Foreign.Object as Object
pointGeom = PointGeom $ Tuple 3.0 4.0
properties = Object.empty
turfPoint = point pointGeom properties
-- -> Right (Feature PointGeom)
You'll get back a Feature PointGeom
, which is a GeoJSON feature with a PointGeom
geometry.
Forthcoming
Forthcoming