Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "proj4", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/proj4js/proj4js", |
{ | ||
"name": "proj4", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", | ||
@@ -5,0 +5,0 @@ "repo": "proj4js/proj4js", |
@@ -52,4 +52,6 @@ var Datum = require('./constants/Datum'); | ||
json.datum = datum(json); | ||
if (!json.datum) { | ||
json.datum = datum(json); | ||
} | ||
return json; | ||
}; | ||
}; |
{ | ||
"name": "proj4", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,2 +0,2 @@ | ||
#PROJ4JS | ||
#PROJ4JS [![Build Status](https://travis-ci.org/proj4js/proj4js.svg)](https://travis-ci.org/proj4js/proj4js) | ||
@@ -20,2 +20,4 @@ Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations. | ||
if you do not want to download anything, Proj4js is also hosted on [cdnjs](http://www.cdnjs.com/libraries/proj4js) for direct use in your browser applications. | ||
##Using | ||
@@ -22,0 +24,0 @@ |
@@ -216,2 +216,21 @@ // You can do this in the grunt config for each mocha task, see the `options` config | ||
}); | ||
describe('Defs and Datum definition', function() { | ||
proj4.defs("EPSG:5514", "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=greenwich +units=m +no_defs +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56"); | ||
var point = proj4.transform(proj4.Proj("WGS84"), proj4.Proj("EPSG:5514"), | ||
proj4.toPoint([12.806988, 49.452262])); | ||
it("Longitude of point from WGS84 correct.", function() { | ||
assert.equal(point.x.toPrecision(8), "-868208.61", "Longitude of point from WGS84 correct."); | ||
}); | ||
it("Latitude of point from WGS84 correct.", function() { | ||
assert.equal(point.y.toPrecision(9), "-1095793.64", "Latitude of point from WGS84 correct."); | ||
}); | ||
var point2 = proj4.transform(proj4.Proj("WGS84"), proj4.Proj("EPSG:5514"), | ||
proj4.toPoint([12.806988, 49.452262])); | ||
it("Longitude of point from WGS84 with second call for EPSG:5514 correct.", function() { | ||
assert.equal(point2.x.toPrecision(8), "-868208.61", "Longitude of point from WGS84 correct."); | ||
}); | ||
it("Latitude of point from WGS84 with second call for EPSG:5514 correct.", function() { | ||
assert.equal(point2.y.toPrecision(9), "-1095793.64", "Latitude of point from WGS84 correct."); | ||
}); | ||
}); | ||
}); | ||
@@ -218,0 +237,0 @@ }); |
@@ -282,2 +282,7 @@ var testPoints = [ | ||
xy:[325132.0089586496, 674822.638235305] | ||
}, | ||
{ | ||
code:"+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=greenwich +units=m +no_defs +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56", | ||
ll: [12.806988, 49.452262], | ||
xy: [-868208.61, -1095793.64] | ||
} | ||
@@ -291,2 +296,2 @@ ]; | ||
}); | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
430141
104
10554
154