diff --git a/main-dist.js b/main-dist.js index 3c2f5ec..8873465 100644 --- a/main-dist.js +++ b/main-dist.js @@ -9,8 +9,8 @@ $jscomp.polyfill("Symbol",function(a){if(a)return a;var b=function(f,g){this.$js $jscomp.polyfill("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),e=0;em;){if(p=h[m++],p!=p)return!0}else for(;r>m;m++)if((g||m in h)&&h[m]===p)return g||m||0;return!g&&-1}};b.exports={includes:a(!0),indexOf:a(!1)}},{"../internals/to-absolute-index":56,"../internals/to-indexed-object":57,"../internals/to-length":59}],16:[function(a,b,e){var c={}.toString;b.exports=function(d){return c.call(d).slice(8,-1)}},{}],17:[function(a,b,e){var c=a("../internals/has"),d=a("../internals/own-keys"), -f=a("../internals/object-get-own-property-descriptor"),g=a("../internals/object-define-property");b.exports=function(h,p){for(var m=d(p),r=g.f,k=f.f,l=0;larguments.length? -f(c[g])||f(d[g]):c[g]&&c[g][h]||d[g]&&d[g][h]}},{"../internals/global":28,"../internals/path":47}],28:[function(a,b,e){(function(c){(function(){var d=function(f){return f&&f.Math==Math&&f};b.exports=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof c&&c)||function(){return this}()||Function("return this")()}).call(this)}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window? -window:{})},{}],29:[function(a,b,e){var c=a("../internals/to-object"),d={}.hasOwnProperty;b.exports=Object.hasOwn||function(f,g){return d.call(c(f),g)}},{"../internals/to-object":60}],30:[function(a,b,e){b.exports={}},{}],31:[function(a,b,e){e=a("../internals/descriptors");var c=a("../internals/fails"),d=a("../internals/document-create-element");b.exports=!e&&!c(function(){return 7!=Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":20,"../internals/document-create-element":21, -"../internals/fails":25}],32:[function(a,b,e){e=a("../internals/fails");var c=a("../internals/classof-raw"),d="".split;b.exports=e(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return"String"==c(f)?d.call(f,""):Object(f)}:Object},{"../internals/classof-raw":16,"../internals/fails":25}],33:[function(a,b,e){a=a("../internals/shared-store");var c=Function.toString;"function"!=typeof a.inspectSource&&(a.inspectSource=function(d){return c.call(d)});b.exports=a.inspectSource},{"../internals/shared-store":52}], -34:[function(a,b,e){e=a("../internals/native-weak-map");var c=a("../internals/global"),d=a("../internals/is-object"),f=a("../internals/create-non-enumerable-property"),g=a("../internals/has"),h=a("../internals/shared-store"),p=a("../internals/shared-key");a=a("../internals/hidden-keys");c=c.WeakMap;if(e||h.state){var m=h.state||(h.state=new c),r=m.get,k=m.has,l=m.set;var v=function(n,t){if(k.call(m,n))throw new TypeError("Object already initialized");t.facade=n;l.call(m,n,t);return t};var w=function(n){return r.call(m, -n)||{}};var z=function(n){return k.call(m,n)}}else{var u=p("state");a[u]=!0;v=function(n,t){if(g(n,u))throw new TypeError("Object already initialized");t.facade=n;f(n,u,t);return t};w=function(n){return g(n,u)?n[u]:{}};z=function(n){return g(n,u)}}b.exports={set:v,get:w,has:z,enforce:function(n){return z(n)?w(n):v(n,{})},getterFor:function(n){return function(t){var q;if(!d(t)||(q=w(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return q}}}},{"../internals/create-non-enumerable-property":18, -"../internals/global":28,"../internals/has":29,"../internals/hidden-keys":30,"../internals/is-object":36,"../internals/native-weak-map":38,"../internals/shared-key":51,"../internals/shared-store":52}],35:[function(a,b,e){var c=a("../internals/fails"),d=/#|\.prototype\./;a=function(m,r){var k=g[f(m)];return k==p?!0:k==h?!1:"function"==typeof r?c(r):!!r};var f=a.normalize=function(m){return String(m).replace(d,".").toLowerCase()},g=a.data={},h=a.NATIVE="N",p=a.POLYFILL="P";b.exports=a},{"../internals/fails":25}], -36:[function(a,b,e){b.exports=function(c){return"object"===typeof c?null!==c:"function"===typeof c}},{}],37:[function(a,b,e){b.exports=!1},{}],38:[function(a,b,e){e=a("../internals/global");a=a("../internals/inspect-source");e=e.WeakMap;b.exports="function"===typeof e&&/native code/.test(a(e))},{"../internals/global":28,"../internals/inspect-source":33}],39:[function(a,b,e){b=a("../internals/descriptors");var c=a("../internals/ie8-dom-define"),d=a("../internals/an-object"),f=a("../internals/to-primitive"), -g=Object.defineProperty;e.f=b?g:function(h,p,m){d(h);p=f(p,!0);d(m);if(c)try{return g(h,p,m)}catch(r){}if("get"in m||"set"in m)throw TypeError("Accessors not supported");"value"in m&&(h[p]=m.value);return h}},{"../internals/an-object":14,"../internals/descriptors":20,"../internals/ie8-dom-define":31,"../internals/to-primitive":61}],40:[function(a,b,e){b=a("../internals/descriptors");var c=a("../internals/object-property-is-enumerable"),d=a("../internals/create-property-descriptor"),f=a("../internals/to-indexed-object"), -g=a("../internals/to-primitive"),h=a("../internals/has"),p=a("../internals/ie8-dom-define"),m=Object.getOwnPropertyDescriptor;e.f=b?m:function(r,k){r=f(r);k=g(k,!0);if(p)try{return m(r,k)}catch(l){}if(h(r,k))return d(!c.f.call(r,k),r[k])}},{"../internals/create-property-descriptor":19,"../internals/descriptors":20,"../internals/has":29,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":45,"../internals/to-indexed-object":57,"../internals/to-primitive":61}],41:[function(a, -b,e){var c=a("../internals/object-keys-internal"),d=a("../internals/enum-bug-keys").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(f){return c(f,d)}},{"../internals/enum-bug-keys":23,"../internals/object-keys-internal":43}],42:[function(a,b,e){e.f=Object.getOwnPropertySymbols},{}],43:[function(a,b,e){var c=a("../internals/has"),d=a("../internals/to-indexed-object"),f=a("../internals/array-includes").indexOf,g=a("../internals/hidden-keys");b.exports=function(h,p){var m=d(h), -r=0,k=[],l;for(l in m)!c(g,l)&&c(m,l)&&k.push(l);for(;p.length>r;)c(m,l=p[r++])&&(~f(k,l)||k.push(l));return k}},{"../internals/array-includes":15,"../internals/has":29,"../internals/hidden-keys":30,"../internals/to-indexed-object":57}],44:[function(a,b,e){var c=a("../internals/object-keys-internal"),d=a("../internals/enum-bug-keys");b.exports=Object.keys||function(f){return c(f,d)}},{"../internals/enum-bug-keys":23,"../internals/object-keys-internal":43}],45:[function(a,b,e){a={}.propertyIsEnumerable; -var c=Object.getOwnPropertyDescriptor;b=c&&!a.call({1:2},1);e.f=b?function(d){d=c(this,d);return!!d&&d.enumerable}:a},{}],46:[function(a,b,e){e=a("../internals/get-built-in");var c=a("../internals/object-get-own-property-names"),d=a("../internals/object-get-own-property-symbols"),f=a("../internals/an-object");b.exports=e("Reflect","ownKeys")||function(g){var h=c.f(f(g)),p=d.f;return p?h.concat(p(g)):h}},{"../internals/an-object":14,"../internals/get-built-in":27,"../internals/object-get-own-property-names":41, -"../internals/object-get-own-property-symbols":42}],47:[function(a,b,e){a=a("../internals/global");b.exports=a},{"../internals/global":28}],48:[function(a,b,e){var c=a("../internals/global"),d=a("../internals/create-non-enumerable-property"),f=a("../internals/has"),g=a("../internals/set-global"),h=a("../internals/inspect-source");a=a("../internals/internal-state");var p=a.get,m=a.enforce,r=String(String).split("String");(b.exports=function(k,l,v,w){var z=w?!!w.unsafe:!1,u=w?!!w.enumerable:!1;w=w? -!!w.noTargetGet:!1;if("function"==typeof v){"string"!=typeof l||f(v,"name")||d(v,"name",l);var n=m(v);n.source||(n.source=r.join("string"==typeof l?l:""))}k===c?u?k[l]=v:g(l,v):(z?!w&&k[l]&&(u=!0):delete k[l],u?k[l]=v:d(k,l,v))})(Function.prototype,"toString",function(){return"function"==typeof this&&p(this).source||h(this)})},{"../internals/create-non-enumerable-property":18,"../internals/global":28,"../internals/has":29,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":50}], -49:[function(a,b,e){b.exports=function(c){if(void 0==c)throw TypeError("Can't call method on "+c);return c}},{}],50:[function(a,b,e){var c=a("../internals/global"),d=a("../internals/create-non-enumerable-property");b.exports=function(f,g){try{d(c,f,g)}catch(h){c[f]=g}return g}},{"../internals/create-non-enumerable-property":18,"../internals/global":28}],51:[function(a,b,e){e=a("../internals/shared");var c=a("../internals/uid"),d=e("keys");b.exports=function(f){return d[f]||(d[f]=c(f))}},{"../internals/shared":53, -"../internals/uid":62}],52:[function(a,b,e){e=a("../internals/global");a=a("../internals/set-global");a=e["__core-js_shared__"]||a("__core-js_shared__",{});b.exports=a},{"../internals/global":28,"../internals/set-global":50}],53:[function(a,b,e){e=a("../internals/is-pure");var c=a("../internals/shared-store");(b.exports=function(d,f){return c[d]||(c[d]=void 0!==f?f:{})})("versions",[]).push({version:"3.15.2",mode:e?"pure":"global",copyright:"\u00a9 2021 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":37, -"../internals/shared-store":52}],54:[function(a,b,e){var c=a("../internals/fails"),d=a("../internals/whitespaces");b.exports=function(f){return c(function(){return!!d[f]()||"\u200b\u0085\u180e"!="\u200b\u0085\u180e"[f]()||d[f].name!==f})}},{"../internals/fails":25,"../internals/whitespaces":63}],55:[function(a,b,e){var c=a("../internals/require-object-coercible");a="["+a("../internals/whitespaces")+"]";var d=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$");a=function(g){return function(h){h=String(c(h));g& -1&&(h=h.replace(d,""));g&2&&(h=h.replace(f,""));return h}};b.exports={start:a(1),end:a(2),trim:a(3)}},{"../internals/require-object-coercible":49,"../internals/whitespaces":63}],56:[function(a,b,e){var c=a("../internals/to-integer"),d=Math.max,f=Math.min;b.exports=function(g,h){var p=c(g);return 0>p?d(p+h,0):f(p,h)}},{"../internals/to-integer":58}],57:[function(a,b,e){var c=a("../internals/indexed-object"),d=a("../internals/require-object-coercible");b.exports=function(f){return c(d(f))}},{"../internals/indexed-object":32, -"../internals/require-object-coercible":49}],58:[function(a,b,e){var c=Math.ceil,d=Math.floor;b.exports=function(f){return isNaN(f=+f)?0:(0l;){if(p=h[l++],p!=p)return!0}else for(;r>l;l++)if((g||l in h)&&h[l]===p)return g||l||0;return!g&&-1}};b.exports={includes:a(!0),indexOf:a(!1)}},{"../internals/to-absolute-index":56,"../internals/to-indexed-object":57,"../internals/to-length":59}],16:[function(a,b,e){var c={}.toString;b.exports=function(d){return c.call(d).slice(8,-1)}},{}],17:[function(a, +b,e){var c=a("../internals/has"),d=a("../internals/own-keys"),f=a("../internals/object-get-own-property-descriptor"),g=a("../internals/object-define-property");b.exports=function(h,p){for(var l=d(p),r=g.f,t=f.f,k=0;karguments.length?f(c[g])||f(d[g]):c[g]&&c[g][h]||d[g]&&d[g][h]}},{"../internals/global":28,"../internals/path":47}],28:[function(a,b,e){(function(c){(function(){var d=function(f){return f&&f.Math==Math&&f};b.exports=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof c&&c)||function(){return this}()||Function("return this")()}).call(this)}).call(this, +"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],29:[function(a,b,e){var c=a("../internals/to-object"),d={}.hasOwnProperty;b.exports=Object.hasOwn||function(f,g){return d.call(c(f),g)}},{"../internals/to-object":60}],30:[function(a,b,e){b.exports={}},{}],31:[function(a,b,e){e=a("../internals/descriptors");var c=a("../internals/fails"),d=a("../internals/document-create-element");b.exports=!e&&!c(function(){return 7!=Object.defineProperty(d("div"), +"a",{get:function(){return 7}}).a})},{"../internals/descriptors":20,"../internals/document-create-element":21,"../internals/fails":25}],32:[function(a,b,e){e=a("../internals/fails");var c=a("../internals/classof-raw"),d="".split;b.exports=e(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return"String"==c(f)?d.call(f,""):Object(f)}:Object},{"../internals/classof-raw":16,"../internals/fails":25}],33:[function(a,b,e){a=a("../internals/shared-store");var c=Function.toString;"function"!= +typeof a.inspectSource&&(a.inspectSource=function(d){return c.call(d)});b.exports=a.inspectSource},{"../internals/shared-store":52}],34:[function(a,b,e){e=a("../internals/native-weak-map");var c=a("../internals/global"),d=a("../internals/is-object"),f=a("../internals/create-non-enumerable-property"),g=a("../internals/has"),h=a("../internals/shared-store"),p=a("../internals/shared-key");a=a("../internals/hidden-keys");c=c.WeakMap;if(e||h.state){var l=h.state||(h.state=new c),r=l.get,t=l.has,k=l.set; +var n=function(m,q){if(t.call(l,m))throw new TypeError("Object already initialized");q.facade=m;k.call(l,m,q);return q};var v=function(m){return r.call(l,m)||{}};var z=function(m){return t.call(l,m)}}else{var x=p("state");a[x]=!0;n=function(m,q){if(g(m,x))throw new TypeError("Object already initialized");q.facade=m;f(m,x,q);return q};v=function(m){return g(m,x)?m[x]:{}};z=function(m){return g(m,x)}}b.exports={set:n,get:v,has:z,enforce:function(m){return z(m)?v(m):n(m,{})},getterFor:function(m){return function(q){var w; +if(!d(q)||(w=v(q)).type!==m)throw TypeError("Incompatible receiver, "+m+" required");return w}}}},{"../internals/create-non-enumerable-property":18,"../internals/global":28,"../internals/has":29,"../internals/hidden-keys":30,"../internals/is-object":36,"../internals/native-weak-map":38,"../internals/shared-key":51,"../internals/shared-store":52}],35:[function(a,b,e){var c=a("../internals/fails"),d=/#|\.prototype\./;a=function(l,r){var t=g[f(l)];return t==p?!0:t==h?!1:"function"==typeof r?c(r):!!r}; +var f=a.normalize=function(l){return String(l).replace(d,".").toLowerCase()},g=a.data={},h=a.NATIVE="N",p=a.POLYFILL="P";b.exports=a},{"../internals/fails":25}],36:[function(a,b,e){b.exports=function(c){return"object"===typeof c?null!==c:"function"===typeof c}},{}],37:[function(a,b,e){b.exports=!1},{}],38:[function(a,b,e){e=a("../internals/global");a=a("../internals/inspect-source");e=e.WeakMap;b.exports="function"===typeof e&&/native code/.test(a(e))},{"../internals/global":28,"../internals/inspect-source":33}], +39:[function(a,b,e){b=a("../internals/descriptors");var c=a("../internals/ie8-dom-define"),d=a("../internals/an-object"),f=a("../internals/to-primitive"),g=Object.defineProperty;e.f=b?g:function(h,p,l){d(h);p=f(p,!0);d(l);if(c)try{return g(h,p,l)}catch(r){}if("get"in l||"set"in l)throw TypeError("Accessors not supported");"value"in l&&(h[p]=l.value);return h}},{"../internals/an-object":14,"../internals/descriptors":20,"../internals/ie8-dom-define":31,"../internals/to-primitive":61}],40:[function(a, +b,e){b=a("../internals/descriptors");var c=a("../internals/object-property-is-enumerable"),d=a("../internals/create-property-descriptor"),f=a("../internals/to-indexed-object"),g=a("../internals/to-primitive"),h=a("../internals/has"),p=a("../internals/ie8-dom-define"),l=Object.getOwnPropertyDescriptor;e.f=b?l:function(r,t){r=f(r);t=g(t,!0);if(p)try{return l(r,t)}catch(k){}if(h(r,t))return d(!c.f.call(r,t),r[t])}},{"../internals/create-property-descriptor":19,"../internals/descriptors":20,"../internals/has":29, +"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":45,"../internals/to-indexed-object":57,"../internals/to-primitive":61}],41:[function(a,b,e){var c=a("../internals/object-keys-internal"),d=a("../internals/enum-bug-keys").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(f){return c(f,d)}},{"../internals/enum-bug-keys":23,"../internals/object-keys-internal":43}],42:[function(a,b,e){e.f=Object.getOwnPropertySymbols},{}],43:[function(a,b,e){var c=a("../internals/has"), +d=a("../internals/to-indexed-object"),f=a("../internals/array-includes").indexOf,g=a("../internals/hidden-keys");b.exports=function(h,p){var l=d(h),r=0,t=[],k;for(k in l)!c(g,k)&&c(l,k)&&t.push(k);for(;p.length>r;)c(l,k=p[r++])&&(~f(t,k)||t.push(k));return t}},{"../internals/array-includes":15,"../internals/has":29,"../internals/hidden-keys":30,"../internals/to-indexed-object":57}],44:[function(a,b,e){var c=a("../internals/object-keys-internal"),d=a("../internals/enum-bug-keys");b.exports=Object.keys|| +function(f){return c(f,d)}},{"../internals/enum-bug-keys":23,"../internals/object-keys-internal":43}],45:[function(a,b,e){a={}.propertyIsEnumerable;var c=Object.getOwnPropertyDescriptor;b=c&&!a.call({1:2},1);e.f=b?function(d){d=c(this,d);return!!d&&d.enumerable}:a},{}],46:[function(a,b,e){e=a("../internals/get-built-in");var c=a("../internals/object-get-own-property-names"),d=a("../internals/object-get-own-property-symbols"),f=a("../internals/an-object");b.exports=e("Reflect","ownKeys")||function(g){var h= +c.f(f(g)),p=d.f;return p?h.concat(p(g)):h}},{"../internals/an-object":14,"../internals/get-built-in":27,"../internals/object-get-own-property-names":41,"../internals/object-get-own-property-symbols":42}],47:[function(a,b,e){a=a("../internals/global");b.exports=a},{"../internals/global":28}],48:[function(a,b,e){var c=a("../internals/global"),d=a("../internals/create-non-enumerable-property"),f=a("../internals/has"),g=a("../internals/set-global"),h=a("../internals/inspect-source");a=a("../internals/internal-state"); +var p=a.get,l=a.enforce,r=String(String).split("String");(b.exports=function(t,k,n,v){var z=v?!!v.unsafe:!1,x=v?!!v.enumerable:!1;v=v?!!v.noTargetGet:!1;if("function"==typeof n){"string"!=typeof k||f(n,"name")||d(n,"name",k);var m=l(n);m.source||(m.source=r.join("string"==typeof k?k:""))}t===c?x?t[k]=n:g(k,n):(z?!v&&t[k]&&(x=!0):delete t[k],x?t[k]=n:d(t,k,n))})(Function.prototype,"toString",function(){return"function"==typeof this&&p(this).source||h(this)})},{"../internals/create-non-enumerable-property":18, +"../internals/global":28,"../internals/has":29,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":50}],49:[function(a,b,e){b.exports=function(c){if(void 0==c)throw TypeError("Can't call method on "+c);return c}},{}],50:[function(a,b,e){var c=a("../internals/global"),d=a("../internals/create-non-enumerable-property");b.exports=function(f,g){try{d(c,f,g)}catch(h){c[f]=g}return g}},{"../internals/create-non-enumerable-property":18,"../internals/global":28}],51:[function(a, +b,e){e=a("../internals/shared");var c=a("../internals/uid"),d=e("keys");b.exports=function(f){return d[f]||(d[f]=c(f))}},{"../internals/shared":53,"../internals/uid":62}],52:[function(a,b,e){e=a("../internals/global");a=a("../internals/set-global");a=e["__core-js_shared__"]||a("__core-js_shared__",{});b.exports=a},{"../internals/global":28,"../internals/set-global":50}],53:[function(a,b,e){e=a("../internals/is-pure");var c=a("../internals/shared-store");(b.exports=function(d,f){return c[d]||(c[d]= +void 0!==f?f:{})})("versions",[]).push({version:"3.15.2",mode:e?"pure":"global",copyright:"\u00a9 2021 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":37,"../internals/shared-store":52}],54:[function(a,b,e){var c=a("../internals/fails"),d=a("../internals/whitespaces");b.exports=function(f){return c(function(){return!!d[f]()||"\u200b\u0085\u180e"!="\u200b\u0085\u180e"[f]()||d[f].name!==f})}},{"../internals/fails":25,"../internals/whitespaces":63}],55:[function(a,b,e){var c=a("../internals/require-object-coercible"); +a="["+a("../internals/whitespaces")+"]";var d=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$");a=function(g){return function(h){h=String(c(h));g&1&&(h=h.replace(d,""));g&2&&(h=h.replace(f,""));return h}};b.exports={start:a(1),end:a(2),trim:a(3)}},{"../internals/require-object-coercible":49,"../internals/whitespaces":63}],56:[function(a,b,e){var c=a("../internals/to-integer"),d=Math.max,f=Math.min;b.exports=function(g,h){var p=c(g);return 0>p?d(p+h,0):f(p,h)}},{"../internals/to-integer":58}],57:[function(a, +b,e){var c=a("../internals/indexed-object"),d=a("../internals/require-object-coercible");b.exports=function(f){return c(d(f))}},{"../internals/indexed-object":32,"../internals/require-object-coercible":49}],58:[function(a,b,e){var c=Math.ceil,d=Math.floor;b.exports=function(f){return isNaN(f=+f)?0:(0 { + if (isNaN(n)) + return n; + return parseFloat(parseFloat(n).toFixed(12)); +} + /** * Geokeys. If you're working with `geotiff` library, this is result of `image.getGeoKeys()`. * @typedef {Object} module:geokeysToProj4.GeoKeys @@ -243,11 +254,8 @@ module.exports = { proj += " +pm=" + (pm * units.GeogAngularUnitsGeoKey); // To WGS key - if (geoKeys.GeogTOWGS84GeoKey) { - proj += " +towgs84="; - for (let param of geoKeys.GeogTOWGS84GeoKey) - proj += param + ","; - } + if (geoKeys.GeogTOWGS84GeoKey) + proj += " +towgs84=" + geoKeys.GeogTOWGS84GeoKey.join(); ///////////////////////// // PCS // @@ -333,7 +341,7 @@ module.exports = { proj += token; let tokenValue = tokens[token]; if (tokenValue !== null) - proj += "=" + tokenValue + proj += "=" + toFixed(tokenValue); proj += " "; processedTokens[token] = true; @@ -364,6 +372,9 @@ module.exports = { } } + x = toFixed(x); + y = toFixed(y); + return { proj4: proj, coordinatesConversionParameters: { diff --git a/package.json b/package.json index 38bc33a..b6d4aae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "geotiff-geokeys-to-proj4", - "version": "2022.05.27", + "version": "2022.05.28", "description": "A library that converts GeoTIFFs geokeys to Proj4 string", "main": "main-dist.js", "types": "types.d.ts", diff --git a/test.js b/test.js index 6423f5b..b7c1f24 100644 --- a/test.js +++ b/test.js @@ -127,7 +127,7 @@ let testKeys = [ ProjLinearUnitsGeoKey: 9001, ProjectedCSTypeGeoKey: 32767, ProjectionGeoKey: 16032, - proj4: "+proj=tmerc +lat_0=0 +lon_0=9 +k_0=0.9996 +x_0=500000 +y_0=0 +a=6378137 +b=6356752.314140356 +towgs84=0,0,0, +no_defs" + proj4: "+proj=tmerc +lat_0=0 +lon_0=9 +k_0=0.9996 +x_0=500000 +y_0=0 +a=6378137 +b=6356752.314140356 +towgs84=0,0,0 +no_defs" }, ];