Comparing version
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -0,0 +0,0 @@ { |
@@ -129,5 +129,5 @@ 'use strict'; | ||
toWgs84: function(geojson, from) { | ||
return reproject(geojson, from, proj4.WGS84); | ||
toWgs84: function(geojson, from, projs) { | ||
return reproject(geojson, from, proj4.WGS84, projs); | ||
} | ||
}; |
{ | ||
"name": "reproject", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Reproject GeoJSON from one projection/CRS to another", | ||
@@ -22,10 +22,10 @@ "repository": "git@github.com:perliedman/reproject.git", | ||
"dependencies": { | ||
"minimist": "0.0.2", | ||
"concat-stream": "~1.0.1", | ||
"proj4": "^2.0.0" | ||
"minimist": "^1.2.0", | ||
"concat-stream": "^1.5.1", | ||
"proj4": "^2.3.12" | ||
}, | ||
"devDependencies": { | ||
"expect.js": "~0.2.0", | ||
"mocha": "~1.12.0" | ||
"expect.js": "^0.3.1", | ||
"mocha": "^2.4.1" | ||
} | ||
} |
@@ -0,0 +0,0 @@ reproject [](https://travis-ci.org/perliedman/reproject) [](http://badge.fury.io/js/reproject) |
@@ -217,2 +217,16 @@ 'use strict'; | ||
}); | ||
describe('named projection', function() { | ||
it('primitives', function() { | ||
var projs = { | ||
"EPSG:28992": proj4.Proj("+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs") | ||
}; | ||
expect(reproj.toWgs84({ | ||
type: 'Point', | ||
coordinates: [520000, 1230000] | ||
}, "EPSG:28992", projs)).to.be.geojson({ | ||
"type":"Point", | ||
"coordinates":[11.70272,58.88793] | ||
}); | ||
}); | ||
}) | ||
}); | ||
@@ -219,0 +233,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26957
5.74%656
2.18%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated