[proj4js] 01/06: Imported Upstream version 2.3.5+ds

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat May 9 21:03:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository proj4js.

commit 49f0aae66411909d6f77b68812f902c2c9cf0880
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat May 9 22:40:19 2015 +0200

    Imported Upstream version 2.3.5+ds
---
 bower.json               |   2 +-
 component.json           |   2 +-
 dist/proj4-src.js        | 111 +++++++++++++++++++++++++++--------------------
 lib/constants/units.js   |   2 +
 lib/projString.js        |   6 +++
 lib/projections/stere.js |   2 +-
 lib/wkt.js               |   6 ++-
 package.json             |   2 +-
 test/testData.js         |  13 ++++++
 9 files changed, 93 insertions(+), 53 deletions(-)

diff --git a/bower.json b/bower.json
index 1a576f1..01d5fae 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
 {
   "name": "proj4",
-  "version": "2.3.4",
+  "version": "2.3.4-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",
diff --git a/component.json b/component.json
index 406be51..b013b48 100644
--- a/component.json
+++ b/component.json
@@ -1,6 +1,6 @@
 {
   "name": "proj4",
-  "version": "2.3.4",
+  "version": "2.3.4-alpha",
   "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
   "repo": "proj4js/proj4js",
   "keywords": [
diff --git a/dist/proj4-src.js b/dist/proj4-src.js
index 7560f55..6fa72df 100644
--- a/dist/proj4-src.js
+++ b/dist/proj4-src.js
@@ -34,7 +34,7 @@ Point.prototype.toMGRS = function(accuracy) {
   return mgrs.forward([this.x, this.y], accuracy);
 };
 module.exports = Point;
-},{"mgrs":66}],2:[function(_dereq_,module,exports){
+},{"mgrs":67}],2:[function(_dereq_,module,exports){
 var parseCode = _dereq_("./parseCode");
 var extend = _dereq_('./extend');
 var projections = _dereq_('./projections');
@@ -69,7 +69,7 @@ Projection.projections = projections;
 Projection.projections.start();
 module.exports = Projection;
 
-},{"./deriveConstants":32,"./extend":33,"./parseCode":36,"./projections":38}],3:[function(_dereq_,module,exports){
+},{"./deriveConstants":33,"./extend":34,"./parseCode":37,"./projections":39}],3:[function(_dereq_,module,exports){
 module.exports = function(crs, denorm, point) {
   var xin = point.x,
     yin = point.y,
@@ -651,6 +651,10 @@ exports.stockholm = 18.058277777778; //"18d3'29.8\"E",
 exports.athens = 23.7163375; //"23d42'58.815\"E",
 exports.oslo = 10.722916666667; //"10d43'22.5\"E"
 },{}],28:[function(_dereq_,module,exports){
+exports.ft = {to_meter: 0.3048};
+exports['us-ft'] = {to_meter: 1200 / 3937};
+
+},{}],29:[function(_dereq_,module,exports){
 var proj = _dereq_('./Proj');
 var transform = _dereq_('./transform');
 var wgs84 = proj('WGS84');
@@ -715,7 +719,7 @@ function proj4(fromProj, toProj, coord) {
   }
 }
 module.exports = proj4;
-},{"./Proj":2,"./transform":64}],29:[function(_dereq_,module,exports){
+},{"./Proj":2,"./transform":65}],30:[function(_dereq_,module,exports){
 var HALF_PI = Math.PI/2;
 var PJD_3PARAM = 1;
 var PJD_7PARAM = 2;
@@ -1121,7 +1125,7 @@ datum.prototype = {
 */
 module.exports = datum;
 
-},{}],30:[function(_dereq_,module,exports){
+},{}],31:[function(_dereq_,module,exports){
 var PJD_3PARAM = 1;
 var PJD_7PARAM = 2;
 var PJD_GRIDSHIFT = 3;
@@ -1222,7 +1226,7 @@ module.exports = function(source, dest, point) {
 };
 
 
-},{}],31:[function(_dereq_,module,exports){
+},{}],32:[function(_dereq_,module,exports){
 var globals = _dereq_('./global');
 var parseProj = _dereq_('./projString');
 var wkt = _dereq_('./wkt');
@@ -1279,7 +1283,7 @@ function defs(name) {
 globals(defs);
 module.exports = defs;
 
-},{"./global":34,"./projString":37,"./wkt":65}],32:[function(_dereq_,module,exports){
+},{"./global":35,"./projString":38,"./wkt":66}],33:[function(_dereq_,module,exports){
 var Datum = _dereq_('./constants/Datum');
 var Ellipsoid = _dereq_('./constants/Ellipsoid');
 var extend = _dereq_('./extend');
@@ -1337,7 +1341,7 @@ module.exports = function(json) {
   return json;
 };
 
-},{"./constants/Datum":25,"./constants/Ellipsoid":26,"./datum":29,"./extend":33}],33:[function(_dereq_,module,exports){
+},{"./constants/Datum":25,"./constants/Ellipsoid":26,"./datum":30,"./extend":34}],34:[function(_dereq_,module,exports){
 module.exports = function(destination, source) {
   destination = destination || {};
   var value, property;
@@ -1353,7 +1357,7 @@ module.exports = function(destination, source) {
   return destination;
 };
 
-},{}],34:[function(_dereq_,module,exports){
+},{}],35:[function(_dereq_,module,exports){
 module.exports = function(defs) {
   defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
   defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");
@@ -1366,7 +1370,7 @@ module.exports = function(defs) {
   defs['EPSG:102113'] = defs['EPSG:3857'];
 };
 
-},{}],35:[function(_dereq_,module,exports){
+},{}],36:[function(_dereq_,module,exports){
 var proj4 = _dereq_('./core');
 proj4.defaultDatum = 'WGS84'; //default datum
 proj4.Proj = _dereq_('./Proj');
@@ -1379,7 +1383,7 @@ proj4.mgrs = _dereq_('mgrs');
 proj4.version = _dereq_('../package.json').version;
 _dereq_('./includedProjections')(proj4);
 module.exports = proj4;
-},{"../package.json":67,"./Point":1,"./Proj":2,"./common/toPoint":23,"./core":28,"./defs":31,"./includedProjections":"gWUPNW","./transform":64,"mgrs":66}],36:[function(_dereq_,module,exports){
+},{"../package.json":68,"./Point":1,"./Proj":2,"./common/toPoint":23,"./core":29,"./defs":32,"./includedProjections":"hTEDpn","./transform":65,"mgrs":67}],37:[function(_dereq_,module,exports){
 var defs = _dereq_('./defs');
 var wkt = _dereq_('./wkt');
 var projStr = _dereq_('./projString');
@@ -1416,9 +1420,10 @@ function parse(code){
 }
 
 module.exports = parse;
-},{"./defs":31,"./projString":37,"./wkt":65}],37:[function(_dereq_,module,exports){
+},{"./defs":32,"./projString":38,"./wkt":66}],38:[function(_dereq_,module,exports){
 var D2R = 0.01745329251994329577;
 var PrimeMeridian = _dereq_('./constants/PrimeMeridian');
+var units = _dereq_('./constants/units');
 
 module.exports = function(defData) {
   var self = {};
@@ -1501,6 +1506,11 @@ module.exports = function(defData) {
     to_meter: function(v) {
       self.to_meter = parseFloat(v);
     },
+    units: function(v) {
+      if (units[v]) {
+        self.to_meter = units[v].to_meter;
+      }
+    },
     from_greenwich: function(v) {
       self.from_greenwich = v * D2R;
     },
@@ -1543,7 +1553,7 @@ module.exports = function(defData) {
   return self;
 };
 
-},{"./constants/PrimeMeridian":27}],38:[function(_dereq_,module,exports){
+},{"./constants/PrimeMeridian":27,"./constants/units":28}],39:[function(_dereq_,module,exports){
 var projs = [
   _dereq_('./projections/merc'),
   _dereq_('./projections/longlat')
@@ -1579,7 +1589,7 @@ exports.start = function() {
   projs.forEach(add);
 };
 
-},{"./projections/longlat":50,"./projections/merc":51}],39:[function(_dereq_,module,exports){
+},{"./projections/longlat":51,"./projections/merc":52}],40:[function(_dereq_,module,exports){
 var EPSLN = 1.0e-10;
 var msfnz = _dereq_('../common/msfnz');
 var qsfnz = _dereq_('../common/qsfnz');
@@ -1702,7 +1712,7 @@ exports.phi1z = function(eccent, qs) {
 };
 exports.names = ["Albers_Conic_Equal_Area", "Albers", "aea"];
 
-},{"../common/adjust_lon":5,"../common/asinz":6,"../common/msfnz":15,"../common/qsfnz":20}],40:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/asinz":6,"../common/msfnz":15,"../common/qsfnz":20}],41:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var HALF_PI = Math.PI/2;
 var EPSLN = 1.0e-10;
@@ -1901,7 +1911,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Azimuthal_Equidistant", "aeqd"];
 
-},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],41:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],42:[function(_dereq_,module,exports){
 var mlfn = _dereq_('../common/mlfn');
 var e0fn = _dereq_('../common/e0fn');
 var e1fn = _dereq_('../common/e1fn');
@@ -2005,7 +2015,7 @@ exports.inverse = function(p) {
 
 };
 exports.names = ["Cassini", "Cassini_Soldner", "cass"];
-},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],42:[function(_dereq_,module,exports){
+},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],43:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var qsfnz = _dereq_('../common/qsfnz');
 var msfnz = _dereq_('../common/msfnz');
@@ -2070,7 +2080,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["cea"];
 
-},{"../common/adjust_lon":5,"../common/iqsfnz":13,"../common/msfnz":15,"../common/qsfnz":20}],43:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/iqsfnz":13,"../common/msfnz":15,"../common/qsfnz":20}],44:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var adjust_lat = _dereq_('../common/adjust_lat');
 exports.init = function() {
@@ -2113,7 +2123,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
 
-},{"../common/adjust_lat":4,"../common/adjust_lon":5}],44:[function(_dereq_,module,exports){
+},{"../common/adjust_lat":4,"../common/adjust_lon":5}],45:[function(_dereq_,module,exports){
 var e0fn = _dereq_('../common/e0fn');
 var e1fn = _dereq_('../common/e1fn');
 var e2fn = _dereq_('../common/e2fn');
@@ -2225,7 +2235,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Equidistant_Conic", "eqdc"];
 
-},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/imlfn":12,"../common/mlfn":14,"../common/msfnz":15}],45:[function(_dereq_,module,exports){
+},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/imlfn":12,"../common/mlfn":14,"../common/msfnz":15}],46:[function(_dereq_,module,exports){
 var FORTPI = Math.PI/4;
 var srat = _dereq_('../common/srat');
 var HALF_PI = Math.PI/2;
@@ -2272,7 +2282,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["gauss"];
 
-},{"../common/srat":22}],46:[function(_dereq_,module,exports){
+},{"../common/srat":22}],47:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var EPSLN = 1.0e-10;
 var asinz = _dereq_('../common/asinz');
