Comparing version 1.8.1 to 1.8.2
@@ -5,2 +5,6 @@ # Change Log | ||
## [1.8.2] - 03-24-2017 | ||
### Fixed | ||
* Properly reproject input geometries that have multiple polygons | ||
## [1.8.1] - 03-17-2017 | ||
@@ -115,2 +119,3 @@ ### Fixed | ||
[1.8.2]: https://github.com/featureserver/winnow/compare/v1.8.1...v1.8.2 | ||
[1.8.1]: https://github.com/featureserver/winnow/compare/v1.8.1...v1.8.0 | ||
@@ -117,0 +122,0 @@ [1.8.0]: https://github.com/featureserver/winnow/compare/v1.7.1...v1.8.0 |
@@ -127,4 +127,4 @@ var proj4 = require('proj4') | ||
if (inSR === 102100) { inSR = 3857 } | ||
if (Array.isArray(coordinates[0])) { return [coordinates[0].map(function (a) { return projectCoordinates(inSR, a) })] } | ||
if (Array.isArray(coordinates[0]) && Array.isArray(coordinates[0][0])) { return coordinates.map(function (a) { return projectCoordinates(inSR, a) }) } | ||
else if (Array.isArray(coordinates[0]) && typeof coordinates[0][0] === 'number') { return coordinates.map(function (a) { return projectCoordinates(inSR, a) }) } | ||
else { return proj4(("EPSG:" + inSR), 'EPSG:4326', coordinates) } | ||
@@ -131,0 +131,0 @@ } |
{ | ||
"name": "winnow", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Apply sql-like filters to GeoJSON", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
49503
22
808