GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - calvinmetcalf/esri2geo: Converts ESRI json to geojson

BranchesTags
Open more actions menu

Latest commit

 

History

106 Commits
106 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
README.md
README.md
 
 
esri2geo.js
esri2geo.js
 
 
license.md
license.md
 
 
package.json
package.json
 
 

Repository files navigation

esri2geo

This is a tool to turn esri json to geojson, which should work in the browser, in a worker, and in node.

Looking for the esri toolbox? It's over at it's own repo to hopefully merge with @feomike's version

Sync Method

var geoJSON = toGeoJSON(esriJSON);

// do something with geoJSON object

Async Methods

// callback for resulting data
function handleGeoJSON(err, data) { 
  if (err) {
    console.error(err);
    return;
  }
  
  // data => GeoJSON
  // do something with it..
}

toGeoJSON(esriJSON, handleGeoJSON);
// or
toGeoJSON('same/origin/url/to/esriJSON', handleGeoJSON);

Using From Node

You can install from npm:

npm install esri2geo --save

The use from your node app like so:

var esri2geo = require('esri2geo');

esri2geo(esriJSON, function (err, data) {
  // handle error, deal with data here
});

Using with Webpack 2.x

Install from npm as you would with node.

To avoid Webpack warnings about missing node modules, add this to your webpack config:

node: {
    console: true,
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
    dns: 'empty',
    dgram: 'empty'
},

Using as standalone browser component

Download the esri2geo.js file, include on your page and reference it through the esri2geo namespace:

esri2geo.toGeoJSON(esriJSON, function (err, data) {
  // handle error, deal with data here
});

Note: You can also use the other methods above.

Disclaimer: not endorsed by, or have anything to do with ESRI.

About

Converts ESRI json to geojson

Resources

Readme
MIT license
Activity

Stars

37 stars

Watchers

3 watching

Forks

21 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.