A modular toolkit for working with geographic data.
The Terraformer project is broken up into a series of smaller modules.
Check out the getting started guide which will give you an overview of core concepts and methods in Terraformer.
Install the core module with NPM and then require it in your Node program.
$ npm install terraformer
var Terraformer = ;
If needed, supporting packages can be added too.
To use the Terraformer library, include a reference to it using a
To utilize supporting packages, you must load their source as well.
<!-- --><!-- --><!-- -->
var polygon ="type": "Polygon""coordinates":-122665894 455229015-122669263 455229165-122671151 455184062-122673254 455140008-122668426 455127378-122667654 455169478-122665894 455229015;var point ="type": "Point""coordinates": -122669477 45517760;
Now that you have a point and a polygon primitive you can use the primitive helper methods.
// add a new vertex to our polygonpolygon;// figure out if our point is within our polygonpoint; // returns true
You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes.
var convexHull = polygon;point; // returns truevar boundingBox = polygon; // returns the geojson bounding box for this object.
To build the site locally, first
bundle install then
bundle exec middleman to run a local server. Maintainers can run
bundle exec middleman build, then
grunt gh-pages to deploy to github pages.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.