qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/ThirdParty/Workers/proj4work.js

1 line
93 KiB
JavaScript
Raw Normal View History

2024-01-02 14:12:39 +08:00
var globals=function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]},PJD_3PARAM=1,PJD_7PARAM=2,PJD_GRIDSHIFT=3,PJD_WGS84=4,PJD_NODATUM=5,SRS_WGS84_SEMIMAJOR=6378137,SRS_WGS84_SEMIMINOR=6356752.314,SRS_WGS84_ESQUARED=.0066943799901413165,SEC_TO_RAD=484813681109536e-20,HALF_PI=Math.PI/2,SIXTH=.16666666666666666,RA4=.04722222222222222,RA6=.022156084656084655,EPSLN=1e-10,D2R=.017453292519943295,R2D=57.29577951308232,FORTPI=Math.PI/4,TWO_PI=2*Math.PI,SPI=3.14159265359,exports$1={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},units={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},ignoredChar=/[\s_\-\/\(\)]/g;function match(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),e=s.toLowerCase().replace(ignoredChar,""),h=-1;++h<a.length;)if((i=a[h]).toLowerCase().replace(ignoredChar,"")===e)return t[i]}var parseProj=function(t){var s,i,a,e={},h=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,s){var i=s.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t}),{}),n={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t)},lat_0:function(t){e.lat0=t*D2R},lat_1:function(t){e.lat1=t*D2R},lat_2:function(t){e.lat2=t*D2R},lat_ts:function(t){e.lat_ts=t*D2R},lon_0:function(t){e.long0=t*D2R},lon_1:function(t){e.long1=t*D2R},lon_2:function(t){e.long2=t*D2R},alpha:function(t){e.alpha=parseFloat(t)*D2R},gamma:function(t){e.rectified_grid_angle=parseFloat(t)},lonc:function(t){e.longc=t*D2R},x_0:function(t){e.x0=parseFloat(t)},y_0:function(t){e.y0=parseFloat(t)},k_0:function(t){e.k0=parseFloat(t)},k:function(t){e.k0=parseFloat(t)},a:function(t){e.a=parseFloat(t)},b:function(t){e.b=parseFloat(t)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){e.to_meter=parseFloat(t)},units:function(t){e.units=t;var s=match(units,t);s&&(e.to_meter=s.to_meter)},from_greenwich:function(t){e.from_greenwich=t*D2R},pm:function(t){var s=match(exports$1,t);e.from_greenwich=(s||parseFloat(t))*D2R},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){var s="ewnsud";3===t.length&&-1!==s.indexOf(t.substr(0,1))&&-1!==s.indexOf(t.substr(1,1))&&-1!==s.indexOf(t.substr(2,1))&&(e.axis=t)},approx:function(){e.approx=!0}};for(s in h)i=h[s],s in n?"function"==typeof(a=n[s])?a(i):e[a]=i:e[s]=i;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e},NEUTRAL=1,KEYWORD=2,NUMBER=3,QUOTED=4,AFTERQUOTE=5,ENDED=-1,whitespace=/\s/,latin=/[A-Za-z]/,keyword=/[A-Za-z84]/,endThings=/[,\]]/,digets=/[\d\.E\-\+]/;function Parser(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=NEUTRAL}function parseString(t){return new Parser(t).output()}function mapit(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,e=i.reduce((function(t,s){return sExpr(s,t),t}),a);s&&(t[s]=e)}function sExpr(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 sExpr(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