From ff380d39b363def19c9f3c5d8ec7d5476c8327c6 Mon Sep 17 00:00:00 2001 From: dmfenton Date: Mon, 1 Feb 2016 16:09:46 -0500 Subject: [PATCH] use arcgis to geojson utils --- CHANGELOG.md | 4 ++++ package.json | 1 + src/lib/GeoJSON.js | 5 ++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b13670a6..ae1387b09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## Unreleased +### Changed +* Use ArcGIS To GeoJSON utils + ## [3.0.0-alpha.3] - 2016-01-26 ### Fixed * Include templates in build diff --git a/package.json b/package.json index 753aaf5ab..61fd1010b 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "Nate Goldman " ], "dependencies": { + "arcgis-to-geojson-utils": "^1.0.1", "async": "~0.9.0", "aws-sdk": "~2.1.20", "body-parser": "~1.12.3", diff --git a/src/lib/GeoJSON.js b/src/lib/GeoJSON.js index 49e031c20..bc4bbacb3 100644 --- a/src/lib/GeoJSON.js +++ b/src/lib/GeoJSON.js @@ -1,4 +1,4 @@ -var terraformer = require('terraformer-arcgis-parser') +var arcgisToGeoJSON = require('arcgis-to-geojson-utils').arcgisToGeoJSON var _ = require('lodash') var toGeoJSON = {} @@ -104,7 +104,6 @@ function transformFeature (feature, fields) { } }) } - return { type: 'Feature', properties: attributes, @@ -121,7 +120,7 @@ function transformFeature (feature, fields) { */ function parseGeometry (geometry) { try { - return geometry ? terraformer.parse(geometry) : null + return geometry ? arcgisToGeoJSON(geometry) : null } catch (e) { console.error(e) return null