Skip to content

Commit

Permalink
use arcgis to geojson utils
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfenton committed Feb 1, 2016
1 parent 596f076 commit ff380d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Nate Goldman <[email protected]>"
],
"dependencies": {
"arcgis-to-geojson-utils": "^1.0.1",
"async": "~0.9.0",
"aws-sdk": "~2.1.20",
"body-parser": "~1.12.3",
Expand Down
5 changes: 2 additions & 3 deletions src/lib/GeoJSON.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var terraformer = require('terraformer-arcgis-parser')
var arcgisToGeoJSON = require('arcgis-to-geojson-utils').arcgisToGeoJSON
var _ = require('lodash')
var toGeoJSON = {}

Expand Down Expand Up @@ -104,7 +104,6 @@ function transformFeature (feature, fields) {
}
})
}

return {
type: 'Feature',
properties: attributes,
Expand All @@ -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
Expand Down

3 comments on commit ff380d3

@jgravois
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need Terraformer too?

@dmfenton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, yes, it's used inside lib/query.js among other places

@jgravois
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet thanks. next time i'll do more digging myself.

Please sign in to comment.