@terraformer/arcgis

2.1.2last stable release 3 years ago
Complexity Score
Medium
Open Issues
N/A
Dependent Projects
14
Weekly Downloadsglobal
48,210

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

@terraformer

A geographic toolkit for dealing with geometry, geography, formats, and building geodatabases.

Packages

  • @terraformer/spatial - Spatial predicates for GeoJSON.
  • @terraformer/arcgis - Convert ArcGIS JSON geometries to GeoJSON geometries and vice versa.
  • @terraformer/wkt - Convert WKT geometries to GeoJSON geometries and vice versa.

FAQ

What's the difference between this and Esri/Terraformer?

Very little!

This project is a standalone ES Module port of the original Terraformer project without the Primitives.

If you found instantiating Primitives tedious or you’d like to cut down on your bundle size by importing only the code from Terraformer that you’re actually using, you should consider upgrading.

I'm already using terraformer. How do I upgrade?

Previously it was necessary to instantiate a Terraformer Primitive in order to execute spatial operations

npm install terraformer
const Terraformer = require('terraformer')

const polygon = new Terraformer.Primitive({
  type: "LineString",
  coordinates: [
    [ 100, 0 ], [ -45, 122 ], [ 80, -60 ]
  ]
})

polygon.convexHull()

Now you’ll work directly with raw GeoJSON

npm install @terraformer/spatial
import { convexHull } from '@terraformer/spatial'

convexHull({
  type: "LineString",
  coordinates: [
    [ 100, 0 ], [ -45, 122 ], [ 80, -60 ]
  ]
})
I'm already using terraformer-wkt-parser. How do I upgrade?

Instead of this:

npm install terraformer-wkt-parser
var wkt = require('terraformer-wkt-parser')

// parse a WKT file and turn it into GeoJSON
wkt.parse('LINESTRING (30 10, 10 30, 40 40)')
wkt.convert(/* ... */)

You’ll do this:

npm install @terraformer/wkt
import { wktToGeoJSON, geojsonToWkt } from '@terraformer/wkt'

wktToGeoJSON(/* ... */)
geojsonToWKT(/* ... */)
I'm already using terraformer-arcgis-parser. How do I upgrade?

Instead of this:

npm install terraformer-arcgis-parser
var ArcGIS = require('terraformer-arcgis-parser')

// parse ArcGIS JSON and turn it into GeoJSON
ArcGIS.parse()
ArcGIS.convert()

You’ll do this:

npm install @terraformer/arcgis
const { arcgisToGeoJSON, geojsonToArcGIS } from '@terraformer/arcgis'

arcgisToGeoJSON(/* ... */)
geojsonToArcGIS(/* ... */)
What about terraformer-geostore?

This repo does not include a port of https://github.com/Esri/terraformer-geostore and there is no plan to tackle it in the future.

Since terraformer-geostore ingests plain ol’ GeoJSON, you’re welcome to keep on using the original code.

Contributing

npm install && npm test

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
3.70
Test Coverage
No Data
Follows Semver
Yes
Github Stars
191
Dependenciestotal
1
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No Data
Repo Audits
No Data

Learn how to distribute @terraformer/arcgis in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install @terraformer/arcgis
Processing...
Done

8 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.