[proj4js] 01/04: Imported Upstream version 2.3.17+ds
Bas Couwenberg
sebastic at debian.org
Tue Jan 24 18:09:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository proj4js.
commit e3e4582b0b856ff838b56dd2b5361cdc410a7b92
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Jan 24 19:00:20 2017 +0100
Imported Upstream version 2.3.17+ds
---
bower.json | 4 ++--
component.json | 4 ++--
dist/proj4-src.js | 15 +++++++--------
lib/common/adjust_zone.js | 9 ++++-----
lib/projections/utm.js | 4 ++--
lib/version-browser.js | 2 +-
package.json | 2 +-
test/testData.js | 5 +++++
8 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/bower.json b/bower.json
index 2781321..c9c8eb6 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "proj4",
- "version": "2.3.16-alpha",
+ "version": "2.3.17-alpha",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
"homepage": "https://github.com/proj4js/proj4js",
"main": "dist/proj4.js",
@@ -21,4 +21,4 @@
"almond",
"src"
]
-}
\ No newline at end of file
+}
diff --git a/component.json b/component.json
index d5a3a3b..9bcf9d8 100644
--- a/component.json
+++ b/component.json
@@ -1,6 +1,6 @@
{
"name": "proj4",
- "version": "2.3.16-alpha",
+ "version": "2.3.17-alpha",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
"repo": "proj4js/proj4js",
"keywords": [
@@ -14,4 +14,4 @@
"scripts": [
"dist/proj4.js"
]
-}
\ No newline at end of file
+}
diff --git a/dist/proj4-src.js b/dist/proj4-src.js
index 865a89e..1c24eee 100644
--- a/dist/proj4-src.js
+++ b/dist/proj4-src.js
@@ -30,7 +30,7 @@ module.exports = function(proj4){
});
}
},{"./lib/projections/aea":42,"./lib/projections/aeqd":43,"./lib/projections/cass":44,"./lib/projections/cea":45,"./lib/projections/eqc":46,"./lib/projections/eqdc":47,"./lib/projections/gnom":49,"./lib/projections/krovak":50,"./lib/projections/laea":51,"./lib/projections/lcc":52,"./lib/projections/mill":55,"./lib/projections/moll":56,"./lib/projections/nzmg":57,"./lib/projections/omerc":58,"./lib/projections/ortho":59,"./lib/projections/poly":60,"./lib/projections/sinu":61,"./lib/projec [...]
-module.exports = '2.3.16';
+module.exports = '2.3.17';
},{}],1:[function(require,module,exports){
var mgrs = require('mgrs');
@@ -216,17 +216,16 @@ module.exports = function(x) {
var adjust_lon = require('./adjust_lon');
module.exports = function(zone, lon) {
- if (!zone) {
+ if (zone === undefined) {
zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI);
if (zone < 0) {
return 0;
- }
- else if (zone >= 60) {
+ } else if (zone >= 60) {
return 59;
}
- }
- else {
+ return zone;
+ } else {
if (zone > 0 && zone <= 60) {
return zone - 1;
}
@@ -4262,8 +4261,8 @@ exports.dependsOn = 'tmerc';
exports.init = function() {
var zone = adjust_zone(this.zone, this.long0);
- if (!zone) {
- return;
+ if (zone === undefined) {
+ throw new Error('unknown utm zone');
}
this.lat0 = 0;
diff --git a/lib/common/adjust_zone.js b/lib/common/adjust_zone.js
index 861773b..276ac15 100644
--- a/lib/common/adjust_zone.js
+++ b/lib/common/adjust_zone.js
@@ -1,17 +1,16 @@
var adjust_lon = require('./adjust_lon');
module.exports = function(zone, lon) {
- if (!zone) {
+ if (zone === undefined) {
zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI);
if (zone < 0) {
return 0;
- }
- else if (zone >= 60) {
+ } else if (zone >= 60) {
return 59;
}
- }
- else {
+ return zone;
+ } else {
if (zone > 0 && zone <= 60) {
return zone - 1;
}
diff --git a/lib/projections/utm.js b/lib/projections/utm.js
index 5f37300..385cabb 100644
--- a/lib/projections/utm.js
+++ b/lib/projections/utm.js
@@ -5,8 +5,8 @@ exports.dependsOn = 'tmerc';
exports.init = function() {
var zone = adjust_zone(this.zone, this.long0);
- if (!zone) {
- return;
+ if (zone === undefined) {
+ throw new Error('unknown utm zone');
}
this.lat0 = 0;
diff --git a/lib/version-browser.js b/lib/version-browser.js
index 8e946b2..57cfb36 100644
--- a/lib/version-browser.js
+++ b/lib/version-browser.js
@@ -1 +1 @@
-module.exports = '2.3.16';
+module.exports = '2.3.17';
diff --git a/package.json b/package.json
index ea276ae..8559ede 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "proj4",
- "version": "2.3.16-alpha",
+ "version": "2.3.17-alpha",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
"main": "lib/index.js",
"directories": {
diff --git a/test/testData.js b/test/testData.js
index b3cd064..2fd4ce0 100644
--- a/test/testData.js
+++ b/test/testData.js
@@ -325,6 +325,11 @@ var testPoints = [
ll: [2, 1],
xy: [1057002.4052152266, 110955.14117382761]
},
+ {
+ code: '+proj=utm +lon_0=-3 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5',
+ ll: [2, 1],
+ xy: [1057002.4052152266, 110955.14117382761]
+ },
// these test cases are related to the original issue on GitHub
{
code: '+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/proj4js.git
More information about the Pkg-grass-devel
mailing list