@@ -2373,7 +2383,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["gnom"];
 
-},{"../common/adjust_lon":5,"../common/asinz":6}],47:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/asinz":6}],48:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 exports.init = function() {
   this.a = 6377397.155;
@@ -2473,7 +2483,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Krovak", "krovak"];
 
-},{"../common/adjust_lon":5}],48:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5}],49:[function(_dereq_,module,exports){
 var HALF_PI = Math.PI/2;
 var FORTPI = Math.PI/4;
 var EPSLN = 1.0e-10;
@@ -2763,7 +2773,7 @@ exports.authlat = function(beta, APA) {
 };
 exports.names = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
 
-},{"../common/adjust_lon":5,"../common/qsfnz":20}],49:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/qsfnz":20}],50:[function(_dereq_,module,exports){
 var EPSLN = 1.0e-10;
 var msfnz = _dereq_('../common/msfnz');
 var tsfnz = _dereq_('../common/tsfnz');
@@ -2900,7 +2910,7 @@ exports.inverse = function(p) {
 
 exports.names = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
 
-},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],50:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],51:[function(_dereq_,module,exports){
 exports.init = function() {
   //no-op for longlat
 };
@@ -2912,7 +2922,7 @@ exports.forward = identity;
 exports.inverse = identity;
 exports.names = ["longlat", "identity"];
 
-},{}],51:[function(_dereq_,module,exports){
+},{}],52:[function(_dereq_,module,exports){
 var msfnz = _dereq_('../common/msfnz');
 var HALF_PI = Math.PI/2;
 var EPSLN = 1.0e-10;
@@ -3011,7 +3021,7 @@ exports.inverse = function(p) {
 
 exports.names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
 
-},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/tsfnz":24}],52:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/tsfnz":24}],53:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 /*
   reference
@@ -3058,7 +3068,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Miller_Cylindrical", "mill"];
 
-},{"../common/adjust_lon":5}],53:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5}],54:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var EPSLN = 1.0e-10;
 exports.init = function() {};
@@ -3137,7 +3147,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Mollweide", "moll"];
 
-},{"../common/adjust_lon":5}],54:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5}],55:[function(_dereq_,module,exports){
 var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
 /*
   reference
@@ -3357,7 +3367,7 @@ exports.inverse = function(p) {
   return p;
 };
 exports.names = ["New_Zealand_Map_Grid", "nzmg"];
-},{}],55:[function(_dereq_,module,exports){
+},{}],56:[function(_dereq_,module,exports){
 var tsfnz = _dereq_('../common/tsfnz');
 var adjust_lon = _dereq_('../common/adjust_lon');
 var phi2z = _dereq_('../common/phi2z');
@@ -3526,7 +3536,7 @@ exports.inverse = function(p) {
 };
 
 exports.names = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
-},{"../common/adjust_lon":5,"../common/phi2z":16,"../common/tsfnz":24}],56:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/phi2z":16,"../common/tsfnz":24}],57:[function(_dereq_,module,exports){
 var e0fn = _dereq_('../common/e0fn');
 var e1fn = _dereq_('../common/e1fn');
 var e2fn = _dereq_('../common/e2fn');
@@ -3655,7 +3665,7 @@ exports.inverse = function(p) {
   return p;
 };
 exports.names = ["Polyconic", "poly"];
-},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/mlfn":14}],57:[function(_dereq_,module,exports){
+},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/mlfn":14}],58:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var adjust_lat = _dereq_('../common/adjust_lat');
 var pj_enfn = _dereq_('../common/pj_enfn');
@@ -3762,7 +3772,7 @@ exports.inverse = function(p) {
   return p;
 };
 exports.names = ["Sinusoidal", "sinu"];
-},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/asinz":6,"../common/pj_enfn":17,"../common/pj_inv_mlfn":18,"../common/pj_mlfn":19}],58:[function(_dereq_,module,exports){
+},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/asinz":6,"../common/pj_enfn":17,"../common/pj_inv_mlfn":18,"../common/pj_mlfn":19}],59:[function(_dereq_,module,exports){
 /*
   references:
     Formules et constantes pour le Calcul pour la
@@ -3844,7 +3854,7 @@ exports.inverse = function(p) {
 
 exports.names = ["somerc"];
 
-},{}],59:[function(_dereq_,module,exports){
+},{}],60:[function(_dereq_,module,exports){
 var HALF_PI = Math.PI/2;
 var EPSLN = 1.0e-10;
 var sign = _dereq_('../common/sign');
@@ -4010,8 +4020,9 @@ exports.inverse = function(p) {
   return p;
 
 };
-exports.names = ["stere"];
-},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],60:[function(_dereq_,module,exports){
+exports.names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
+
+},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],61:[function(_dereq_,module,exports){
 var gauss = _dereq_('./gauss');
 var adjust_lon = _dereq_('../common/adjust_lon');
 exports.init = function() {
@@ -4070,7 +4081,7 @@ exports.inverse = function(p) {
 
 exports.names = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea","Oblique Stereographic Alternative"];
 
-},{"../common/adjust_lon":5,"./gauss":45}],61:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"./gauss":46}],62:[function(_dereq_,module,exports){
 var e0fn = _dereq_('../common/e0fn');
 var e1fn = _dereq_('../common/e1fn');
 var e2fn = _dereq_('../common/e2fn');
@@ -4207,7 +4218,7 @@ exports.inverse = function(p) {
 };
 exports.names = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
 
-},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/mlfn":14,"../common/sign":21}],62:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/mlfn":14,"../common/sign":21}],63:[function(_dereq_,module,exports){
 var D2R = 0.01745329251994329577;
 var tmerc = _dereq_('./tmerc');
 exports.dependsOn = 'tmerc';
@@ -4227,7 +4238,7 @@ exports.init = function() {
 };
 exports.names = ["Universal Transverse Mercator System", "utm"];
 
-},{"./tmerc":61}],63:[function(_dereq_,module,exports){
+},{"./tmerc":62}],64:[function(_dereq_,module,exports){
 var adjust_lon = _dereq_('../common/adjust_lon');
 var HALF_PI = Math.PI/2;
 var EPSLN = 1.0e-10;
@@ -4348,7 +4359,7 @@ exports.inverse = function(p) {
   return p;
 };
 exports.names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
-},{"../common/adjust_lon":5,"../common/asinz":6}],64:[function(_dereq_,module,exports){
+},{"../common/adjust_lon":5,"../common/asinz":6}],65:[function(_dereq_,module,exports){
 var D2R = 0.01745329251994329577;
 var R2D = 57.29577951308232088;
 var PJD_3PARAM = 1;
@@ -4421,7 +4432,7 @@ module.exports = function transform(source, dest, point) {
 
   return point;
 };
-},{"./Proj":2,"./adjust_axis":3,"./common/toPoint":23,"./datum_transform":30}],65:[function(_dereq_,module,exports){
+},{"./Proj":2,"./adjust_axis":3,"./common/toPoint":23,"./datum_transform":31}],66:[function(_dereq_,module,exports){
 var D2R = 0.01745329251994329577;
 var extend = _dereq_('./extend');
 
@@ -4619,9 +4630,13 @@ function cleanWKT(wkt) {
     ['srsCode', 'name']
   ];
   list.forEach(renamer);
-  if (!wkt.long0 && wkt.longc && (wkt.PROJECTION === 'Albers_Conic_Equal_Area' || wkt.PROJECTION === "Lambert_Azimuthal_Equal_Area")) {
+  if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === "Lambert_Azimuthal_Equal_Area")) {
     wkt.long0 = wkt.longc;
   }
+  if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {
+    wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
+    wkt.lat_ts = wkt.lat1;
+  }
 }
 module.exports = function(wkt, self) {
   var lisp = JSON.parse(("," + wkt).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g, ',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g, ',"$1"]').replace(/,\["VERTCS".+/,''));
@@ -4636,7 +4651,7 @@ module.exports = function(wkt, self) {
   return extend(self, obj.output);
 };
 
-},{"./extend":33}],66:[function(_dereq_,module,exports){
+},{"./extend":34}],67:[function(_dereq_,module,exports){
 
 
 
@@ -5373,10 +5388,10 @@ function getMinNorthing(zoneLetter) {
 
 }
 
-},{}],67:[function(_dereq_,module,exports){
+},{}],68:[function(_dereq_,module,exports){
 module.exports={
   "name": "proj4",
-  "version": "2.3.4",
+  "version": "2.3.5",
   "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
   "main": "lib/index.js",
   "directories": {
@@ -5422,8 +5437,8 @@ module.exports={
 }
 
 },{}],"./includedProjections":[function(_dereq_,module,exports){
-module.exports=_dereq_('gWUPNW');
-},{}],"gWUPNW":[function(_dereq_,module,exports){
+module.exports=_dereq_('hTEDpn');
+},{}],"hTEDpn":[function(_dereq_,module,exports){
 var projs = [
  _dereq_('./lib/projections/tmerc'),
 	_dereq_('./lib/projections/utm'),
@@ -5453,6 +5468,6 @@ module.exports = function(proj4){
    proj4.Proj.projections.add(proj);
  });
 }
-},{"./lib/projections/aea":39,"./lib/projections/aeqd":40,"./lib/projections/cass":41,"./lib/projections/cea":42,"./lib/projections/eqc":43,"./lib/projections/eqdc":44,"./lib/projections/gnom":46,"./lib/projections/krovak":47,"./lib/projections/laea":48,"./lib/projections/lcc":49,"./lib/projections/mill":52,"./lib/projections/moll":53,"./lib/projections/nzmg":54,"./lib/projections/omerc":55,"./lib/projections/poly":56,"./lib/projections/sinu":57,"./lib/projections/somerc":58,"./lib/proje [...]
-(35)
+},{"./lib/projections/aea":40,"./lib/projections/aeqd":41,"./lib/projections/cass":42,"./lib/projections/cea":43,"./lib/projections/eqc":44,"./lib/projections/eqdc":45,"./lib/projections/gnom":47,"./lib/projections/krovak":48,"./lib/projections/laea":49,"./lib/projections/lcc":50,"./lib/projections/mill":53,"./lib/projections/moll":54,"./lib/projections/nzmg":55,"./lib/projections/omerc":56,"./lib/projections/poly":57,"./lib/projections/sinu":58,"./lib/projections/somerc":59,"./lib/proje [...]
+(36)
 });
\ No newline at end of file
diff --git a/lib/constants/units.js b/lib/constants/units.js
new file mode 100644
index 0000000..c5188c2
--- /dev/null
+++ b/lib/constants/units.js
@@ -0,0 +1,2 @@
+exports.ft = {to_meter: 0.3048};
+exports['us-ft'] = {to_meter: 1200 / 3937};
diff --git a/lib/projString.js b/lib/projString.js
index d81ed89..30587b9 100644
--- a/lib/projString.js
+++ b/lib/projString.js
@@ -1,5 +1,6 @@
 var D2R = 0.01745329251994329577;
 var PrimeMeridian = require('./constants/PrimeMeridian');
+var units = require('./constants/units');
 
 module.exports = function(defData) {
   var self = {};
@@ -82,6 +83,11 @@ module.exports = function(defData) {
     to_meter: function(v) {
       self.to_meter = parseFloat(v);
     },
+    units: function(v) {
+      if (units[v]) {
+        self.to_meter = units[v].to_meter;
+      }
+    },
     from_greenwich: function(v) {
       self.from_greenwich = v * D2R;
     },
diff --git a/lib/projections/stere.js b/lib/projections/stere.js
index fcae227..52aeb92 100644
--- a/lib/projections/stere.js
+++ b/lib/projections/stere.js
@@ -163,4 +163,4 @@ exports.inverse = function(p) {
   return p;
 
 };
-exports.names = ["stere"];
\ No newline at end of file
+exports.names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
diff --git a/lib/wkt.js b/lib/wkt.js
index d268f5c..f759770 100644
--- a/lib/wkt.js
+++ b/lib/wkt.js
@@ -195,9 +195,13 @@ function cleanWKT(wkt) {
     ['srsCode', 'name']
   ];
   list.forEach(renamer);
-  if (!wkt.long0 && wkt.longc && (wkt.PROJECTION === 'Albers_Conic_Equal_Area' || wkt.PROJECTION === "Lambert_Azimuthal_Equal_Area")) {
+  if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === "Lambert_Azimuthal_Equal_Area")) {
     wkt.long0 = wkt.longc;
   }
+  if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {
+    wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
+    wkt.lat_ts = wkt.lat1;
+  }
 }
 module.exports = function(wkt, self) {
   var lisp = JSON.parse(("," + wkt).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g, ',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g, ',"$1"]').replace(/,\["VERTCS".+/,''));
diff --git a/package.json b/package.json
index e3ffc4d..76737cd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "proj4",
-  "version": "2.3.4",
+  "version": "2.3.4-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 1069859..cb9bd80 100644
--- a/test/testData.js
+++ b/test/testData.js
@@ -223,6 +223,14 @@ var testPoints = [
     ll:[0, 75],
     xy:[2000000, 325449.806286]
   },{
+    code:'+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"',
+    ll:[0, -72.5],
+    xy:[0, 1910008.78441421]
+  },{
+    code:'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic South", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]], PROJECTION["Polar Stereographic (variant B)", AUTHORITY["EPSG","9829"]], PARAMETER["ce [...]
+    ll:[0, -72.5],
+    xy:[0, 1910008.78441421]
+  },{
     code:'PROJCS["NAD83(CSRS98) / New Brunswick Stereo (deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Stereographic_North_Pole"],PARAMETER["standard_parallel_1",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],UNIT["Meter",1]]',
     ll:[-66.415, 46.34],
     xy:[2506543.370459, 7482219.546176]
@@ -285,6 +293,11 @@ var testPoints = [
     ll: [12.806988, 49.452262],
     xy: [-868208.61, -1095793.64]
   },
+  {
+    code:"+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs",
+    ll: [-110.8, 43.5],
+    xy: [2434515.870, 1422072.711]
+  },
   // check that coordinates at 180 and -180 deg. longitude don't wrap around
   {
     code: 'EPSG:3857',

-- 
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