Package detail

terraformer-arcgis-parser

Esri122.4kMITdeprecated1.1.0

terraformer-arcgis-parser is deprecated and no longer supported. Please use @terraformer/arcgis.

ArcGIS JSON format parser and converter

ArcGIS, Esri, GIS, Geography

readme

Terraformer ArcGIS JSON Parser

Build Status

Two way conversion between GeoJSON and ArcGIS Geometry. Part of the Terraformer project.

Installing

Node.js

$ npm install terraformer-arcgis-parser

Browser

In the browser, Terraformer is required.

Documentation

For full documentation check out the offical website.

Node.js

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]
});

Browser

  <!-- Load the main Terraformer library -->
  <script src="https://unpkg.com/terraformer/terraformer.js" type="text/javascript"></script>

  <!-- Load the ArcGIS Parser -->
  <script src="https://unpkg.com/terraformer-arcgis-parser/terraformer-arcgis-parser.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>

TypeScript

import arcgis = require("terraformer-arcgis-parser");

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.

Licensing

Copyright © 2013-2018 Esri

A copy of the license is available in the repository's LICENSE file.

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

unreleased

1.1.0 - 2018-07-09

Added

  • ArcGIS Extents/Envelopes are now converted to GeoJSON polygons 🙏CorinChappy🙏
  • great new command line demo app 🙏gseyffert🙏
  • an appropriate CRS is appended to output GeoJSON when web mercator geometries are encountered.

Changed

  • Ensure ring-order of GeoJSON is compliant with RFC 7946
  • web mercator northings/eastings are no longer reprojected during conversion.
  • TypeScript support files updated 🙏JeffJacobson🙏

1.0.5 - 2016-08-16

Fixed

  • Check for GeoJSON feature ids before assigning to output #24
  • correct conversion of polygons with outer rings not containing holes #28

Added

1.0.4 - 2014-06-17

Fixed

  • Account for breaking change in Terraformer

Added

  • support for z and m conversion

1.0.3 - 2015-02-24

Fixed

  • valid output on both ends of conversion #19

1.0.2 - 2014-02-10

Added

  • parseCompressedGeometry() #10

Fixed

  • parse() and convert() now close polygons during conversion. #9
  • parse() now handles compressedGeometry

1.0.1 - 2013-12-04

Fixed

  • ReferenceError: sr is not defined in ArcGIS.convert()

1.0.0 - 2013-11-12

Initial Release. Also available on NPM and Bower

npm install terraformer-arcgis-parser
bower install terraformer-arcgis-parser