Package

purescript-turf

Repository
jisantuc/purescript-turf
License
MIT
Uploaded by
jisantuc
Published on
2021-03-02T15:59:58Z

CI Release Maintainer: jisantuc

PureScript FFI bindings into the Turf JS library.

Installation

Install turf with Spago.

spago install turf

Quick Start

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.

Documentation

Forthcoming

Contributing

Forthcoming