Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript
Branch: master

Merge pull request #23 from patrickarlt/master

Fix for terraformer 1.0.4, add support for Z and M
latest commit 302bbea016
@jyaganeh jyaganeh authored

README.md

Terraformer ArcGIS JSON Parser

This plugin handles 2 way conversion between GeoJSON and the ArcGIS Geometry format used by Esri.

This package is part of the Terraformer project.

Installing

Node.js

$ npm install terraformer-arcgis-parser

Browser

In the browser, Terraformer is required.

You can use Bower to install the components if you like or download them and host them yourself.

$ bower install terraformer-arcgis-parser

Documentation

For full documentation check out the offical website.

var ArcGIS = require('terraformer-arcgis-parser');

// parse ArcGIS JSON, convert it to a Terraformer.Primitive (GeoJSON)
var primitive = ArcGIS.parse({
    x:"-122.6764",
    y:"45.5165",
    spatialReference: {
      wkid: 4326
    }
  });

// take a Terraformer.Primitive or GeoJSON and convert it back to ArcGIS JSON
var point = ArcGIS.convert({
  "type": "Point",
  "coordinates": [45.5165, -122.6764]
});
  <!-- Load the main Terraformer library -->
  <script src="terraformer.min.js" type="text/javascript"></script>

  <!-- Load the ArcGIS Parser -->
  <script src="terraformer-arcgis-parser.min.js" type="text/javascript"></script>

  <!-- Use it! -->
  <script>
    var primitive = Terraformer.ArcGIS.parse({
      x:"-122.6764",
      y:"45.5165",
      spatialReference: {
        wkid: 4326
      }
    });

    // take a Terraformer.Primitive or GeoJSON and convert it to ArcGIS JSON
    var point = Terraformer.ArcGIS.convert({
      "type": "Point",
      "coordinates": [45.5165, -122.6764]
    });
  </script>

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Something went wrong with that request. Please try again.