
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
terraformer
Advanced tools
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 = require('terraformer');
If needed, supporting packages can be added too.
require('terraformer-arcgis-parser');
require('terraformer-wkt-parser');
require('terraformer-geostore');
To see Terraformer in action in the browser, check out our live demos. To use it in the browser yourself, reference it using a <script>
tag.
<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>
Make sure you check out the full documentation on the Terraformer website and the getting started guide.
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.517760]
});
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.
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.
A copy of the license is available in the repository's LICENSE file.
[1.0.12] - 2020-04-07
"strict mode"
FAQs
A Geo-toolkit built in Javascript.
The npm package terraformer receives a total of 99,834 weekly downloads. As such, terraformer popularity was classified as popular.
We found that terraformer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.