!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).proj4=s()}(this,(function(){"use strict";var t=6378137,s=.0066943799901413165,i=484813681109536e-20,a=Math.PI/2,e=1e-10,h=.017453292519943295,r=57.29577951308232,n=Math.PI/4,o=2*Math.PI,l=3.14159265359,c={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},u={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},_=/[\s_\-\/\(\)]/g;function M(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),e=s.toLowerCase().replace(_,""),h=-1;++hArray.isArray(t)&&"ID"===t[0]));return s&&s.length>=3?{authority:s[1],code:parseInt(s[2],10)}:null}static convertUnit(t,s="unit"){if(!t||t.length<3)return{type:s,name:"unknown",conversion_factor:null};const i=t[1],a=parseFloat(t[2])||null,e=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:s,name:i,conversion_factor:a,id:e?{authority:e[1],code:parseInt(e[2],10)}:null}}static convertAxis(t){const s=t[1]||"Unknown";let i;const a=s.match(/^\((.)\)$/);if(a){const t=a[1].toUpperCase();if("E"===t)i="east";else if("N"===t)i="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);i="up"}}else i=t[2]?.toLowerCase()||"unknown";const e=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),h=e?parseInt(e[1],10):null,r=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:s,direction:i,unit:this.convertUnit(r),order:h}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,s)=>(t.order||0)-(s.order||0)))}static convert(t,s={}){switch(t[0]){case"PROJCRS":s.type="ProjectedCRS",s.name=t[1],s.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,s.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const i=t.find((t=>Array.isArray(t)&&"CS"===t[0]));i&&(s.coordinate_system={type:i[1],axis:this.extractAxes(t)});const a=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(a){const t=this.convertUnit(a);s.coordinate_system.unit=t}s.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":s.type="GeographicCRS",s.name=t[1];const e=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(e){const i=this.convert(e);"ENSEMBLE"===e[0]?s.datum_ensemble=i:s.datum=i;const a=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));a&&"Greenwich"!==a[1]&&(i.prime_meridian={name:a[1],longitude:parseFloat(a[2])})}s.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},s.id=this.getId(t);break;case"DATUM":s.type="GeodeticReferenceFrame",s.name=t[1],s.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":s.type="DatumEnsemble",s.name=t[1],s.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const h=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));h&&(s.accuracy=parseFloat(h[1]));const r=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));r&&(s.ellipsoid=this.convert(r)),s.id=this.getId(t);break;case"ELLIPSOID":s.type="Ellipsoid",s.name=t[1],s.semi_major_axis=parseFloat(t[2]),s.inverse_flattening=parseFloat(t[3]),t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),s);break;case"CONVERSION":s.type="Conversion",s.name=t[1],s.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,s.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":s.type="Method",s.name=t[1],s.id=this.getId(t);break;case"PARAMETER":s.type="Parameter",s.name=t[1],s.value=parseFloat(t[2]),s.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),s.id=this.getId(t);break;case"BOUNDCRS":s.type="BoundCRS";const n=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(n){const t=n.find((t=>Array.isArray(t)));s.source_crs=t?this.convert(t):null}const o=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(o){const t=o.find((t=>Array.isArray(t)));s.target_crs=t?this.convert(t):null}const l=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));s.transformation=l?this.convert(l):null;break;case"ABRIDGEDTRANSFORMATION":if(s.type="Transformation",s.name=t[1],s.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,s.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===s.parameters.length){const t=s.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}s.id=this.getId(t);break;case"AXIS":s.coordinate_system||(s.coordinate_system={type:"unspecified",axis:[]}),s.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");s.coordinate_system&&s.coordinate_system.axis&&s.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=c)})),c.conversion_factor&&1!==c.conversion_factor&&s.semi_major_axis&&(s.semi_major_axis={value:s.semi_major_axis,unit:c});break;default:s.keyword=t[0]}return s}}class g extends d{static convert(t,s={}){return super.convert(t,s),"Cartesian"===s.coordinate_system?.subtype&&delete s.coordinate_system,s.usage&&delete s.usage,s}}class m extends d{static convert(t,s={}){super.convert(t,s);const i=t.find((t=>Array.isArray(t)&&"CS"===t[0]));i&&(s.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});const a=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));return a&&(s.usage={scope:a.find((t=>Array.isArray(t)&&"SCOPE"===t[0]))?.[1],area:a.find((t=>Array.isArray(t)&&"AREA"===t[0]))?.[1],bbox:a.find((t=>Array.isArray(t)&&"BBOX"===t[0]))?.slice(1)}),s}}function p(t){const s=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0]))||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===s?m:g).convert(t)}var y=/\s/,w=/[A-Za-z]/,v=/[A-Za-z84_]/,E=/[,\]]/,x=/[\d\.E\-\+]/;function S(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function G(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,e=i.reduce((function(t,s){return P(s,t),t}),a);s&&(t[s]=e)}function P(t,s){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(s[i]={},void P(t[0],s[i])):void(s[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in s||(s[i]=[]),void s[i].push(t);var a;switch(Array.isArray(i)||(s[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return s[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&P(t[2],s[i]));case"SPHEROID":case"ELLIPSOID":return s[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&P(t[3],s[i]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void G(s,i,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],G(s,i,t),void(s[i].type=i);default:for(a=-1;++a=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},S.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(E.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},S.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},S.prototype.number=function(t){if(!x.test(t)){if(E.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},S.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},S.prototype.keyword=function(t){if(v.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=1)}if(!E.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},S.prototype.neutral=function(t){if(w.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(x.test(t))return this.word=t,void(this.state=3);if(!E.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},S.prototype.output=function(){for(;this.place0?90:-90),delete t.lat1):(t.lat0=b(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function A(t){let s={units:null,to_meter:void 0};return"string"==typeof t?(s.units=t.toLowerCase(),"metre"===s.units&&(s.units="meter"),"meter"===s.units&&(s.to_meter=1)):t?.name&&(s.units=t.name.toLowerCase(),"metre"===s.units&&(s.units="meter"),s.to_meter=t.conversion_factor),s}function I(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function C(t,s){t.ellipsoid.radius?(s.a=t.ellipsoid.radius,s.rf=0):(s.a=I(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?s.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(s.rf=s.a/(s.a-I(t.ellipsoid.semi_minor_axis))))}function k(t,s={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(k(t.source_crs,s),t.transformation&&("NTv2"===t.transformation.method?.name?s.nadgrids=t.transformation.parameters[0].value:s.datum_params=t.transformation.parameters.map((t=>t.value))),s):(Object.keys(t).forEach((i=>{const a=t[i];if(null!==a)switch(i){case"name":if(s.srsCode)break;s.name=a,s.srsCode=a;break;case"type":"GeographicCRS"===a?s.projName="longlat":"ProjectedCRS"===a&&(s.projName=t.conversion?.method?.name);break;case"datum":case"datum_ensemble":a.ellipsoid&&(s.ellps=a.ellipsoid.name,C(a,s)),a.prime_meridian&&(s.from_greenwich=a.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":s.ellps=a.name,C(a,s);break;case"prime_meridian":s.long0=(a.longitude||0)*Math.PI/180;break;case"coordinate_system":if(a.axis)if(s.axis=a.axis.map((t=>{const s=t.direction;if("east"===s)return"e";if("north"===s)return"n";if("west"===s)return"w";if("south"===s)return"s";throw new Error(`Unknown axis direction: ${s}`)})).join("")+"u",a.unit){const{units:t,to_meter:i}=A(a.unit);s.units=t,s.to_meter=i}else if(a.axis[0]?.unit){const{units:t,to_meter:i}=A(a.axis[0].unit);s.units=t,s.to_meter=i}break;case"id":a.authority&&a.code&&(s.title=a.authority+":"+a.code);break;case"conversion":a.method&&a.method.name&&(s.projName=a.method.name),a.parameters&&a.parameters.forEach((t=>{const i=t.name.toLowerCase().replace(/\s+/g,"_"),a=t.value;t.unit&&t.unit.conversion_factor?s[i]=a*t.unit.conversion_factor:"degree"===t.unit?s[i]=a*Math.PI/180:s[i]=a}));break;case"unit":a.name&&(s.units=a.name.toLowerCase(),"metre"===s.units&&(s.units="meter")),a.conversion_factor&&(s.to_meter=a.conversion_factor);break;case"base_crs":k(a,s),s.datumCode=a.id?a.id.authority+"_"+a.id.code:a.name}})),void 0!==s.latitude_of_false_origin&&(s.lat0=s.latitude_of_false_origin),void 0!==s.longitude_of_false_origin&&(s.long0=s.longitude_of_false_origin),void 0!==s.latitude_of_standard_parallel&&(s.lat0=s.latitude_of_standard_parallel,s.lat1=s.latitude_of_standard_parallel),void 0!==s.latitude_of_1st_standard_parallel&&(s.lat1=s.latitude_of_1st_standard_parallel),void 0!==s.latitude_of_2nd_standard_parallel&&(s.lat2=s.latitude_of_2nd_standard_parallel),void 0!==s.latitude_of_projection_centre&&(s.lat0=s.latitude_of_projection_centre),void 0!==s.longitude_of_projection_centre&&(s.longc=s.longitude_of_projection_centre),void 0!==s.easting_at_false_origin&&(s.x0=s.easting_at_false_origin),void 0!==s.northing_at_false_origin&&(s.y0=s.northing_at_false_origin),void 0!==s.latitude_of_natural_origin&&(s.lat0=s.latitude_of_natural_origin),void 0!==s.longitude_of_natural_origin&&(s.long0=s.longitude_of_natural_origin),void 0!==s.longitude_of_origin&&(s.long0=s.longitude_of_origin),void 0!==s.false_easting&&(s.x0=s.false_easting),s.easting_at_projection_centre&&(s.x0=s.easting_at_projection_centre),void 0!==s.false_northing&&(s.y0=s.false_northing),s.northing_at_projection_centre&&(s.y0=s.northing_at_projection_centre),void 0!==s.standard_parallel_1&&(s.lat1=s.standard_parallel_1),void 0!==s.standard_parallel_2&&(s.lat2=s.standard_parallel_2),void 0!==s.scale_factor_at_natural_origin&&(s.k0=s.scale_factor_at_natural_origin),void 0!==s.scale_factor_at_projection_centre&&(s.k0=s.scale_factor_at_projection_centre),void 0!==s.scale_factor_on_pseudo_standard_parallel&&(s.k0=s.scale_factor_on_pseudo_standard_parallel),void 0!==s.azimuth&&(s.alpha=s.azimuth),void 0!==s.azimuth_at_projection_centre&&(s.alpha=s.azimuth_at_projection_centre),s.angle_from_rectified_to_skew_grid&&(s.rectified_grid_angle=s.angle_from_rectified_to_skew_grid),N(s),s):t}var O=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function R(t){for(var s=Object.keys(t),i=0,a=s.length;i-1}}(s))return T["EPSG:3857"];var i=function(t){var s=M(t,"extension");if(s)return M(s,"proj4")}(s);return i?f(i):s}return function(t){return"+"===t[0]}(t)?f(t):void 0}function U(t,s){var i,a;if(t=t||{},!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t}function B(t,s,i){var a=t*s;return i/Math.sqrt(1-a*a)}function D(t){return t<0?-1:1}function z(t,s){return s||Math.abs(t)<=l?t:t-D(t)*o}function W(t,s,i){var e=t*i,h=.5*t;return e=Math.pow((1-e)/(1+e),h),Math.tan(.5*(a-s))/e}function H(t,s){for(var i,e,h=.5*t,r=a-2*Math.atan(s),n=0;n<=15;n++)if(i=t*Math.sin(r),r+=e=a-2*Math.atan(s*Math.pow((1-i)/(1+i),h))-r,Math.abs(e)<=1e-10)return r;return-9999}function Q(t){return t}var X=["longlat","identity"],V=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s,i,h=t.x,o=t.y;if(o*r>90&&o*r<-90&&h*r>180&&h*r<-180)return null;if(Math.abs(Math.abs(o)-a)<=e)return null;if(this.sphere)s=this.x0+this.a*this.k0*z(h-this.long0,this.over),i=this.y0+this.a*this.k0*Math.log(Math.tan(n+.5*o));else{var l=Math.sin(o),c=W(this.e,o,l);s=this.x0+this.a*this.k0*z(h-this.long0,this.over),i=this.y0-this.a*this.k0*Math.log(c)}return t.x=s,t.y=i,t},inverse:function(t){var s,i,e=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=a-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var r=Math.exp(-h/(this.a*this.k0));if(-9999===(i=H(this.e,r)))return null}return s=z(this.long0+e/(this.a*this.k0),this.over),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:Q,inverse:Q,names:X}],J={},K=[];function Z(t,s){var i=K.length;return t.names?(K[i]=t,t.names.forEach((function(t){J[t.toLowerCase()]=i})),this):(console.log(s),!0)}function Y(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}var $={start:function(){V.forEach(Z)},add:Z,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==J[s]&&K[J[s]]||(s=Y(s))in J&&K[J[s]]?K[J[s]]:void 0}},tt={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const st=tt.WGS84;var it={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var at in it){var et=it[at];et.datumName&&(it[et.datumName]=et)}var ht={};async function rt(t,s){for(var i=[],a=await s.getImageCount(),e=a-1;e>=0;e--){var h=await s.getImage(e),r=await h.readRasters(),n=[h.getWidth(),h.getHeight()],o=h.getBoundingBox().map(ot),l=[h.fileDirectory.ModelPixelScale[0],h.fileDirectory.ModelPixelScale[1]].map(ot),c=o[0]+(n[0]-1)*l[0],u=o[3]-(n[1]-1)*l[1],_=r[0],M=r[1],f=[];for(let t=n[1]-1;t>=0;t--)for(let s=n[0]-1;s>=0;s--){var d=t*n[0]+s;f.push([-lt(M[d]),lt(_[d])])}i.push({del:l,lim:n,ll:[-c,u],cvs:f})}var g={header:{nSubgrids:a},subgrids:i};return ht[t]=g,g}function nt(t){if(0===t.length)return null;var s="@"===t[0];return s&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!s,grid:null,isNull:!0}:{name:t,mandatory:!s,grid:ht[t]||null,isNull:!1}}function ot(t){return t*Math.PI/180}function lt(t){return t/3600*Math.PI/180}function ct(t,s,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(s,i)))}function ut(t){return t.map((function(t){return[lt(t.longitudeShift),lt(t.latitudeShift)]}))}function _t(t,s,i){return{name:ct(t,s+8,s+16).trim(),parent:ct(t,s+24,s+24+8).trim(),lowerLatitude:t.getFloat64(s+72,i),upperLatitude:t.getFloat64(s+88,i),lowerLongitude:t.getFloat64(s+104,i),upperLongitude:t.getFloat64(s+120,i),latitudeInterval:t.getFloat64(s+136,i),longitudeInterval:t.getFloat64(s+152,i),gridNodeCount:t.getInt32(s+168,i)}}function Mt(t,s,i,a,e){var h=s+176,r=16;!1===e&&(r=8);for(var n=[],o=0;o3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=i,o.datum_params[4]*=i,o.datum_params[5]*=i,o.datum_params[6]=o.datum_params[6]/1e6+1))),n&&(o.datum_type=3,o.grids=n),o.a=a,o.b=e,o.es=h,o.ep2=r,o}(a.datumCode,a.datum_params,d.a,d.b,g.es,g.ep2,m);U(this,a),U(this,h),this.a=d.a,this.b=d.b,this.rf=d.rf,this.sphere=d.sphere,this.es=g.es,this.e=g.e,this.ep2=g.ep2,this.datum=p,"init"in this&&"function"==typeof this.init&&this.init(),s(null,this)}else s("Could not get projection name from: "+t)}else s("Could not parse to valid json: "+t)}function dt(t,s,i){var e,h,r,n,o=t.x,l=t.y,c=t.z?t.z:0;if(l<-a&&l>-1.001*a)l=-a;else if(l>a&&l<1.001*a)l=a;else{if(l<-a)return{x:-1/0,y:-1/0,z:t.z};if(l>a)return{x:1/0,y:1/0,z:t.z}}return o>Math.PI&&(o-=2*Math.PI),h=Math.sin(l),n=Math.cos(l),r=h*h,{x:((e=i/Math.sqrt(1-s*r))+c)*n*Math.cos(o),y:(e+c)*n*Math.sin(o),z:(e*(1-s)+c)*h}}function gt(t,s,i,a){var e,h,r,n,o,l,c,u,_,M,f,d,g,m,p,y=1e-12,w=t.x,v=t.y,E=t.z?t.z:0;if(e=Math.sqrt(w*w+v*v),h=Math.sqrt(w*w+v*v+E*E),e/i1e-24&&g<30);return{x:m,y:Math.atan(f/Math.abs(M)),z:p}}function mt(t){return 1===t||2===t}function pt(i,a,e){if(function(t,s){return t.datum_type===s.datum_type&&!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:2!==t.datum_type||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6])}(i,a))return e;if(5===i.datum_type||5===a.datum_type)return e;var h=i.a,r=i.es;if(3===i.datum_type){if(0!==yt(i,!1,e))return;h=t,r=s}var n=a.a,o=a.b,l=a.es;if(3===a.datum_type&&(n=t,o=6356752.314,l=s),r===l&&h===n&&!mt(i.datum_type)&&!mt(a.datum_type))return e;if((e=dt(e,r,h),mt(i.datum_type)&&(e=function(t,s,i){if(1===s)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===s){var a=i[0],e=i[1],h=i[2],r=i[3],n=i[4],o=i[5],l=i[6];return{x:l*(t.x-o*t.y+n*t.z)+a,y:l*(o*t.x+t.y-r*t.z)+e,z:l*(-n*t.x+r*t.y+t.z)+h}}}(e,i.datum_type,i.datum_params)),mt(a.datum_type)&&(e=function(t,s,i){if(1===s)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===s){var a=i[0],e=i[1],h=i[2],r=i[3],n=i[4],o=i[5],l=i[6],c=(t.x-a)/l,u=(t.y-e)/l,_=(t.z-h)/l;return{x:c+o*u-n*_,y:-o*c+u+r*_,z:n*c-r*u+_}}}(e,a.datum_type,a.datum_params)),e=gt(e,l,n,o),3===a.datum_type)&&0!==yt(a,!0,e))return;return e}function yt(t,s,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var a={x:-i.x,y:i.y},e={x:Number.NaN,y:Number.NaN},h=[];t:for(var n=0;na.y||f>a.x||m1e-12&&Math.abs(r.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),a;a.x=z(h.x+i.ll[0]),a.y=h.y+i.ll[1]}else isNaN(h.x)||(a.x=t.x+h.x,a.y=t.y+h.y);return a}function vt(t,s){var i,a={x:t.x/s.del[0],y:t.y/s.del[1]},e=Math.floor(a.x),h=Math.floor(a.y),r=a.x-1*e,n=a.y-1*h,o={x:Number.NaN,y:Number.NaN};if(e<0||e>=s.lim[0])return o;if(h<0||h>=s.lim[1])return o;i=h*s.lim[0]+e;var l=s.cvs[i][0],c=s.cvs[i][1];i++;var u=s.cvs[i][0],_=s.cvs[i][1];i+=s.lim[0];var M=s.cvs[i][0],f=s.cvs[i][1];i--;var d=s.cvs[i][0],g=s.cvs[i][1],m=r*n,p=r*(1-n),y=(1-r)*(1-n),w=(1-r)*n;return o.x=y*l+p*u+w*d+m*M,o.y=y*c+p*_+w*g+m*f,o}function Et(t,s,i){var a,e,h,r=i.x,n=i.y,o=i.z||0,l={};for(h=0;h<3;h++)if(!s||2!==h||void 0!==i.z)switch(0===h?(a=r,e=-1!=="ew".indexOf(t.axis[h])?"x":"y"):1===h?(a=n,e=-1!=="ns".indexOf(t.axis[h])?"y":"x"):(a=o,e="z"),t.axis[h]){case"e":case"n":l[e]=a;break;case"w":case"s":l[e]=-a;break;case"u":void 0!==i[e]&&(l.z=a);break;case"d":void 0!==i[e]&&(l.z=-a);break;default:return null}return l}function xt(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s}function St(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Gt(t,s,i,a){var e,n=void 0!==(i=Array.isArray(i)?xt(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){St(t.x),St(t.y)}(i),t.datum&&s.datum&&function(t,s){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==s.datumCode||(1===s.datum.datum_type||2===s.datum.datum_type||3===s.datum.datum_type)&&"WGS84"!==t.datumCode}(t,s)&&(i=Gt(t,e=new ft("WGS84"),i,a),t=e),a&&"enu"!==t.axis&&(i=Et(t,!1,i)),"longlat"===t.projName)i={x:i.x*h,y:i.y*h,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=pt(t.datum,s.datum,i))return s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y,z:i.z||0}),"longlat"===s.projName?i={x:i.x*r,y:i.y*r,z:i.z||0}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter,z:i.z||0})),a&&"enu"!==s.axis?Et(s,!0,i):(i&&!n&&delete i.z,i)}ft.projections=$,ft.projections.start();var Pt=ft("WGS84");function bt(t,s,i,a){var e,h,r;return Array.isArray(i)?(e=Gt(t,s,i,a)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name?"number"==typeof e.z?[e.x,e.y,e.z].concat(i.slice(3)):[e.x,e.y,i[2]].concat(i.slice(3)):[e.x,e.y].concat(i.slice(2)):[e.x,e.y]):(h=Gt(t,s,i,a),2===(r=Object.keys(i)).length||r.forEach((function(a){if(void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name){if("x"===a||"y"===a||"z"===a)return}else if("x"===a||"y"===a)return;h[a]=i[a]})),h)}function Nt(t){return t instanceof ft?t:"object"==typeof t&&"oProj"in t?t.oProj:ft(t)}var At="AJSAJS",It="AFAFAF",Ct=65,kt=73,Ot=79,Rt=86,jt=90,qt={forward:Tt,inverse:function(t){var s=Bt(Wt(t.toUpperCase()));if(s.lat&&s.lon)return[s.lon,s.lat,s.lon,s.lat];return[s.left,s.bottom,s.right,s.top]},toPoint:Lt};function Tt(t,s){return s=s||5,function(t,s){var i="00000"+t.easting,a="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(M=t.easting,f=t.northing,d=t.zoneNumber,g=zt(d),m=Math.floor(M/1e5),p=Math.floor(f/1e5)%20,e=m,h=p,r=g,n=r-1,o=At.charCodeAt(n),l=It.charCodeAt(n),c=o+e-1,u=l+h,_=!1,c>jt&&(c=c-jt+Ct-1,_=!0),(c===kt||okt||(c>kt||oOt||(c>Ot||ojt&&(c=c-jt+Ct-1),u>Rt?(u=u-Rt+Ct-1,_=!0):_=!1,(u===kt||lkt||(u>kt||lOt||(u>Ot||lRt&&(u=u-Rt+Ct-1),String.fromCharCode(c)+String.fromCharCode(u))+i.substr(i.length-5,s)+a.substr(a.length-5,s);var e,h,r,n,o,l,c,u,_;var M,f,d,g,m,p}(function(t){var s,i,a,e,h,r,n,o,l=t.lat,c=t.lon,u=6378137,_=.00669438,M=.9996,f=Ft(l),d=Ft(c);o=Math.floor((c+180)/6)+1,180===c&&(o=60);l>=56&&l<64&&c>=3&&c<12&&(o=32);l>=72&&l<84&&(c>=0&&c<9?o=31:c>=9&&c<21?o=33:c>=21&&c<33?o=35:c>=33&&c<42&&(o=37));n=Ft(6*(o-1)-180+3),s=_/(1-_),i=u/Math.sqrt(1-_*Math.sin(f)*Math.sin(f)),a=Math.tan(f)*Math.tan(f),e=s*Math.cos(f)*Math.cos(f),h=Math.cos(f)*(d-n),r=u*((1-_/4-3*_*_/64-5*_*_*_/256)*f-(3*_/8+3*_*_/32+45*_*_*_/1024)*Math.sin(2*f)+(15*_*_/256+45*_*_*_/1024)*Math.sin(4*f)-35*_*_*_/3072*Math.sin(6*f));var g=M*i*(h+(1-a+e)*h*h*h/6+(5-18*a+a*a+72*e-58*s)*h*h*h*h*h/120)+5e5,m=M*(r+i*Math.tan(f)*(h*h/2+(5-a+9*e+4*e*e)*h*h*h*h/24+(61-58*a+a*a+600*e-330*s)*h*h*h*h*h*h/720));l<0&&(m+=1e7);return{northing:Math.round(m),easting:Math.round(g),zoneNumber:o,zoneLetter:Dt(l)}}({lat:t[1],lon:t[0]}),s)}function Lt(t){var s=Bt(Wt(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function Ft(t){return t*(Math.PI/180)}function Ut(t){return t/Math.PI*180}function Bt(t){var s=t.northing,i=t.easting,a=t.zoneLetter,e=t.zoneNumber;if(e<0||e>60)return null;var h,r,n,o,l,c,u,_,M,f=.9996,d=6378137,g=.00669438,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),p=i-5e5,y=s;a<"N"&&(y-=1e7),u=6*(e-1)-180+3,h=.006739496752268451,M=(_=y/f/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*_)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*_)+151*m*m*m/96*Math.sin(6*_),r=d/Math.sqrt(1-g*Math.sin(M)*Math.sin(M)),n=Math.tan(M)*Math.tan(M),o=h*Math.cos(M)*Math.cos(M),l=.99330562*d/Math.pow(1-g*Math.sin(M)*Math.sin(M),1.5),c=p/(r*f);var w=M-r*Math.tan(M)/l*(c*c/2-(5+3*n+10*o-4*o*o-9*h)*c*c*c*c/24+(61+90*n+298*o+45*n*n-1.6983531815716497-3*o*o)*c*c*c*c*c*c/720);w=Ut(w);var v,E=(c-(1+2*n+o)*c*c*c/6+(5-2*o+28*n-3*o*o+8*h+24*n*n)*c*c*c*c*c/120)/Math.cos(M);if(E=u+Ut(E),t.accuracy){var x=Bt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:x.lat,right:x.lon,bottom:w,left:E}}else v={lat:w,lon:E};return v}function Dt(t){var s="Z";return 84>=t&&t>=72?s="X":72>t&&t>=64?s="W":64>t&&t>=56?s="V":56>t&&t>=48?s="U":48>t&&t>=40?s="T":40>t&&t>=32?s="S":32>t&&t>=24?s="R":24>t&&t>=16?s="Q":16>t&&t>=8?s="P":8>t&&t>=0?s="N":0>t&&t>=-8?s="M":-8>t&&t>=-16?s="L":-16>t&&t>=-24?s="K":-24>t&&t>=-32?s="J":-32>t&&t>=-40?s="H":-40>t&&t>=-48?s="G":-48>t&&t>=-56?s="F":-56>t&&t>=-64?s="E":-64>t&&t>=-72?s="D":-72>t&&t>=-80&&(s="C"),s}function zt(t){var s=t%6;return 0===s&&(s=6),s}function Wt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,e="",h=0;!/[A-Z]/.test(s=t.charAt(h));){if(h>=2)throw"MGRSPoint bad conversion from: "+t;e+=s,h++}var r=parseInt(e,10);if(0===h||h+3>i)throw"MGRSPoint bad conversion from: "+t;var n=t.charAt(h++);if(n<="A"||"B"===n||"Y"===n||n>="Z"||"I"===n||"O"===n)throw"MGRSPoint zone letter "+n+" not handled: "+t;a=t.substring(h,h+=2);for(var o=zt(r),l=function(t,s){var i=At.charCodeAt(s-1),a=1e5,e=!1;for(;i!==t.charCodeAt(0);){if(++i===kt&&i++,i===Ot&&i++,i>jt){if(e)throw"Bad character: "+t;i=Ct,e=!0}a+=1e5}return a}(a.charAt(0),o),c=function(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var i=It.charCodeAt(s-1),a=0,e=!1;for(;i!==t.charCodeAt(0);){if(++i===kt&&i++,i===Ot&&i++,i>Rt){if(e)throw"Bad character: "+t;i=Ct,e=!0}a+=1e5}return a}(a.charAt(1),o);c0&&(_=1e5/Math.pow(10,d),M=t.substring(h,h+d),g=parseFloat(M)*_,f=t.substring(h+d),m=parseFloat(f)*_),{easting:g+l,northing:m+c,zoneLetter:n,zoneNumber:r,accuracy:_}}function Ht(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function Qt(t,s,i){if(!(this instanceof Qt))return new Qt(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0]),this.y=parseFloat(a[1]),this.z=parseFloat(a[2])||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Qt.fromMGRS=function(t){return new Qt(Lt(t))},Qt.prototype.toMGRS=function(t){return Tt([this.x,this.y],t)};var Xt=.046875,Vt=.01953125,Jt=.01068115234375;function Kt(t){var s=[];s[0]=1-t*(.25+t*(Xt+t*(Vt+t*Jt))),s[1]=t*(.75-t*(Xt+t*(Vt+t*Jt)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s}function Zt(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))}function Yt(t,s,i){for(var a=1/(1-s),h=t,r=20;r;--r){var n=Math.sin(h),o=1-s*n*n;if(h-=o=(Zt(h,n,Math.cos(h),i)-t)*(o*Math.sqrt(o))*a,Math.abs(o)e?Math.tan(r):0,d=Math.pow(f,2),g=Math.pow(d,2);s=1-this.es*Math.pow(o,2),c/=Math.sqrt(s);var m=Zt(r,o,l,this.en);i=this.a*(this.k0*c*(1+u/6*(1-d+_+u/20*(5-18*d+g+14*_-58*d*_+u/42*(61+179*g-g*d-479*d)))))+this.x0,a=this.a*(this.k0*(m-this.ml0+o*n*c/2*(1+u/12*(5-d+9*_+4*M+u/30*(61+g-58*d+270*_-330*d*_+u/56*(1385+543*g-g*d-3111*d))))))+this.y0}else{var p=l*Math.sin(n);if(Math.abs(Math.abs(p)-1)=1){if(p-1>e)return 93;a=0}else a=Math.acos(a);r<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,h,r,n=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(i=Yt(s=this.ml0+o/this.k0,this.es,this.en),Math.abs(i)e?Math.tan(i):0,_=this.ep2*Math.pow(c,2),M=Math.pow(_,2),f=Math.pow(u,2),d=Math.pow(f,2);s=1-this.es*Math.pow(l,2);var g=n*Math.sqrt(s)/this.k0,m=Math.pow(g,2);h=i-(s*=u)*m/(1-this.es)*.5*(1-m/12*(5+3*f-9*_*f+_-4*M-m/30*(61+90*f-252*_*f+45*d+46*_-m/56*(1385+3633*f+4095*d+1574*d*f)))),r=z(this.long0+g*(1-m/6*(1+2*f+_-m/20*(5+28*f+24*d+8*_*f+6*_-m/42*(61+662*f+1320*d+720*d*f))))/c,this.over)}else h=a*D(o),r=0;else{var p=Math.exp(n/this.k0),y=.5*(p-1/p),w=this.lat0+o/this.k0,v=Math.cos(w);s=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(y,2))),h=Math.asin(s),o<0&&(h=-h),r=0===y&&0===v?0:z(Math.atan2(y,v)+this.long0,this.over)}return t.x=r,t.y=h,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function ts(t){var s=Math.exp(t);return s=(s-1/s)/2}function ss(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))}function is(t){var s=Math.abs(t);return s=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i}(s*(1+s/(ss(1,s)+1))),t<0?-s:s}function as(t,s){for(var i,a=2*Math.cos(2*s),e=t.length-1,h=t[e],r=0;--e>=0;)i=a*h-r+t[e],r=h,h=i;return s+i*Math.sin(2*s)}function es(t,s,i){for(var a,e,h=Math.sin(s),r=Math.cos(s),n=ts(i),o=function(t){var s=Math.exp(t);return(s+1/s)/2}(i),l=2*r*o,c=-2*h*n,u=t.length-1,_=t[u],M=0,f=0,d=0;--u>=0;)a=f,e=M,_=l*(f=_)-a-c*(M=d)+t[u],d=c*f-e+l*M;return[(l=h*o)*_-(c=r*n)*d,l*d+c*_]}var hs={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&($t.init.apply(this),this.forward=$t.forward,this.inverse=$t.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var a=as(this.cbg,this.lat0);this.Zb=-this.Qn*(a+function(t,s){for(var i,a=2*Math.cos(s),e=t.length-1,h=t[e],r=0;--e>=0;)i=a*h-r+t[e],r=h,h=i;return Math.sin(s)*i}(this.gtu,2*a))},forward:function(t){var s=z(t.x-this.long0,this.over),i=t.y;i=as(this.cbg,i);var a=Math.sin(i),e=Math.cos(i),h=Math.sin(s),r=Math.cos(s);i=Math.atan2(a,r*e),s=Math.atan2(h*e,ss(a,e*r)),s=is(Math.tan(s));var n,o,l=es(this.gtu,2*i,2*s);return i+=l[0],s+=l[1],Math.abs(s)<=2.623395162778?(n=this.a*(this.Qn*s)+this.x0,o=this.a*(this.Qn*i+this.Zb)+this.y0):(n=1/0,o=1/0),t.x=n,t.y=o,t},inverse:function(t){var s,i,a=(t.x-this.x0)*(1/this.a),e=(t.y-this.y0)*(1/this.a);if(e=(e-this.Zb)/this.Qn,a/=this.Qn,Math.abs(a)<=2.623395162778){var h=es(this.utg,2*e,2*a);e+=h[0],a+=h[1],a=Math.atan(ts(a));var r=Math.sin(e),n=Math.cos(e),o=Math.sin(a),l=Math.cos(a);e=Math.atan2(r*l,ss(o,l*n)),s=z((a=Math.atan2(o,l*n))+this.long0,this.over),i=as(this.cgb,e)}else s=1/0,i=1/0;return t.x=s,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};var rs={init:function(){var t=function(t,s){if(void 0===t){if((t=Math.floor(30*(z(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*h,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,hs.init.apply(this),this.forward=hs.forward,this.inverse=hs.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function ns(t,s){return Math.pow((1-t)/(1+t),s)}var os={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+n)/(Math.pow(Math.tan(.5*this.lat0+n),this.C)*ns(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+n),this.C)*ns(this.e*Math.sin(i),this.ratexp))-a,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,e=Math.pow(Math.tan(.5*i+n)/this.K,1/this.C),h=20;h>0&&(i=2*Math.atan(e*ns(this.e*Math.sin(t.y),-.5*this.e))-a,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null}};var ls={init:function(){os.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,e;return t.x=z(t.x-this.long0,this.over),os.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),e=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=e*i*Math.sin(t.x),t.y=e*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,e,h;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,h=ss(t.x,t.y)){var r=2*Math.atan2(h,this.R2);s=Math.sin(r),i=Math.cos(r),e=Math.asin(i*this.sinc0+t.y*s*this.cosc0/h),a=Math.atan2(t.x*s,h*this.cosc0*i-t.y*this.sinc0*s)}else e=this.phic0,a=0;return t.x=a,t.y=e,os.inverse.apply(this,[t]),t.x=z(t.x+this.long0,this.over),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function cs(t,s,i){return s*=i,Math.tan(.5*(a+t))*Math.pow((1-s)/(1+s),.5*i)}var us={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=e&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=e&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=e&&Math.abs(Math.cos(this.lat_ts))>e&&(this.k0=.5*this.cons*B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/W(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=B(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(cs(this.lat0,this.sinlat0,this.e))-a,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,h,r,n,o,l=t.x,c=t.y,u=Math.sin(c),_=Math.cos(c),M=z(l-this.long0,this.over);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=e&&Math.abs(c+this.lat0)<=e?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*u+this.coslat0*_*Math.cos(M)),t.x=this.a*s*_*Math.sin(M)+this.x0,t.y=this.a*s*(this.coslat0*u-this.sinlat0*_*Math.cos(M))+this.y0,t):(i=2*Math.atan(cs(c,u,this.e))-a,r=Math.cos(i),h=Math.sin(i),Math.abs(this.coslat0)<=e?(n=W(this.e,c*this.con,this.con*u),o=2*this.a*this.k0*n/this.cons,t.x=this.x0+o*Math.sin(l-this.long0),t.y=this.y0-this.con*o*Math.cos(l-this.long0),t):(Math.abs(this.sinlat0)0?z(this.long0+Math.atan2(t.x,-1*t.y),this.over):z(this.long0+Math.atan2(t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*Math.sin(l),o*this.coslat0*Math.cos(l)-t.y*this.sinlat0*Math.sin(l)),this.over),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=e){if(o<=e)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,h=o*this.cons/(2*this.a*this.k0),i=this.con*H(this.e,h),s=this.con*z(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,o<=e?n=this.X0:(n=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/o),s=z(this.long0+Math.atan2(t.x*Math.sin(r),o*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)),this.over)),i=-1*H(this.e,Math.tan(.5*(a+n)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:cs};var _s={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,e=2*a-Math.pow(a,2),h=this.e=Math.sqrt(e);this.R=this.k0*i*Math.sqrt(1-e)/(1-e*Math.pow(s,2)),this.alpha=Math.sqrt(1+e/(1-e)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var r=Math.log(Math.tan(Math.PI/4+this.b0/2)),n=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+h*s)/(1-h*s));this.K=r-this.alpha*n+this.alpha*h/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,e=2*(Math.atan(Math.exp(a))-Math.PI/4),h=this.alpha*(t.x-this.lambda0),r=Math.atan(Math.sin(h)/(Math.sin(this.b0)*Math.tan(e)+Math.cos(this.b0)*Math.cos(h))),n=Math.asin(Math.cos(this.b0)*Math.sin(e)-Math.sin(this.b0)*Math.cos(e)*Math.cos(h));return t.y=this.R/2*Math.log((1+Math.sin(n))/(1-Math.sin(n)))+this.y0,t.x=this.R*r+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,e=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(e)+Math.sin(this.b0)*Math.cos(e)*Math.cos(a)),r=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(e))),n=this.lambda0+r/this.alpha,o=0,l=h,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=n,t.y=l,t},names:["somerc"]},Ms=1e-7;var fs={init:function(){var t,s,i,h,r,l,c,u,_,M,f,d,g,m,p=0,y=0,w=0,v=0,E=0,x=0,S=0;this.no_off=(g=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],m="object"==typeof(d=this).projName?Object.keys(d.projName)[0]:d.projName,"no_uoff"in d||"no_off"in d||-1!==g.indexOf(m)||-1!==g.indexOf(Y(m))),this.no_rot="no_rot"in this;var G=!1;"alpha"in this&&(G=!0);var P=!1;if("rectified_grid_angle"in this&&(P=!0),G&&(S=this.alpha),P&&(p=this.rectified_grid_angle),G||P)y=this.longc;else if(w=this.long1,E=this.lat1,v=this.long2,x=this.lat2,Math.abs(E-x)<=Ms||(t=Math.abs(E))<=Ms||Math.abs(t-a)<=Ms||Math.abs(Math.abs(this.lat0)-a)<=Ms||Math.abs(Math.abs(x)-a)<=Ms)throw new Error;var b=1-this.es;s=Math.sqrt(b),Math.abs(this.lat0)>e?(u=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*u*u,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/b),this.A=this.B*this.k0*s/t,(r=(h=this.B*s/(i*Math.sqrt(t)))*h-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=h,this.E*=Math.pow(W(this.e,this.lat0,u),this.B)):(this.B=1/s,this.A=this.k0,this.E=h=r=1),G||P?(G?(f=Math.asin(Math.sin(S)/h),P||(p=S)):(f=p,S=Math.asin(h*Math.sin(f))),this.lam0=y-Math.asin(.5*(r-1/r)*Math.tan(f))/this.B):(l=Math.pow(W(this.e,E,Math.sin(E)),this.B),c=Math.pow(W(this.e,x,Math.sin(x)),this.B),r=this.E/l,_=(c-l)/(c+l),M=((M=this.E*this.E)-c*l)/(M+c*l),(t=w-v)<-Math.PI?v-=o:t>Math.PI&&(v+=o),this.lam0=z(.5*(w+v)-Math.atan(M*Math.tan(.5*this.B*(w-v))/_)/this.B,this.over),f=Math.atan(2*Math.sin(this.B*z(w-this.lam0,this.over))/(r-1/r)),p=S=Math.asin(h*Math.sin(f))),this.singam=Math.sin(f),this.cosgam=Math.cos(f),this.sinrot=Math.sin(p),this.cosrot=Math.cos(p),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(h*h-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*f,this.v_pole_n=this.ArB*Math.log(Math.tan(n-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(n+r))},forward:function(t){var s,i,h,r,n,o,l,c,u={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-a)>e){if(s=.5*((n=this.E/Math.pow(W(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/n)),i=.5*(n+o),r=Math.sin(this.B*t.x),h=(s*this.singam-r*this.cosgam)/i,Math.abs(Math.abs(h)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*t.y;return this.no_rot?(u.x=l,u.y=c):(l-=this.u_0,u.x=c*this.cosrot+l*this.sinrot,u.y=l*this.cosrot-c*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(t){var s,i,h,r,n,o,l,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,s=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,s=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((h=Math.exp(-this.BrA*i))-1/h),n=.5*(h+1/h),l=((o=Math.sin(this.BrA*s))*this.cosgam+r*this.singam)/n,Math.abs(Math.abs(l)-1)e?this.ns=Math.log(h/l)/Math.log(r/c):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=h/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=e&&(i=D(i)*(a-2e-10));var h,r,n=Math.abs(Math.abs(i)-a);if(n>e)h=W(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(h,this.ns);else{if((n=i*this.ns)<=0)return null;r=0}var o=this.ns*z(s-this.long0,this.over);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var s,i,e,h,r,n=(t.x-this.x0)/this.k0,o=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+o*o),i=1):(s=-Math.sqrt(n*n+o*o),i=-1);var l=0;if(0!==s&&(l=Math.atan2(i*n,i*o)),0!==s||this.ns>0){if(i=1/this.ns,e=Math.pow(s/(this.a*this.f0),i),-9999===(h=H(this.e,e)))return null}else h=-a;return r=z(l/this.ns+this.long0,this.over),t.x=r,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var gs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,e,h,r,n,o=t.x,l=t.y,c=z(o-this.long0,this.over);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-c*this.alfa,e=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),h=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(e)),r=this.n*h,n=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(e/2+this.s45),this.n),t.y=n*Math.cos(r)/1,t.x=n*Math.sin(r)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,e,h,r,n,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),h=Math.sqrt(t.x*t.x+t.y*t.y),e=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/h,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(e)),i=Math.asin(Math.cos(a)*Math.sin(e)/Math.cos(s)),t.x=this.long0-i/this.alfa,r=s,n=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(r))/(1-this.e*Math.sin(r)),this.e/2))-this.s45),Math.abs(r-t.y)<1e-10&&(n=1),r=t.y,l+=1}while(0===n&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function ms(t,s,i,a,e){return t*e-s*Math.sin(2*e)+i*Math.sin(4*e)-a*Math.sin(6*e)}function ps(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ys(t){return.375*t*(1+.25*t*(1+.46875*t))}function ws(t){return.05859375*t*t*(1+.75*t)}function vs(t){return t*t*t*(35/3072)}function Es(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)}function xs(t){return Math.abs(t)1e-7?(1-t*t)*(s/(1-(i=t*s)*i)-.5/t*Math.log((1-i)/(1+i))):2*s}var bs=.3333333333333333,Ns=.17222222222222222,As=.10257936507936508,Is=.06388888888888888,Cs=.0664021164021164,ks=.016415012942191543;var Os={init:function(){var t,s=Math.abs(this.lat0);if(Math.abs(s-a)0)switch(this.qp=Ps(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var s,i=[];return i[0]=t*bs,s=t*t,i[0]+=s*Ns,i[1]=s*Is,s*=t,i[0]+=s*As,i[1]+=s*Cs,i[2]=s*ks,i}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Ps(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,h,r,o,l,c,u,_,M,f=t.x,d=t.y;if(f=z(f-this.long0,this.over),this.sphere){if(o=Math.sin(d),M=Math.cos(d),h=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+M*h:1+this.sinph0*o+this.cosph0*M*h)<=e)return null;s=(i=Math.sqrt(2/i))*M*Math.sin(f),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*M*h}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(h=-h),Math.abs(d+this.lat0)=0?(s=(_=Math.sqrt(l))*r,i=h*(this.mode===this.S_POLE?_:-_)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,h,r,n,o,l,c,u,_,M=t.x/this.a,f=t.y/this.a;if(this.sphere){var d,g=0,m=0;if((i=.5*(d=Math.sqrt(M*M+f*f)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(i),g=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(d)<=e?0:Math.asin(f*m/d),M*=m,f=g*d;break;case this.OBLIQ:i=Math.abs(d)<=e?this.lat0:Math.asin(g*this.sinph0+f*m*this.cosph0/d),M*=m*this.cosph0,f=(g-Math.sin(i)*this.sinph0)*d;break;case this.N_POLE:f=-f,i=a-i;break;case this.S_POLE:i-=a}s=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(M,f):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(M/=this.dd,f*=this.dd,(o=Math.sqrt(M*M+f*f))1&&(t=t>1?1:-1),Math.asin(t)}var js={init:function(){Math.abs(this.lat1+this.lat2)e?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=Ps(this.e3,this.sin_phi),e=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,h=this.ns0*z(s-this.long0,this.over),r=e*Math.sin(h)+this.x0,n=this.rh-e*Math.cos(h)+this.y0;return t.x=r,t.y=n,t},inverse:function(t){var s,i,a,e,h,r;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),e=0,0!==s&&(e=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?r=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,r=this.phi1z(this.e3,i)),h=z(e/this.ns0+this.long0,this.over),t.x=h,t.y=r,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,r,n=Rs(.5*s);if(t0||Math.abs(r)<=e?(n=this.x0+1*this.a*i*Math.sin(a)/r,o=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/r):(n=this.x0+this.infinity_dist*i*Math.sin(a),o=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=o,t},inverse:function(t){var s,i,a,e,h,r;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(e=Math.atan2(s,this.rc),i=Math.sin(e),r=Rs((a=Math.cos(e))*this.sin_p14+t.y*i*this.cos_p14/s),h=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),h=z(this.long0+h,this.over)):(r=this.phic0,h=0),t.x=h,t.y=r,t},names:["gnom"]};var Ts={init:function(){this.sphere||(this.k0=B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,e=t.y,h=z(a-this.long0,this.over);if(this.sphere)s=this.x0+this.a*h*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var r=Ps(this.e,Math.sin(e));s=this.x0+this.a*this.k0*h,i=this.y0+this.a*r*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){var s,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(s=z(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*a:a;for(var e,h,r,n,o=Math.asin(.5*s),l=0;l<30;l++)if(h=Math.sin(o),r=Math.cos(o),n=t*h,o+=e=Math.pow(1-n*n,2)/(2*r)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),Math.abs(e)<=1e-10)return o;return NaN}(this.e,2*t.y*this.k0/this.a),s=z(this.long0+t.x/(this.a*this.k0),this.over)),t.x=s,t.y=i,t},names:["cea"]};var Ls={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=z(s-this.long0,this.over),e=xs(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*e,t},inverse:function(t){var s=t.x,i=t.y;return t.x=z(this.long0+(s-this.x0)/(this.a*this.rc),this.over),t.y=xs(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};var Fs={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ps(this.es),this.e1=ys(this.es),this.e2=ws(this.es),this.e3=vs(this.es),this.ml0=this.a*ms(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,r=t.y,n=z(h-this.long0,this.over);if(a=n*Math.sin(r),this.sphere)Math.abs(r)<=e?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(r),i=this.a*(xs(r-this.lat0)+(1-Math.cos(a))/Math.tan(r)));else if(Math.abs(r)<=e)s=this.a*n,i=-1*this.ml0;else{var o=Es(this.a,this.e,Math.sin(r))/Math.tan(r);s=o*Math.sin(a),i=this.a*ms(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+o*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,r,n,o,l,c;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=e)s=z(a/this.a+this.long0,this.over),i=0;else{var u;for(n=this.lat0+h/this.a,o=a*a/this.a/this.a+n*n,l=n,r=20;r;--r)if(l+=c=-1*(n*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-n)/u-1),Math.abs(c)<=e){i=l;break}s=z(this.long0+Math.asin(a*Math.tan(l)/this.a)/Math.sin(i),this.over)}else if(Math.abs(h+this.ml0)<=e)i=0,s=z(this.long0+a/this.a,this.over);else{var _,M,f,d,g;for(n=(this.ml0+h)/this.a,o=a*a/this.a/this.a+n*n,l=n,r=20;r;--r)if(g=this.e*Math.sin(l),_=Math.sqrt(1-g*g)*Math.tan(l),M=this.a*ms(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(n*(_*(d=M/this.a)+1)-d-.5*_*(d*d+o))/(this.es*Math.sin(2*l)*(d*d+o-2*n*d)/(4*_)+(n-d)*(_*f-2/Math.sin(2*l))-f),Math.abs(c)<=e){i=l;break}_=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=z(this.long0+Math.asin(a*_/this.a)/Math.sin(i),this.over)}return t.x=s,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]};var Us={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,a=t.x,e=t.y-this.lat0,h=a-this.long0,r=e/i*1e-5,n=h,o=1,l=0;for(s=1;s<=10;s++)o*=r,l+=this.A[s]*o;var c,u=l,_=n,M=1,f=0,d=0,g=0;for(s=1;s<=6;s++)c=f*u+M*_,M=M*u-f*_,f=c,d=d+this.B_re[s]*M-this.B_im[s]*f,g=g+this.B_im[s]*M+this.B_re[s]*f;return t.x=g*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var s,a,e=t.x,h=t.y,r=e-this.x0,n=(h-this.y0)/this.a,o=r/this.a,l=1,c=0,u=0,_=0;for(s=1;s<=6;s++)a=c*n+l*o,l=l*n-c*o,c=a,u=u+this.C_re[s]*l-this.C_im[s]*c,_=_+this.C_im[s]*l+this.C_re[s]*c;for(var M=0;M.999999999999&&(i=.999999999999),s=Math.asin(i);var a=z(this.long0+t.x/(.900316316158*this.a*Math.cos(s)),this.over);a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var e=Math.asin(i);return t.x=a,t.y=e,t},names:["Mollweide","moll"]};var Ws={init:function(){Math.abs(this.lat1+this.lat2)=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var h=0;return 0!==i&&(h=Math.atan2(s*t.x,s*t.y)),this.sphere?(e=z(this.long0+h/this.ns,this.over),a=xs(this.g-i/this.a),t.x=e,t.y=a,t):(a=Ss(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),e=z(this.long0+h/this.ns,this.over),t.x=e,t.y=a,t)},names:["Equidistant_Conic","eqdc"]};var Hs={init:function(){this.R=this.a},forward:function(t){var s,i,h=t.x,r=t.y,n=z(h-this.long0,this.over);Math.abs(r)<=e&&(s=this.x0+this.R*n,i=this.y0);var o=Rs(2*Math.abs(r/Math.PI));(Math.abs(n)<=e||Math.abs(Math.abs(r)-a)<=e)&&(s=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var l=.5*Math.abs(Math.PI/n-n/Math.PI),c=l*l,u=Math.sin(o),_=Math.cos(o),M=_/(u+_-1),f=M*M,d=M*(2/u-1),g=d*d,m=Math.PI*this.R*(l*(M-g)+Math.sqrt(c*(M-g)*(M-g)-(g+c)*(f-g)))/(g+c);n<0&&(m=-m),s=this.x0+m;var p=c+M;return m=Math.PI*this.R*(d*p-l*Math.sqrt((g+c)*(c+1)-p*p))/(g+c),i=r>=0?this.y0+m:this.y0-m,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,r,n,o,l,c,u,_,M;return t.x-=this.x0,t.y-=this.y0,_=Math.PI*this.R,r=(a=t.x/_)*a+(h=t.y/_)*h,_=3*(h*h/(l=-2*(n=-Math.abs(h)*(1+r))+1+2*h*h+r*r)+(2*(o=n-2*h*h+a*a)*o*o/l/l/l-9*n*o/l/l)/27)/(c=(n-o*o/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(_)>1&&(_=_>=0?1:-1),M=Math.acos(_)/3,i=t.y>=0?(-u*Math.cos(M+Math.PI/3)-o/3/l)*Math.PI:-(-u*Math.cos(M+Math.PI/3)-o/3/l)*Math.PI,s=Math.abs(a)1e-12&&--A>0);return 0===A?{azi1:NaN,s12:NaN}:(x=w*(e*e-e*(1-h)*(e*(1-h)))/(e*(1-h)*(e*(1-h))),S=1+x/16384*(4096+x*(x*(320-175*x)-768)),G=x/1024*(256+x*(x*(74-47*x)-128)),P=G*g*(v+G/4*(m*(2*v*v-1)-G/6*v*(4*g*g-3)*(4*v*v-3))),b=e*(1-h)*S*(p-P),{azi1:Math.atan2(_*f,c*u-l*_*d),s12:b})}(this.lat0,this.long0,d,f,this.a,this.f),M=_.azi1,t.x=_.s12*Math.sin(M),t.y=_.s12*Math.cos(M),t))},inverse:function(t){var s,i,h,r,n,o,l,c,u,_,M,f,d,g,m;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((s=Math.sqrt(t.x*t.x+t.y*t.y))>2*a*this.a)return;return i=s/this.a,h=Math.sin(i),r=Math.cos(i),n=this.long0,Math.abs(s)<=e?o=this.lat0:(o=Rs(r*this.sin_p12+t.y*h*this.cos_p12/s),l=Math.abs(this.lat0)-a,n=Math.abs(l)<=e?this.lat0>=0?z(this.long0+Math.atan2(t.x,-t.y),this.over):z(this.long0-Math.atan2(-t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*h,s*this.cos_p12*r-t.y*this.sin_p12*h),this.over)),t.x=n,t.y=o,t}return c=ps(this.es),u=ys(this.es),_=ws(this.es),M=vs(this.es),Math.abs(this.sin_p12-1)<=e?(o=Ss(((f=this.a*ms(c,u,_,M,a))-(s=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,c,u,_,M),n=z(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=n,t.y=o,t):Math.abs(this.sin_p12+1)<=e?(f=this.a*ms(c,u,_,M,a),o=Ss(((s=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,c,u,_,M),n=z(this.long0+Math.atan2(t.x,t.y),this.over),t.x=n,t.y=o,t):(d=Math.atan2(t.x,t.y),g=Math.sqrt(t.x*t.x+t.y*t.y),m=function(t,s,i,a,e,h){const r=Math.atan((1-h)*Math.tan(t)),n=Math.sin(r),o=Math.cos(r),l=Math.sin(i),c=Math.cos(i),u=Math.atan2(n,o*c),_=o*l,M=1-_*_,f=M*(e*e-e*(1-h)*(e*(1-h)))/(e*(1-h)*(e*(1-h))),d=1+f/16384*(4096+f*(f*(320-175*f)-768)),g=f/1024*(256+f*(f*(74-47*f)-128));let m,p,y,w,v,E=a/(e*(1-h)*d),x=100;do{p=Math.cos(2*u+E),y=Math.sin(E),w=Math.cos(E),v=g*y*(p+g/4*(w*(2*p*p-1)-g/6*p*(4*y*y-3)*(4*p*p-3))),m=E,E=a/(e*(1-h)*d)+v}while(Math.abs(E-m)>1e-12&&--x>0);if(0===x)return{lat2:NaN,lon2:NaN};const S=n*y-o*w*c,G=h/16*M*(4+h*(4-3*M));return{lat2:Math.atan2(n*w+o*y*c,(1-h)*Math.sqrt(_*_+S*S)),lon2:s+(Math.atan2(y*l,o*w-n*y*c)-(1-G)*h*_*(E+G*y*(p+G*w*(2*p*p-1))))}}(this.lat0,this.long0,d,g,this.a,this.f),t.x=m.lon2,t.y=m.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]};var Xs={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,r,n,o,l=t.x,c=t.y;return a=z(l-this.long0,this.over),s=Math.sin(c),i=Math.cos(c),h=Math.cos(a),((r=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(r)<=e)&&(n=1*this.a*i*Math.sin(a),o=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=o,t},inverse:function(t){var s,i,h,r,n,o,l;return t.x-=this.x0,t.y-=this.y0,i=Rs((s=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),h=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(s)<=e?(l=this.lat0,t.x=o,t.y=l,t):(l=Rs(r*this.sin_p14+t.y*h*this.cos_p14/s),n=Math.abs(this.lat0)-a,Math.abs(n)<=e?(o=this.lat0>=0?z(this.long0+Math.atan2(t.x,-t.y),this.over):z(this.long0-Math.atan2(-t.x,t.y),this.over),t.x=o,t.y=l,t):(o=z(this.long0+Math.atan2(t.x*h,s*this.cos_p14*r-t.y*this.sin_p14*h),this.over),t.x=o,t.y=l,t))},names:["ortho"]},Vs=1,Js=2,Ks=3,Zs=4,Ys=5,$s=6,ti=1,si=2,ii=3,ai=4;function ei(t,s,i,h){var r;return tn&&r<=a+n?(h.value=si,r-=a):r>a+n||r<=-(a+n)?(h.value=ii,r=r>=0?r-l:r+l):(h.value=ai,r+=a)),r}function hi(t,s){var i=t+s;return i<-3.14159265359?i+=o:i>3.14159265359&&(i-=o),i}var ri={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=a-n/2?this.face=Ys:this.lat0<=-(a-n/2)?this.face=$s:Math.abs(this.long0)<=n?this.face=Vs:Math.abs(this.long0)<=a+n?this.face=this.long0>0?Js:Zs:this.face=Ks,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,e,h,r,o,c={x:0,y:0},u={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===Ys)h=a-s,i>=n&&i<=a+n?(u.value=ti,e=i-a):i>a+n||i<=-(a+n)?(u.value=si,e=i>0?i-l:i+l):i>-(a+n)&&i<=-n?(u.value=ii,e=i+a):(u.value=ai,e=i);else if(this.face===$s)h=a+s,i>=n&&i<=a+n?(u.value=ti,e=-i+a):i=-n?(u.value=si,e=-i):i<-n&&i>=-(a+n)?(u.value=ii,e=-i-a):(u.value=ai,e=i>0?-i+l:-i-l);else{var _,M,f,d,g,m;this.face===Js?i=hi(i,+a):this.face===Ks?i=hi(i,3.14159265359):this.face===Zs&&(i=hi(i,-a)),d=Math.sin(s),g=Math.cos(s),m=Math.sin(i),_=g*Math.cos(i),M=g*m,f=d,this.face===Vs?e=ei(h=Math.acos(_),f,M,u):this.face===Js?e=ei(h=Math.acos(M),f,-_,u):this.face===Ks?e=ei(h=Math.acos(-_),f,-M,u):this.face===Zs?e=ei(h=Math.acos(-M),f,_,u):(h=e=0,u.value=ti)}return o=Math.atan(12/l*(e+Math.acos(Math.sin(e)*Math.cos(n))-a)),r=Math.sqrt((1-Math.cos(h))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(e))))),u.value===si?o+=a:u.value===ii?o+=l:u.value===ai&&(o+=1.5*l),c.x=r*Math.cos(o),c.y=r*Math.sin(o),c.x=c.x*this.a+this.x0,c.y=c.y*this.a+this.y0,t.x=c.x,t.y=c.y,t},inverse:function(t){var s,i,e,h,r,n,o,c,u,_,M,f,d={lam:0,phi:0},g={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?g.value=ti:t.y>=0&&t.y>=Math.abs(t.x)?(g.value=si,s-=a):t.x<0&&-t.x>=Math.abs(t.y)?(g.value=ii,s=s<0?s+l:s-l):(g.value=ai,s+=a),u=l/12*Math.tan(s),r=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),n=Math.atan(r),(o=1-(e=Math.cos(s))*e*(h=Math.tan(i))*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?o=-1:o>1&&(o=1),this.face===Ys)c=Math.acos(o),d.phi=a-c,g.value===ti?d.lam=n+a:g.value===si?d.lam=n<0?n+l:n-l:g.value===ii?d.lam=n-a:d.lam=n;else if(this.face===$s)c=Math.acos(o),d.phi=c-a,g.value===ti?d.lam=-n+a:g.value===si?d.lam=-n:g.value===ii?d.lam=-n-a:d.lam=n<0?-n-l:-n+l;else{var m,p,y;u=(m=o)*m,p=(u+=(y=u>=1?0:Math.sqrt(1-u)*Math.sin(n))*y)>=1?0:Math.sqrt(1-u),g.value===si?(u=p,p=-y,y=u):g.value===ii?(p=-p,y=-y):g.value===ai&&(u=p,p=y,y=-u),this.face===Js?(u=m,m=-p,p=u):this.face===Ks?(m=-m,p=-p):this.face===Zs&&(u=m,m=p,p=-u),d.phi=Math.acos(-y)-a,d.lam=Math.atan2(p,m),this.face===Js?d.lam=hi(d.lam,-a):this.face===Ks?d.lam=hi(d.lam,-3.14159265359):this.face===Zs&&(d.lam=hi(d.lam,+a))}return 0!==this.es&&(_=d.phi<0?1:0,M=Math.tan(d.phi),f=this.b/Math.sqrt(M*M+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-f*f)/(this.one_minus_f*f)),_&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},ni=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],oi=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],li=.8487,ci=1.3523,ui=r/5,_i=1/ui,Mi=18,fi=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))};var di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=z(t.x-this.long0,this.over),i=Math.abs(t.y),a=Math.floor(i*ui);a<0?a=0:a>=Mi&&(a=17);var e={x:fi(ni[a],i=r*(i-_i*a))*s,y:fi(oi[a],i)};return t.y<0&&(e.y=-e.y),e.x=e.x*this.a*li+this.x0,e.y=e.y*this.a*ci+this.y0,e},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*li),y:Math.abs(t.y-this.y0)/(this.a*ci)};if(s.y>=1)s.x/=ni[18][0],s.y=t.y<0?-a:a;else{var i=Math.floor(s.y*Mi);for(i<0?i=0:i>=Mi&&(i=17);;)if(oi[i][0]>s.y)--i;else{if(!(oi[i+1][0]<=s.y))break;++i}var r=oi[i],n=5*(s.y-r[0])/(oi[i+1][0]-r[0]);n=function(t,s,i,a){for(var e=s;a;--a){var h=t(e);if(e-=h,Math.abs(h)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,s=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=s,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var s,i,a,e,h=t.x,r=t.y;if(h-=this.long0,"ellipse"===this.shape){r=Math.atan(this.radius_p2*Math.tan(r));var n=this.radius_p/ss(this.radius_p*Math.cos(r),Math.sin(r));if(i=n*Math.cos(h)*Math.cos(r),a=n*Math.sin(h)*Math.cos(r),e=n*Math.sin(r),(this.radius_g-i)*i-a*a-e*e*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/ss(e,s)),t.y=this.radius_g_1*Math.atan(e/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(e/ss(a,s)))}else"sphere"===this.shape&&(s=Math.cos(r),i=Math.cos(h)*s,a=Math.sin(h)*s,e=Math.sin(r),s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/ss(e,s)),t.y=this.radius_g_1*Math.atan(e/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(e/ss(a,s))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var s,i,a,e,h=-1,r=0,n=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*ss(1,n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*ss(1,r));var o=n/this.radius_p;if(s=r*r+o*o+h*h,(a=(i=2*this.radius_g*h)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=(-i-Math.sqrt(a))/(2*s),h=this.radius_g+e*h,r*=e,n*=e,t.x=Math.atan2(r,h),t.y=Math.atan(n*Math.cos(t.x)/h),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+n*n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+r*r)),s=r*r+n*n+h*h,(a=(i=2*this.radius_g*h)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=(-i-Math.sqrt(a))/(2*s),h=this.radius_g+e*h,r*=e,n*=e,t.x=Math.atan2(r,h),t.y=Math.atan(n*Math.cos(t.x)/h)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},Si=1.340264,Gi=-.081106,Pi=893e-6,bi=.003796,Ni=Math.sqrt(3)/2;var Ai={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0,this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0},forward:function(t){var s=z(t.x-this.long0,this.over),i=t.y,a=Math.asin(Ni*Math.sin(i)),e=a*a,h=e*e*e;return t.x=s*Math.cos(a)/(Ni*(Si+3*Gi*e+h*(7*Pi+9*bi*e))),t.y=a*(Si+Gi*e+h*(Pi+bi*e)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var s,i,a,e,h=t.y;for(e=0;e<12&&(h-=a=(h*(Si+Gi*(s=h*h)+(i=s*s*s)*(Pi+bi*s))-t.y)/(Si+3*Gi*s+i*(7*Pi+9*bi*s)),!(Math.abs(a)<1e-9));++e);return i=(s=h*h)*s*s,t.x=Ni*t.x*(Si+3*Gi*s+i*(7*Pi+9*bi*s))/Math.cos(h),t.y=Math.asin(Math.sin(h)/Ni),t.x=z(t.x+this.long0,this.over),t},names:["eqearth","Equal Earth","Equal_Earth"]},Ii=1e-10;function Ci(t){var s,i,a,e=z(t.x-(this.long0||0),this.over),h=t.y;return s=this.am1+this.m1-Zt(h,i=Math.sin(h),a=Math.cos(h),this.en),i=a*e/(s*Math.sqrt(1-this.es*i*i)),t.x=s*Math.sin(i),t.y=this.am1-s*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function ki(t){var s,i,e,h;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=ss(t.x,t.y=this.am1-t.y),h=Yt(this.am1+this.m1-i,this.es,this.en),(s=Math.abs(h))Ii?(t.x=i*Math.sin(s=a*Math.cos(e)/i),t.y=this.cphi1-i*Math.cos(s)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Ri(t){var s,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var e=ss(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-e,Math.abs(i)>a)throw new Error;return s=Math.abs(Math.abs(i)-a)<=Ii?0:e*Math.atan2(t.x,t.y)/Math.cos(i),t.x=z(s+(this.long0||0),this.over),t.y=xs(i),t}var ji={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)=a?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Ri,this.forward=Oi)},names:["bonne","Bonne (Werner lat_1=90)"]};const qi={OBLIQUE:{forward:function(t,s){let{x:i,y:a}=s;i+=t.long0;const e=Math.cos(i),h=Math.sin(a),n=Math.cos(a);s.x=z(Math.atan2(n*Math.sin(i),t.sphip*n*e+t.cphip*h)+t.lamp),s.y=Math.asin(t.sphip*h-t.cphip*n*e);const o=t.obliqueProjection.forward(s);t.isIdentity&&(o.x*=r,o.y*=r);return o},inverse:function(t,s){t.isIdentity&&(s.x*=h,s.y*=h);const i=t.obliqueProjection.inverse(s);let{x:a,y:e}=i;if(a{if(void 0===this[t])return;const s=parseFloat(this[t])*h;if(isNaN(s))throw new Error("Invalid value for "+t+": "+this[t]);return s};for(let t=0;tvoid 0!==this[t]))){s=e;for(let t=0;ta-e)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(o)>a-e)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(r-o)e?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=qi.OBLIQUE):this.projectionType=qi.TRANSVERSE},forward:function(t){return this.projectionType.forward(this,t)},inverse:function(t){return this.projectionType.inverse(this,t)},names:["General Oblique Transformation","General_Oblique_Transformation","ob_tran"]};const Fi=Object.assign((function(t,s,i){var a,e,h,r=!1;return void 0===s?(e=Nt(t),a=Pt,r=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,e=Nt(t),a=Pt,r=!0),a||(a=Nt(t)),e||(e=Nt(s)),i?bt(a,e,i):(h={forward:function(t,s){return bt(a,e,t,s)},inverse:function(t,s){return bt(e,a,t,s)}},r&&(h.oProj=e),h)}),{defaultDatum:"WGS84",Proj:ft,WGS84:new ft("WGS84"),Point:Qt,toPoint:xt,defs:T,nadgrid:function(t,s,i){return s instanceof ArrayBuffer?function(t,s,i){var a=!0;void 0!==i&&!1===i.includeErrorFields&&(a=!1);var e=new DataView(s),h=function(t){var s=t.getInt32(8,!1);if(11===s)return!1;s=t.getInt32(8,!0),11!==s&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(e),r=function(t,s){return{nFields:t.getInt32(8,s),nSubgridFields:t.getInt32(24,s),nSubgrids:t.getInt32(40,s),shiftType:ct(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,s),fromSemiMinorAxis:t.getFloat64(136,s),toSemiMajorAxis:t.getFloat64(152,s),toSemiMinorAxis:t.getFloat64(168,s)}}(e,h),n=function(t,s,i,a){for(var e=176,h=[],r=0;r