Terraformer
A geographic toolkit for dealing with geometry, geography, formats, and building geo databases
Install / Use
/learn @Esri/TerraformerREADME
IMPORTANT!
Terraformer is now depreacted and this repo is marked as read-only. Development activity has moved to https://github.com/terraformer-js/terraformer.
Terraformer
A modular toolkit for working with geographic data.
Modules
The Terraformer project is broken up into a series of smaller modules.
- Terraformer Core - Contains methods and objects for working with GeoJSON. This also contains common methods used by other modules.
- WKT Parser - Parse Well Known Text into GeoJSON and vice versa.
- ArcGIS Geometry Parser - Parse the ArcGIS Geometry Format into GeoJSON and vice versa.
- GeoStore - A framework for persisting and querying GeoJSON features with pluggable indexes and persistent stores.
Features
- Designed to work in Node and the browser
- No dependencies on other tools or libraries
Getting Started
Check out the getting started guide which will give you an overview of core concepts and methods in Terraformer.
Node.js
Install the core module with npm and then require it in your Node program.
$ npm install terraformer
var Terraformer = require("terraformer");
If needed, supporting packages can be added too.
require("terraformer-arcgis-parser");
require("terraformer-wkt-parser");
require("terraformer-geostore");
Browser
<script src="https://unpkg.com/terraformer@1.0.8"></script>
To utilize supporting packages, you must load their source as well.
<script src="https://unpkg.com/terraformer-arcgis-parser@1.0.5"></script>
<script src="https://unpkg.com/terraformer-wkt-parser@1.1.2"></script>
Documentation
- Terraformer Core - Contains methods and objects for working with GeoJSON. This also contains common methods used by other modules.
- WKT Parser - Parse Well Known Text into GeoJSON and vice versa.
- ArcGIS Geometry Parser - Parse the ArcGIS Geometry Format into GeoJSON and vice versa.
- GeoStore - A framework for persisting and querying GeoJSON features with pluggable indexes and persistent stores.
var polygon = new Terraformer.Primitive({
type: "Polygon",
coordinates: [
[
[-122.665894, 45.5229015],
[-122.669263, 45.5229165],
[-122.671151, 45.5184062],
[-122.673254, 45.5140008],
[-122.668426, 45.5127378],
[-122.667654, 45.5169478],
[-122.665894, 45.5229015],
],
],
});
var point = new Terraformer.Primitive({
type: "Point",
coordinates: [-122.669477, 45.51776],
});
Now that you have a point and a polygon primitive you can use the primitive helper methods.
// add a new vertex to our polygon
polygon.insertVertex([-122.670851, 45.513189], 2);
// figure out if our point is within our polygon
point.within(polygon); // returns true
You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes.
var convexHull = polygon.convexHull();
point.within(convexHull); // returns true
var boundingBox = polygon.bbox(); // returns the geojson bounding box for this object.
Contributing
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Licensing
A copy of the license is available in the repository's LICENSE file.
Related Skills
feishu-drive
338.7k|
things-mac
338.7kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
338.7kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
1.9k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
