m4-w-fast 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.js +1 -1
- package/dist/intersect.worker.js +2 -2
- package/dist/isoBands.worker.js +1 -1
- package/dist/m4-w-fast.umd.js +1 -0
- package/dist/readFile.d.ts +26 -75
- package/dist/readFile.js +1 -1
- package/dist/types.d.ts +141 -0
- package/dist/types.js +1 -0
- package/package.json +7 -3
package/dist/readFile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0xab1a38=a3_0xb1cd;(function(_0x37cd28,_0x49b34a){const _0x8a11f6=a3_0xb1cd,_0x5fd5a7=_0x37cd28();while(!![]){try{const _0x442620=-parseInt(_0x8a11f6(0xee))/0x1*(parseInt(_0x8a11f6(0xea))/0x2)+-parseInt(_0x8a11f6(0x11d))/0x3*(parseInt(_0x8a11f6(0xe3))/0x4)+-parseInt(_0x8a11f6(0x114))/0x5*(parseInt(_0x8a11f6(0xd2))/0x6)+parseInt(_0x8a11f6(0x106))/0x7*(-parseInt(_0x8a11f6(0xf0))/0x8)+parseInt(_0x8a11f6(0x10e))/0x9+parseInt(_0x8a11f6(0x118))/0xa*(parseInt(_0x8a11f6(0xde))/0xb)+parseInt(_0x8a11f6(0x117))/0xc*(parseInt(_0x8a11f6(0xf2))/0xd);if(_0x442620===_0x49b34a)break;else _0x5fd5a7['push'](_0x5fd5a7['shift']());}catch(_0x17e681){_0x5fd5a7['push'](_0x5fd5a7['shift']());}}}(a3_0x2416,0xc5a92));import{contours}from'd3-contour';function a3_0xb1cd(_0x511af4,_0x341d12){const _0x241640=a3_0x2416();return a3_0xb1cd=function(_0xb1cd78,_0x3e7ad3){_0xb1cd78=_0xb1cd78-0xd1;let _0xc11333=_0x241640[_0xb1cd78];return _0xc11333;},a3_0xb1cd(_0x511af4,_0x341d12);}import a3_0x542ccd from'@turf/area';import{featureCollection as a3_0x191b72}from'@turf/helpers';import a3_0x58bab9 from'decimal.js';export class readFileM4{[a3_0xab1a38(0x11c)]='';['nx']=0x0;['ny']=0x0;[a3_0xab1a38(0x122)]=0x0;['minLat']=0x0;['gjLng']=0x0;[a3_0xab1a38(0xdd)]=0x0;[a3_0xab1a38(0x110)]=[];[a3_0xab1a38(0xd3)]=-Infinity;[a3_0xab1a38(0xe7)]=Infinity;[a3_0xab1a38(0x109)]='';[a3_0xab1a38(0xda)]=new Map();constructor(_0x10a06c){const _0x4a4673=a3_0xab1a38;this[_0x4a4673(0x11c)]=_0x10a06c||'';}async[a3_0xab1a38(0x128)](_0x53f4b8){const _0x2f843e=a3_0xab1a38,_0x2224a5=await fetch(this[_0x2f843e(0x11c)]);if(!_0x2224a5['ok'])return new Promise((_0x5d9429,_0xeab5a2)=>{const _0x115683=_0x2f843e;_0xeab5a2(_0x115683(0x10f));});const _0x36ecfc=await _0x2224a5[_0x2f843e(0x105)](),_0xe0953d=_0x36ecfc[_0x2f843e(0x102)](/\r\n/g,'\x0a')[_0x2f843e(0x102)](/\r/g,'\x0a')['split']('\x0a');if(_0xe0953d['length']<0x4)return new Promise((_0x430402,_0x120486)=>{_0x120486('该时次文件数据异常');});const _0x39847f=(_0xe0953d[0x1]??'')[_0x2f843e(0x125)]()[_0x2f843e(0x103)](/\s+/);let _0x54c7d5=0x2;while(_0x39847f['length']<0x13){_0x39847f[_0x2f843e(0xdc)](...(_0xe0953d[_0x54c7d5]??'')['trim']()['split'](/\s+/)),_0x54c7d5++;}this['gjLng']=Number(_0x39847f[0x6]);const _0xbad6c6=Number(_0x39847f[0x8]),_0x5ce8cd=Number(_0x39847f[0xa]),_0x377df8=Number(_0x39847f[0xb]);this['nx']=Number(_0x39847f[0xc]),this['ny']=Number(_0x39847f[0xd]),this[_0x2f843e(0x122)]=_0xbad6c6,this['minLat']=_0x5ce8cd,this['gjLat']=Math[_0x2f843e(0xff)](Number(_0x39847f[0x7]))*(_0x5ce8cd>_0x377df8?-0x1:0x1);const _0x171051=this['nx']*this['ny'];let _0x4cbdbc=0x0;for(let _0x236136=_0x54c7d5;_0x236136<_0xe0953d[_0x2f843e(0xe0)]&&_0x4cbdbc<_0x171051;_0x236136++){const _0x2fe628=_0xe0953d[_0x236136][_0x2f843e(0x125)]()??'',_0x3244f7=_0x2fe628[_0x2f843e(0x103)](/\s+/);if(!_0x3244f7||_0x3244f7[_0x2f843e(0xe0)]===0x0)continue;for(let _0x1888d0=0x0;_0x1888d0<_0x3244f7[_0x2f843e(0xe0)]&&_0x4cbdbc<_0x171051;_0x1888d0++){let _0x7f485c=Number(_0x3244f7[_0x1888d0]);if(_0x53f4b8?.[_0x2f843e(0xd7)])_0x7f485c=new a3_0x58bab9(_0x7f485c)['minus'](272.15)[_0x2f843e(0x11f)]();else _0x53f4b8?.[_0x2f843e(0x10c)]&&(_0x7f485c=new a3_0x58bab9(_0x7f485c)['plus'](_0x53f4b8['plusOffset'])[_0x2f843e(0x11f)]());this[_0x2f843e(0x110)][_0x2f843e(0xdc)](_0x7f485c),this[_0x2f843e(0xe7)]=Math[_0x2f843e(0xd8)](this[_0x2f843e(0xe7)],_0x7f485c),this[_0x2f843e(0xd3)]=Math[_0x2f843e(0xfc)](this[_0x2f843e(0xd3)],_0x7f485c),_0x4cbdbc++;}}}[a3_0xab1a38(0xdb)](_0x13a580,_0x47e130){const _0x3fb397=a3_0xab1a38;this['nx']=_0x13a580['nx'],this['ny']=_0x13a580['ny'],this[_0x3fb397(0x122)]=_0x13a580[_0x3fb397(0x122)],this[_0x3fb397(0x10b)]=_0x13a580['minLat'],this[_0x3fb397(0xf8)]=_0x13a580[_0x3fb397(0xf8)],this['gjLat']=_0x13a580[_0x3fb397(0xdd)];if(_0x47e130?.[_0x3fb397(0xd7)])for(let _0x56a6d9=0x0;_0x56a6d9<_0x13a580[_0x3fb397(0x110)][_0x3fb397(0xe0)];_0x56a6d9++){_0x13a580[_0x3fb397(0x110)][_0x56a6d9]=new a3_0x58bab9(_0x13a580[_0x3fb397(0x110)][_0x56a6d9])[_0x3fb397(0xfe)](272.15)[_0x3fb397(0x11f)]();}else{if(_0x47e130?.[_0x3fb397(0x10c)])for(let _0x38efe7=0x0;_0x38efe7<_0x13a580[_0x3fb397(0x110)]['length'];_0x38efe7++){_0x13a580[_0x3fb397(0x110)][_0x38efe7]=new a3_0x58bab9(_0x13a580[_0x3fb397(0x110)][_0x38efe7])['plus'](_0x47e130[_0x3fb397(0x10c)])['toNumber']();}else this[_0x3fb397(0x110)]=_0x13a580[_0x3fb397(0x110)];}this[_0x3fb397(0xf7)]();}['getIsoBandsFast'](_0x163062){const _0x19a2ce=a3_0xab1a38;if(this[_0x19a2ce(0x110)]['length']===0x0)return{'type':_0x19a2ce(0x11b),'features':[]};let _0x25501a=[];if(_0x163062[_0x19a2ce(0xe0)]===0x0)_0x163062=this['getBreaks']();const _0x32222a=[];for(let _0x776c5e=0x0;_0x776c5e<_0x163062[_0x19a2ce(0xe0)];_0x776c5e++){const _0x5b866d=_0x163062[_0x776c5e],_0x2317f=_0x776c5e<_0x163062[_0x19a2ce(0xe0)]-0x1?_0x163062[_0x776c5e+0x1]:Infinity;if(_0x5b866d<this[_0x19a2ce(0xe7)]&&_0x2317f<this[_0x19a2ce(0xe7)])continue;if(_0x5b866d>this[_0x19a2ce(0xd3)]&&_0x2317f>this[_0x19a2ce(0xd3)])continue;_0x32222a[_0x19a2ce(0xdc)](_0x5b866d);}const _0x53e7da=contours()['size']([this['nx'],this['ny']])[_0x19a2ce(0xd9)](_0x32222a),_0x325193=_0x53e7da(this['values']);for(const _0x316c01 of _0x325193){for(const _0x488681 of _0x316c01[_0x19a2ce(0xf1)]){if(Array['isArray'](_0x488681))for(const _0x396fb7 of _0x488681){_0x396fb7[_0x19a2ce(0xfa)](_0x40d0f1=>{const _0x40f3c5=_0x19a2ce,_0x11b5b9=_0x40d0f1[0x0],_0xbe95b5=_0x40d0f1[0x1];if(_0x11b5b9==null||_0xbe95b5==null||Number['isNaN'](_0x11b5b9)||Number[_0x40f3c5(0xec)](_0xbe95b5))return null;const _0x4d1d44=new a3_0x58bab9(this['minLng'])[_0x40f3c5(0x121)](new a3_0x58bab9(_0x11b5b9)['times'](this['gjLng']))[_0x40f3c5(0x11f)](),_0x1b0684=new a3_0x58bab9(this[_0x40f3c5(0x10b)])[_0x40f3c5(0x121)](new a3_0x58bab9(_0xbe95b5)[_0x40f3c5(0x11e)](this[_0x40f3c5(0xdd)]))['toNumber']();_0x40d0f1[0x0]=_0x4d1d44,_0x40d0f1[0x1]=_0x1b0684;});}}_0x25501a['push']({'type':_0x19a2ce(0x10a),'properties':{'z':_0x316c01[_0x19a2ce(0xf3)]},'geometry':_0x316c01});}return{'type':'FeatureCollection','features':_0x25501a};}[a3_0xab1a38(0xe2)](_0x30aa69,_0x66e3c0,_0x3cdd63){const _0x5d1b66=a3_0xab1a38;let _0x4fc787=_0x5d1b66(0x124);const _0x3c5057=_0x66e3c0['indexOf'](_0x30aa69);if(typeof _0x3cdd63[_0x3c5057]==_0x5d1b66(0xf6))_0x4fc787=_0x3cdd63[_0x3c5057];else _0x3c5057!==-0x1&&(_0x4fc787=_0x5d1b66(0xf4)+_0x3cdd63[_0x3c5057][0x0]+','+_0x3cdd63[_0x3c5057][0x1]+','+_0x3cdd63[_0x3c5057][0x2]+','+(_0x3cdd63[_0x3c5057][0x3]||_0x3cdd63[_0x3c5057][0x3]===0x0?_0x3cdd63[_0x3c5057][0x3]:0x1)+')');return _0x4fc787;}async[a3_0xab1a38(0xfd)](_0x3b43d9,_0x255e4f,_0x218cc1,_0xa1d6b7){const _0x51ce8d=a3_0xab1a38,_0x221fd0=_0xa1d6b7?_0xa1d6b7:navigator[_0x51ce8d(0xe8)]-0x4||0x1,_0x3d42db=Math[_0x51ce8d(0xd8)](_0x221fd0,Math[_0x51ce8d(0xfc)](0x1,_0x3b43d9[_0x51ce8d(0x129)][_0x51ce8d(0xe0)])),_0x2862af=this[_0x51ce8d(0x104)](_0x3b43d9['features'],_0x3d42db),_0x14536b=[],_0x25d42e=_0x2862af[_0x51ce8d(0x101)](_0x39c867=>{const _0xb9007e=_0x51ce8d,_0x43cc5b=new Worker(_0x218cc1,{'type':'module'});return _0x14536b[_0xb9007e(0xdc)](_0x43cc5b),new Promise(_0x53aa49=>{const _0x3aa13f=_0xb9007e;_0x43cc5b[_0x3aa13f(0xeb)]=_0x5cc63a=>{const _0x6e1ffc=_0x3aa13f;_0x53aa49(_0x5cc63a[_0x6e1ffc(0xef)][_0x6e1ffc(0x129)]);},_0x43cc5b[_0x3aa13f(0x120)]=_0x303e4c=>{const _0x3b9819=_0x3aa13f;console[_0x3b9819(0x115)](_0x303e4c);},_0x43cc5b[_0x3aa13f(0xdf)]({'isoChunk':_0x39c867,'gansuFeatures':_0x255e4f[_0x3aa13f(0x129)]});});}),_0x21443b=await Promise[_0x51ce8d(0xe9)](_0x25d42e);_0x14536b['forEach'](_0x51feeb=>_0x51feeb[_0x51ce8d(0x100)]());const _0xefd557=_0x21443b[_0x51ce8d(0xe4)]();return a3_0x191b72(_0xefd557);}async['getIsoBandsFastByWorker'](_0x3c72c9,_0x5728e7,_0x28eb5d){const _0x50fae9=a3_0xab1a38;if(this[_0x50fae9(0x110)][_0x50fae9(0xe0)]===0x0)return{'type':_0x50fae9(0x11b),'features':[]};let _0x51a76c=[];if(_0x3c72c9[_0x50fae9(0xe0)]===0x0)_0x3c72c9=this[_0x50fae9(0x116)]();const _0x4645cd=[],_0x5050f2=_0x28eb5d?_0x28eb5d:navigator[_0x50fae9(0xe8)]-0x4||0x1,_0x2c1a49=Math[_0x50fae9(0xd8)](_0x5050f2,Math['max'](0x1,_0x3c72c9['length'])),_0x2035ab=this['chunkArray'](_0x3c72c9,_0x2c1a49),_0x4a63c7=_0x2035ab[_0x50fae9(0x101)](_0x108b25=>{const _0x10b62e=_0x50fae9,_0x4719c0=new Worker(_0x5728e7,{'type':_0x10b62e(0xf5)});return _0x4645cd[_0x10b62e(0xdc)](_0x4719c0),new Promise(_0x42898a=>{const _0x4d2051=_0x10b62e;_0x4719c0[_0x4d2051(0xeb)]=_0x51e8ea=>{const _0xcda422=_0x4d2051;_0x42898a(_0x51e8ea[_0xcda422(0xef)]['features']);},_0x4719c0['onerror']=_0x269aae=>{const _0x40bf25=_0x4d2051;console[_0x40bf25(0x115)](_0x269aae);},_0x4719c0[_0x4d2051(0xdf)]({'breaks':_0x108b25,'values':this[_0x4d2051(0x110)],'nx':this['nx'],'ny':this['ny'],'minVal':this[_0x4d2051(0xe7)],'maxVal':this['maxVal'],'minLng':this[_0x4d2051(0x122)],'minLat':this[_0x4d2051(0x10b)],'gjLng':this[_0x4d2051(0xf8)],'gjLat':this[_0x4d2051(0xdd)]});});}),_0x511555=await Promise[_0x50fae9(0xe9)](_0x4a63c7);return _0x4645cd[_0x50fae9(0xfa)](_0x359103=>_0x359103[_0x50fae9(0x100)]()),_0x511555[_0x50fae9(0xfa)](_0x206b82=>{const _0x2080d4=_0x50fae9;_0x51a76c[_0x2080d4(0xdc)](..._0x206b82);}),_0x51a76c=this['sortFeaturesByArea'](_0x51a76c),{'type':'FeatureCollection','features':_0x51a76c};}[a3_0xab1a38(0x10d)](){const _0x480daa=a3_0xab1a38;this[_0x480daa(0xda)][_0x480daa(0xfb)]();}[a3_0xab1a38(0x127)](_0xa2cd96=[],_0x1ef406){const _0x417620=a3_0xab1a38;if(typeof _0x1ef406!==_0x417620(0xd5)&&this[_0x417620(0xda)][_0x417620(0xd6)](_0x1ef406)){const _0x22b4a4=this[_0x417620(0xda)]['get'](_0x1ef406)||[],_0x3b3ea7=this[_0x417620(0xe1)]?this[_0x417620(0xe1)](_0x22b4a4):_0x22b4a4;return{'type':_0x417620(0x11b),'features':_0x3b3ea7};}if(this[_0x417620(0x110)][_0x417620(0xe0)]===0x0)return{'type':_0x417620(0x11b),'features':[]};if(_0xa2cd96[_0x417620(0xe0)]===0x0)_0xa2cd96=this[_0x417620(0x116)]();const _0x5924f0=_0xa2cd96[_0x417620(0x108)](',');if(this[_0x417620(0x109)]!==_0x5924f0){this[_0x417620(0x109)]=_0x5924f0,this[_0x417620(0xda)][_0x417620(0xfb)]();const _0x2bcf71=this[_0x417620(0x122)],_0x4d2d0a=this[_0x417620(0x10b)],_0x214136=this[_0x417620(0xf8)],_0x301e53=this[_0x417620(0xdd)],_0x4e5ded=_0x48e8dd=>{let _0x8ee551=0x0;for(let _0x45ba24=0x0,_0x1f99e7=_0x48e8dd['length'];_0x45ba24<_0x1f99e7;_0x45ba24++){const _0x6269ec=_0x48e8dd[_0x45ba24][0x0],_0x537cef=_0x48e8dd[_0x45ba24][0x1],_0x7c7509=_0x48e8dd[(_0x45ba24+0x1)%_0x1f99e7][0x0],_0x5b3e5f=_0x48e8dd[(_0x45ba24+0x1)%_0x1f99e7][0x1];if(_0x6269ec==null||_0x537cef==null||_0x7c7509==null||_0x5b3e5f==null)continue;_0x8ee551+=_0x6269ec*_0x5b3e5f-_0x7c7509*_0x537cef;}return _0x8ee551/0x2;},_0x55bd91=(_0xaa2902,_0x5497bf)=>{const _0xe0e668=_0x417620;if(!_0xaa2902)return![];const _0x4b429e=_0xaa2902[0x0],_0x3034f6=_0xaa2902[0x1];let _0x42efc9=![];for(let _0x1f0aa8=0x0,_0xe97ff7=_0x5497bf[_0xe0e668(0xe0)]-0x1;_0x1f0aa8<_0x5497bf[_0xe0e668(0xe0)];_0xe97ff7=_0x1f0aa8++){const _0x33ada7=_0x5497bf[_0x1f0aa8][0x0],_0x2595f6=_0x5497bf[_0x1f0aa8][0x1],_0x31525e=_0x5497bf[_0xe97ff7][0x0],_0x12750a=_0x5497bf[_0xe97ff7][0x1],_0x52ce23=_0x2595f6>_0x3034f6!==_0x12750a>_0x3034f6&&_0x4b429e<(_0x31525e-_0x33ada7)*(_0x3034f6-_0x2595f6)/(_0x12750a-_0x2595f6)+_0x33ada7;if(_0x52ce23)_0x42efc9=!_0x42efc9;}return _0x42efc9;},_0x28b79a=_0x1e93c7=>{const _0x52b392=_0x417620,_0x28cfd8=[];let _0x1d2c5d=null,_0xdd72a4=null;for(let _0x13a924=0x0;_0x13a924<_0x1e93c7[_0x52b392(0xe0)];_0x13a924++){const _0x5d837a=_0x1e93c7[_0x13a924];if(!_0x5d837a)continue;const _0x5d19ea=_0x5d837a[0x0],_0x4190dd=_0x5d837a[0x1];if(_0x5d19ea==null||_0x4190dd==null||Number[_0x52b392(0xec)](_0x5d19ea)||Number[_0x52b392(0xec)](_0x4190dd))continue;const _0x2f059b=_0x2bcf71+_0x5d19ea*_0x214136,_0x473e13=_0x4d2d0a+_0x4190dd*_0x301e53;if(_0x1d2c5d!==null&&_0xdd72a4!==null&&_0x1d2c5d===_0x2f059b&&_0xdd72a4===_0x473e13){_0x1d2c5d=_0x2f059b,_0xdd72a4=_0x473e13;continue;}_0x28cfd8[_0x52b392(0xdc)]([_0x2f059b,_0x473e13]),_0x1d2c5d=_0x2f059b,_0xdd72a4=_0x473e13;}if(_0x28cfd8[_0x52b392(0xe0)]===0x0)return _0x28cfd8;const _0x10a459=_0x28cfd8[0x0],_0x256d37=_0x28cfd8[_0x28cfd8[_0x52b392(0xe0)]-0x1];if(_0x10a459[0x0]!==_0x256d37[0x0]||_0x10a459[0x1]!==_0x256d37[0x1])_0x28cfd8[_0x52b392(0xdc)]([_0x10a459[0x0],_0x10a459[0x1]]);return _0x28cfd8;},_0x5f1767=_0xa2cd96[_0x417620(0xe0)]-0x1;for(let _0xee1567=0x0;_0xee1567<_0xa2cd96[_0x417620(0xe0)];_0xee1567++){const _0xa5b0ec=_0xa2cd96[_0xee1567],_0x314bd6=_0xee1567<_0x5f1767?_0xa2cd96[_0xee1567+0x1]:Infinity,_0x214ff0=Array[_0x417620(0xed)]({'length':this[_0x417620(0x110)][_0x417620(0xe0)]});let _0x3aa4fb=![];for(let _0x3657b4=0x0;_0x3657b4<this[_0x417620(0x110)][_0x417620(0xe0)];_0x3657b4++){const _0x405a2a=this[_0x417620(0x110)][_0x3657b4],_0x30113e=_0x405a2a>=_0xa5b0ec&&_0x405a2a<_0x314bd6?0x1:0x0;if(_0x30113e)_0x3aa4fb=!![];_0x214ff0[_0x3657b4]=_0x30113e;}if(!_0x3aa4fb)continue;const _0x271719=contours()[_0x417620(0xf9)]([this['nx'],this['ny']])[_0x417620(0xd9)]([0.5]),_0x33b424=_0x271719[_0x417620(0x126)]?_0x271719[_0x417620(0x126)](_0x214ff0):_0x271719(_0x214ff0);if(!_0x33b424||_0x33b424[_0x417620(0xe0)]===0x0)continue;const _0xdd82a6=[];for(const _0x31b5a8 of _0x33b424){const _0x127560=_0x31b5a8&&_0x31b5a8[_0x417620(0xf1)];if(!_0x127560)continue;for(const _0x3ca4df of _0x127560){let _0x16a428=[];if(Array['isArray'](_0x3ca4df)&&_0x3ca4df[_0x417620(0xe0)]>0x0&&typeof _0x3ca4df[0x0][0x0]==='number')_0x16a428=[_0x3ca4df];else{if(Array[_0x417620(0x11a)](_0x3ca4df))_0x16a428=_0x3ca4df;else continue;}const _0x389f14=_0x16a428[_0x417620(0x101)](_0x52c6e3=>({'ring':_0x52c6e3,'area':Math[_0x417620(0xff)](_0x4e5ded(_0x52c6e3))}))['sort']((_0x50126b,_0x21ba53)=>_0x21ba53[_0x417620(0xd1)]-_0x50126b[_0x417620(0xd1)]),_0x3e1e20=Array[_0x417620(0xed)]({'length':_0x389f14[_0x417620(0xe0)]})['fill'](![]);for(let _0x405e22=0x0;_0x405e22<_0x389f14[_0x417620(0xe0)];_0x405e22++){if(_0x3e1e20[_0x405e22])continue;const _0x35d827=_0x389f14[_0x405e22][_0x417620(0x111)];_0x3e1e20[_0x405e22]=!![];const _0x47e128=[];for(let _0x44e5eb=0x0;_0x44e5eb<_0x389f14[_0x417620(0xe0)];_0x44e5eb++){if(_0x3e1e20[_0x44e5eb])continue;const _0x418c38=_0x389f14[_0x44e5eb][_0x417620(0x111)],_0x3c7625=_0x418c38[0x0];_0x3c7625&&_0x55bd91(_0x3c7625,_0x35d827)&&(_0x47e128[_0x417620(0xdc)](_0x418c38),_0x3e1e20[_0x44e5eb]=!![]);}const _0x1b3c94=_0x28b79a(_0x35d827);if(_0x1b3c94['length']<0x4)continue;const _0x5c7983=[];for(const _0x97d1a4 of _0x47e128){const _0x364e96=_0x28b79a(_0x97d1a4);if(_0x364e96['length']>=0x4)_0x5c7983[_0x417620(0xdc)](_0x364e96);}_0xdd82a6[_0x417620(0xdc)]({'type':_0x417620(0x10a),'properties':{'z':_0xa5b0ec},'geometry':{'type':'Polygon','coordinates':[_0x1b3c94,..._0x5c7983]}});}}}_0xdd82a6[_0x417620(0xe0)]&&this[_0x417620(0xda)][_0x417620(0xd4)](_0xa5b0ec,_0xdd82a6);}}if(typeof _0x1ef406!==_0x417620(0xd5)){const _0x4daee8=this['_maskCache'][_0x417620(0xd6)](_0x1ef406)||[],_0x509faf=this[_0x417620(0xe1)]?this['sortFeaturesByArea'](_0x4daee8):_0x4daee8;return{'type':'FeatureCollection','features':_0x509faf};}const _0x561052=[];for(const _0xf866a3 of this[_0x417620(0xda)][_0x417620(0x110)]()){_0x561052[_0x417620(0xdc)](..._0xf866a3);}const _0x3208d4=this[_0x417620(0xe1)]?this[_0x417620(0xe1)](_0x561052):_0x561052;return{'type':'FeatureCollection','features':_0x3208d4};}[a3_0xab1a38(0x107)](){const _0x492ebd=a3_0xab1a38,_0x3af93a=Array['from']({'length':this['nx']});for(let _0x387989=0x0;_0x387989<this['nx'];_0x387989++){_0x3af93a[_0x387989]=new a3_0x58bab9(this[_0x492ebd(0x122)])['plus'](new a3_0x58bab9(_0x387989)['times'](this[_0x492ebd(0xf8)]))[_0x492ebd(0x11f)]();}const _0x36583a=Array['from']({'length':this['ny']});for(let _0x1a8879=0x0;_0x1a8879<this['ny'];_0x1a8879++){_0x36583a[_0x1a8879]=new a3_0x58bab9(this[_0x492ebd(0x10b)])['plus'](new a3_0x58bab9(_0x1a8879)[_0x492ebd(0x11e)](this[_0x492ebd(0xdd)]))[_0x492ebd(0x11f)]();}const _0x1f5e52=Array['from']({'length':this['nx']*this['ny']});for(let _0x122d13=0x0;_0x122d13<this[_0x492ebd(0x110)][_0x492ebd(0xe0)];_0x122d13++){const _0x59daac=Math[_0x492ebd(0x119)](_0x122d13/this['nx']),_0x3f3ae1=_0x122d13%this['nx'],_0xf7d88b=_0x3af93a[_0x3f3ae1],_0xd2a0ea=_0x36583a[_0x59daac],_0x2db974=this[_0x492ebd(0x110)][_0x122d13];_0xd2a0ea&&_0xf7d88b&&(_0x1f5e52[_0x122d13]={'lng':_0xf7d88b,'lat':_0xd2a0ea,'val':_0x2db974});}return _0x1f5e52;}[a3_0xab1a38(0xf7)](){const _0x5e6647=a3_0xab1a38;let _0x298e94=-Infinity,_0x2061ad=Infinity;for(let _0x6ca544=0x0;_0x6ca544<this[_0x5e6647(0x110)][_0x5e6647(0xe0)];_0x6ca544++){const _0x346bd3=this['values'][_0x6ca544];if(_0x346bd3>_0x298e94)_0x298e94=_0x346bd3;if(_0x346bd3<_0x2061ad)_0x2061ad=_0x346bd3;}this['minVal']=_0x2061ad,this[_0x5e6647(0xd3)]=_0x298e94;}[a3_0xab1a38(0x116)](){const _0x1940be=a3_0xab1a38,_0x13979a=[];if(this['minVal']===Infinity||this[_0x1940be(0xd3)]===-Infinity)return _0x13979a;for(let _0x3400c3=this[_0x1940be(0xe7)]-0x1;_0x3400c3<=this[_0x1940be(0xd3)]+0x1;_0x3400c3++){_0x13979a[_0x1940be(0xdc)](_0x3400c3);}return _0x13979a;}[a3_0xab1a38(0xe1)](_0x21aa85){const _0x220b1a=a3_0xab1a38;return _0x21aa85[_0x220b1a(0x101)](_0x44791e=>{const _0x3a1af2=_0x220b1a;try{const _0x19a7c2=a3_0x542ccd(_0x44791e)||0x0;_0x44791e[_0x3a1af2(0xe5)]={..._0x44791e['properties']||{},'__area':_0x19a7c2};}catch{_0x44791e[_0x3a1af2(0xe5)]={..._0x44791e[_0x3a1af2(0xe5)]||{},'__area':0x0};}return _0x44791e;})[_0x220b1a(0xe6)]((_0x4b1ce1,_0x2ac477)=>_0x2ac477[_0x220b1a(0xe5)][_0x220b1a(0x113)]-_0x4b1ce1[_0x220b1a(0xe5)][_0x220b1a(0x113)])[_0x220b1a(0x123)](_0x51e5c9=>_0x51e5c9[_0x220b1a(0xe5)]&&'__area'in _0x51e5c9[_0x220b1a(0xe5)]&&_0x51e5c9['properties'][_0x220b1a(0x113)]!==0x0)['map'](_0x1607e2=>{const _0x2189a8=_0x220b1a;if(_0x1607e2[_0x2189a8(0xe5)]&&_0x2189a8(0x113)in _0x1607e2[_0x2189a8(0xe5)]){const {__area:_0x4e24f1,..._0x290146}=_0x1607e2[_0x2189a8(0xe5)];_0x1607e2['properties']=_0x290146;}return _0x1607e2;});}['chunkArray']=(_0x265562,_0x1e619d)=>{const _0x28b89=a3_0xab1a38,_0x262b94=[],_0x4836db=Math[_0x28b89(0xfc)](0x1,Math[_0x28b89(0x112)](_0x265562[_0x28b89(0xe0)]/_0x1e619d));for(let _0x5073df=0x0;_0x5073df<_0x1e619d;_0x5073df++){_0x262b94[_0x28b89(0xdc)](_0x265562['slice'](_0x5073df*_0x4836db,(_0x5073df+0x1)*_0x4836db));}return _0x262b94;};}export default readFileM4;function a3_0x2416(){const _0x345a32=['flat','properties','sort','minVal','hardwareConcurrency','all','16KlNncg','onmessage','isNaN','from','152144fdVPWv','data','192LCoRZt','coordinates','1563263KFbgsC','value','rgba(','module','string','getMinMax','gjLng','size','forEach','clear','max','clipDataByJson','minus','abs','terminate','map','replace','split','chunkArray','text','136941DSCxTd','getJsonData','join','_maskCacheKey','Feature','minLat','plusOffset','clearMaskCache','4458510AEeSSO','该时次未获取到文件','values','ring','ceil','__area','4943590tamlSI','error','getBreaks','252Xrwmye','130xvNqiv','floor','isArray','FeatureCollection','filePath','192sQetiw','times','toNumber','onerror','plus','minLng','filter','rgba(255,255,255,0)','trim','contours','getIsoBandsByLayerBreak','start','features','area','6YZXqhE','maxVal','set','undefined','get','convertTemKtoC','min','thresholds','_maskCache','setParams','push','gjLat','1022549cJRryW','postMessage','length','sortFeaturesByArea','getColorFast','46508TWdYWg'];a3_0x2416=function(){return _0x345a32;};return a3_0x2416();}
|
|
1
|
+
function a4_0xbaa5(_0x19aa85,_0x4f1a3d){const _0xa1f62b=a4_0xa1f6();return a4_0xbaa5=function(_0xbaa551,_0x3abf40){_0xbaa551=_0xbaa551-0x1d3;let _0x429c2d=_0xa1f62b[_0xbaa551];return _0x429c2d;},a4_0xbaa5(_0x19aa85,_0x4f1a3d);}const a4_0x58fb12=a4_0xbaa5;(function(_0x1809f5,_0x38393d){const _0x39e4d8=a4_0xbaa5,_0x2a7a7d=_0x1809f5();while(!![]){try{const _0x457c6c=parseInt(_0x39e4d8(0x21d))/0x1*(parseInt(_0x39e4d8(0x20c))/0x2)+-parseInt(_0x39e4d8(0x1f0))/0x3*(-parseInt(_0x39e4d8(0x203))/0x4)+parseInt(_0x39e4d8(0x1fb))/0x5*(-parseInt(_0x39e4d8(0x227))/0x6)+-parseInt(_0x39e4d8(0x214))/0x7*(-parseInt(_0x39e4d8(0x205))/0x8)+-parseInt(_0x39e4d8(0x223))/0x9+parseInt(_0x39e4d8(0x1d3))/0xa*(parseInt(_0x39e4d8(0x1f4))/0xb)+parseInt(_0x39e4d8(0x23c))/0xc;if(_0x457c6c===_0x38393d)break;else _0x2a7a7d['push'](_0x2a7a7d['shift']());}catch(_0x4304a4){_0x2a7a7d['push'](_0x2a7a7d['shift']());}}}(a4_0xa1f6,0x42db9));function a4_0xa1f6(){const _0x557b11=['onerror','hardwareConcurrency','convertTemKtoC','25089FfwPTF','value','times','lat','11NWlmWX','sort','ceil','plusOffset','lineWidth','minVal','getMinMax','431140yiYnNi','closePath','postMessage','values','filePath','minLng','all','getContext','116tPwiQj','val','7504KDKZOM','该时次未获取到文件','undefined','lng','sortFeaturesByArea','ring','clear','182iNZtPX','isArray','floor','clearMaskCache','data','FeatureCollection','gjLat','flat','1141xOgjtm','moveTo','map','indexOf','min','Feature','join','string','getJsonData','364zNVpTz','fillStyle','contours','createCanvas','round','area','4150062dsHYGO','strokeStyle','canvas','forEach','24sXESlH','getColorFast','scale','terminate','trim','getIsoBandsCanvasByMap','fill','lineTo','getIsoBandsFast','__area','plus','_maskCache','createElement','isNaN','#FFFFFF','_maskCacheKey','number','rgba(','from','toNumber','getIsoBandsByLayerBreak','1507968ZyEvtx','style','split','height','max','5256700glUJSG','Polygon','chunkArray','rgba(255,255,255,0)','get','width','properties','getAllGeo','replace','latLngToLayerPoint','minLat','buildGridCanvas','setParams','coordinates','push','module','minus','maxVal','length','abs','set','features','beginPath','getBreaks','gjLng','thresholds'];a4_0xa1f6=function(){return _0x557b11;};return a4_0xa1f6();}import{contours}from'd3-contour';import a4_0xf52b76 from'@turf/area';import{featureCollection as a4_0x44b509,point,polygon}from'@turf/helpers';import{booleanPointInPolygon}from'@turf/boolean-point-in-polygon';import a4_0x586e0f from'decimal.js';export class readFileM4{[a4_0x58fb12(0x1ff)]='';['nx']=0x0;['ny']=0x0;['minLng']=0x0;['minLat']=0x0;[a4_0x58fb12(0x1eb)]=0x0;[a4_0x58fb12(0x212)]=0x0;[a4_0x58fb12(0x1fe)]=[];[a4_0x58fb12(0x1e4)]=-Infinity;[a4_0x58fb12(0x1f9)]=Infinity;[a4_0x58fb12(0x236)]='';[a4_0x58fb12(0x232)]=new Map();constructor(_0x412dcd){const _0xf07f4c=a4_0x58fb12;this[_0xf07f4c(0x1ff)]=_0x412dcd||'';}async['start'](_0x56dd49){const _0x283335=a4_0x58fb12,_0x25f5e0=await fetch(this[_0x283335(0x1ff)]);if(!_0x25f5e0['ok'])return new Promise((_0x2cb58f,_0x345ba2)=>{const _0x579a58=_0x283335;_0x345ba2(new Error(_0x579a58(0x206)));});const _0x5a23e9=await _0x25f5e0['text'](),_0x262d21=_0x5a23e9[_0x283335(0x1db)](/\r\n/g,'\x0a')[_0x283335(0x1db)](/\r/g,'\x0a')[_0x283335(0x23e)]('\x0a');if(_0x262d21[_0x283335(0x1e5)]<0x4)return new Promise((_0x2d4b9e,_0x2b33b6)=>{_0x2b33b6(new Error('该时次文件数据异常'));});const _0x45de46=(_0x262d21[0x1]??'')[_0x283335(0x22b)]()[_0x283335(0x23e)](/\s+/);let _0x53645b=0x2;while(_0x45de46['length']<0x13){_0x45de46[_0x283335(0x1e1)](...(_0x262d21[_0x53645b]??'')[_0x283335(0x22b)]()[_0x283335(0x23e)](/\s+/)),_0x53645b++;}this[_0x283335(0x1eb)]=Number(_0x45de46[0x6]);const _0x3b5eeb=Number(_0x45de46[0x8]),_0x447851=Number(_0x45de46[0xa]),_0x1bd6da=Number(_0x45de46[0xb]);this['nx']=Number(_0x45de46[0xc]),this['ny']=Number(_0x45de46[0xd]),this[_0x283335(0x200)]=_0x3b5eeb,this[_0x283335(0x1dd)]=_0x447851,this['gjLat']=Math[_0x283335(0x1e6)](Number(_0x45de46[0x7]))*(_0x447851>_0x1bd6da?-0x1:0x1);const _0x54a9ac=this['nx']*this['ny'];let _0x2dc712=0x0;for(let _0x229cf3=_0x53645b;_0x229cf3<_0x262d21[_0x283335(0x1e5)]&&_0x2dc712<_0x54a9ac;_0x229cf3++){const _0x15a168=_0x262d21[_0x229cf3]?.[_0x283335(0x22b)]()??'',_0x20ee61=_0x15a168[_0x283335(0x23e)](/\s+/);if(!_0x20ee61||_0x20ee61[_0x283335(0x1e5)]===0x0)continue;for(let _0x4d1236=0x0;_0x4d1236<_0x20ee61[_0x283335(0x1e5)]&&_0x2dc712<_0x54a9ac;_0x4d1236++){let _0x5e9267=Number(_0x20ee61[_0x4d1236]);if(_0x56dd49?.[_0x283335(0x1ef)])_0x5e9267=new a4_0x586e0f(_0x5e9267)[_0x283335(0x1e3)](272.15)[_0x283335(0x23a)]();else _0x56dd49?.[_0x283335(0x1f7)]&&(_0x5e9267=new a4_0x586e0f(_0x5e9267)[_0x283335(0x231)](_0x56dd49[_0x283335(0x1f7)])[_0x283335(0x23a)]());this[_0x283335(0x1fe)][_0x283335(0x1e1)](_0x5e9267),this[_0x283335(0x1f9)]=Math['min'](this[_0x283335(0x1f9)],_0x5e9267),this['maxVal']=Math['max'](this[_0x283335(0x1e4)],_0x5e9267),_0x2dc712++;}}}[a4_0x58fb12(0x1df)](_0x44677b,_0x6cff16){const _0x55597e=a4_0x58fb12;this['nx']=_0x44677b['nx'],this['ny']=_0x44677b['ny'],this['minLng']=_0x44677b['minLng'],this[_0x55597e(0x1dd)]=_0x44677b[_0x55597e(0x1dd)],this[_0x55597e(0x1eb)]=_0x44677b['gjLng'],this[_0x55597e(0x212)]=_0x44677b['gjLat'];if(_0x6cff16?.['convertTemKtoC'])for(let _0x240889=0x0;_0x240889<_0x44677b[_0x55597e(0x1fe)][_0x55597e(0x1e5)];_0x240889++){if(typeof _0x44677b[_0x55597e(0x1fe)][_0x240889]===_0x55597e(0x207))continue;_0x44677b['values'][_0x240889]=new a4_0x586e0f(_0x44677b[_0x55597e(0x1fe)][_0x240889])[_0x55597e(0x1e3)](272.15)[_0x55597e(0x23a)]();}else{if(_0x6cff16?.[_0x55597e(0x1f7)])for(let _0x23c1af=0x0;_0x23c1af<_0x44677b['values'][_0x55597e(0x1e5)];_0x23c1af++){if(typeof _0x44677b[_0x55597e(0x1fe)][_0x23c1af]===_0x55597e(0x207))continue;_0x44677b['values'][_0x23c1af]=new a4_0x586e0f(_0x44677b['values'][_0x23c1af])[_0x55597e(0x231)](_0x6cff16['plusOffset'])['toNumber']();}else this['values']=_0x44677b[_0x55597e(0x1fe)];}this[_0x55597e(0x1fa)]();}[a4_0x58fb12(0x22f)](_0x82a614){const _0x35b5fd=a4_0x58fb12;if(this[_0x35b5fd(0x1fe)][_0x35b5fd(0x1e5)]===0x0)return{'type':_0x35b5fd(0x211),'features':[]};const _0x7b025a=[],_0xffe93=this[_0x35b5fd(0x1da)](_0x82a614),_0x1afa81=new a4_0x586e0f(this[_0x35b5fd(0x200)]),_0x56b91c=new a4_0x586e0f(this['minLat']),_0x344bcd=new a4_0x586e0f(this[_0x35b5fd(0x1eb)]),_0x26846b=new a4_0x586e0f(this['gjLat']);for(const _0x51b0cd of _0xffe93){for(const _0x3f017 of _0x51b0cd[_0x35b5fd(0x1e0)]){if(Array[_0x35b5fd(0x20d)](_0x3f017))for(const _0x3aea94 of _0x3f017){_0x3aea94[_0x35b5fd(0x226)](_0x35edf6=>{const _0x1bfc1b=_0x35b5fd,_0x90a352=_0x35edf6[0x0],_0x403299=_0x35edf6[0x1];if(_0x90a352==null||_0x403299==null||Number['isNaN'](_0x90a352)||Number[_0x1bfc1b(0x234)](_0x403299))return null;const _0x391b4a=_0x1afa81[_0x1bfc1b(0x231)](_0x344bcd[_0x1bfc1b(0x1f2)](_0x90a352))['toNumber'](),_0x2118f3=_0x56b91c[_0x1bfc1b(0x231)](_0x26846b[_0x1bfc1b(0x1f2)](_0x403299))['toNumber']();_0x35edf6[0x0]=_0x391b4a,_0x35edf6[0x1]=_0x2118f3;});}}_0x7b025a[_0x35b5fd(0x1e1)]({'type':_0x35b5fd(0x219),'properties':{'z':_0x51b0cd['value']},'geometry':_0x51b0cd});}return{'type':_0x35b5fd(0x211),'features':_0x7b025a};}['getIsoBandsCanvas'](_0x52498d,_0x593a79,_0x18a4b7){const _0x5513c6=a4_0x58fb12;if(this[_0x5513c6(0x1fe)][_0x5513c6(0x1e5)]===0x0)return null;const _0xdc00f7=this[_0x5513c6(0x1da)](_0x52498d),{canvas:_0x35ab01,ctx:_0x2939a5,width:_0x2c801e,height:_0x159abb}=this['createCanvas'](_0x18a4b7);if(!_0x2939a5)return null;for(const _0x4f2244 of _0xdc00f7){const _0x36f970=_0x4f2244['value'];_0x2939a5[_0x5513c6(0x1e9)]();for(const _0xde67a of _0x4f2244[_0x5513c6(0x1e0)]){if(Array[_0x5513c6(0x20d)](_0xde67a))for(const _0xde1585 of _0xde67a){_0xde1585['forEach']((_0xd135b5,_0x496914)=>{const _0x1e7ea1=_0x5513c6,_0x461c91=_0xd135b5[0x0],_0x4473ca=_0xd135b5[0x1];if(_0x461c91==null||_0x4473ca==null||Number[_0x1e7ea1(0x234)](_0x461c91)||Number[_0x1e7ea1(0x234)](_0x4473ca))return null;const _0xca4a21=_0x461c91/this['nx']*_0x2c801e,_0x4fc55f=_0x159abb-_0x4473ca/this['ny']*_0x159abb;_0x496914===0x0?_0x2939a5[_0x1e7ea1(0x215)](_0xca4a21,_0x4fc55f):_0x2939a5['lineTo'](_0xca4a21,_0x4fc55f);});}}_0x2939a5[_0x5513c6(0x1fc)](),_0x2939a5[_0x5513c6(0x21e)]=this[_0x5513c6(0x228)](_0x36f970,_0x52498d,_0x593a79),_0x2939a5['fill']();}return _0x35ab01;}[a4_0x58fb12(0x22c)](_0x566592,_0x3ada2b,_0x22184c,_0x139ded){const _0x148703=a4_0x58fb12;if(this['values'][_0x148703(0x1e5)]===0x0)return null;if(!_0x22184c)return null;const _0x2c9681=this[_0x148703(0x200)],_0x213969=this[_0x148703(0x1dd)],_0x48ef3c=_0x2c9681+this['nx']*this[_0x148703(0x1eb)],_0x2a5ccd=_0x213969+this['ny']*this[_0x148703(0x212)],_0x403dd3=_0x22184c[_0x148703(0x1dc)]([_0x2a5ccd,_0x2c9681]),_0x416d57=_0x22184c[_0x148703(0x1dc)]([_0x213969,_0x48ef3c]),_0x5726d1=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x221)](_0x416d57['x']-_0x403dd3['x'])),_0x8216d3=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x221)](_0x416d57['y']-_0x403dd3['y'])),_0x53ec06=_0x139ded?.['pixelRatio']||(typeof devicePixelRatio!=='undefined'?devicePixelRatio:0x1),_0x4d1356=document[_0x148703(0x233)](_0x148703(0x225)),_0x46d4f7=_0x4d1356[_0x148703(0x202)]('2d');_0x4d1356['width']=Math['max'](0x1,Math[_0x148703(0x20e)](_0x5726d1*_0x53ec06)),_0x4d1356[_0x148703(0x23f)]=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x20e)](_0x8216d3*_0x53ec06)),_0x4d1356['style'][_0x148703(0x1d8)]=_0x5726d1+'px',_0x4d1356[_0x148703(0x23d)][_0x148703(0x23f)]=_0x8216d3+'px';if(_0x46d4f7)_0x46d4f7[_0x148703(0x229)](_0x53ec06,_0x53ec06);const _0x41bd69=this['getAllGeo'](_0x566592);for(const _0x38f294 of _0x41bd69){const _0x3fbdf7=_0x38f294[_0x148703(0x1f1)];if(!_0x38f294[_0x148703(0x1e0)])continue;_0x46d4f7[_0x148703(0x1e9)]();for(const _0x145d22 of _0x38f294[_0x148703(0x1e0)]){if(Array[_0x148703(0x20d)](_0x145d22))for(const _0x29dac5 of _0x145d22){_0x29dac5[_0x148703(0x226)]((_0x3775b1,_0x31d21f)=>{const _0x4a3213=_0x148703,_0x4b7ac2=_0x3775b1[0x0],_0x29cf39=_0x3775b1[0x1];if(_0x4b7ac2==null||_0x29cf39==null||Number['isNaN'](_0x4b7ac2)||Number[_0x4a3213(0x234)](_0x29cf39))return;const _0x2ce888=_0x2c9681+_0x4b7ac2*this[_0x4a3213(0x1eb)],_0x43b2f4=_0x213969+_0x29cf39*this[_0x4a3213(0x212)],_0x5a05da=_0x22184c[_0x4a3213(0x1dc)]([_0x43b2f4,_0x2ce888]),_0x8e685b=_0x5a05da['x']-_0x403dd3['x'],_0x50f2ab=_0x5a05da['y']-_0x403dd3['y'];if(_0x31d21f===0x0)_0x46d4f7[_0x4a3213(0x215)](_0x8e685b,_0x50f2ab);else _0x46d4f7[_0x4a3213(0x22e)](_0x8e685b,_0x50f2ab);});}}_0x46d4f7[_0x148703(0x1fc)](),_0x46d4f7[_0x148703(0x21e)]=this[_0x148703(0x228)](_0x3fbdf7,_0x566592,_0x3ada2b),_0x46d4f7[_0x148703(0x22d)]();}return _0x4d1356;}[a4_0x58fb12(0x228)](_0x49a8c5,_0x3c3c9c,_0x129cbd){const _0x311156=a4_0x58fb12;let _0x575d0b=_0x311156(0x1d6);const _0x366dc5=_0x3c3c9c[_0x311156(0x217)](_0x49a8c5);if(typeof _0x129cbd[_0x366dc5]==_0x311156(0x21b))_0x575d0b=_0x129cbd[_0x366dc5];else _0x366dc5!==-0x1&&(_0x575d0b=_0x311156(0x238)+_0x129cbd[_0x366dc5][0x0]+','+_0x129cbd[_0x366dc5][0x1]+','+_0x129cbd[_0x366dc5][0x2]+','+(_0x129cbd[_0x366dc5][0x3]||_0x129cbd[_0x366dc5][0x3]===0x0?_0x129cbd[_0x366dc5][0x3]:0x1)+')');return _0x575d0b;}async['clipDataByJson'](_0x56b179,_0x18f97b,_0x48f036,_0x45a6bc){const _0x306219=a4_0x58fb12,_0x2f8f5c=_0x45a6bc||(navigator[_0x306219(0x1ee)]-0x4||0x1),_0x4d5ba9=Math[_0x306219(0x218)](_0x2f8f5c,Math[_0x306219(0x240)](0x1,_0x56b179[_0x306219(0x1e8)][_0x306219(0x1e5)])),_0x2bd86e=this['chunkArray'](_0x56b179[_0x306219(0x1e8)],_0x4d5ba9),_0xafe56c=[],_0x3cc224=_0x2bd86e[_0x306219(0x216)](_0x52eff6=>{const _0xd42f2=_0x306219,_0x41d398=new Worker(_0x48f036,{'type':'module'});return _0xafe56c[_0xd42f2(0x1e1)](_0x41d398),new Promise(_0x308c48=>{const _0x9d9f93=_0xd42f2;_0x41d398['onmessage']=_0x3868fa=>{_0x308c48(_0x3868fa['data']['features']);},_0x41d398[_0x9d9f93(0x1ed)]=_0x27d4d5=>{console['error'](_0x27d4d5);},_0x41d398[_0x9d9f93(0x1fd)]({'isoChunk':_0x52eff6,'gansuFeatures':_0x18f97b[_0x9d9f93(0x1e8)]});});}),_0x56cf69=await Promise[_0x306219(0x201)](_0x3cc224);_0xafe56c[_0x306219(0x226)](_0x110e18=>_0x110e18[_0x306219(0x22a)]());const _0x4b9bf4=_0x56cf69[_0x306219(0x213)]();return a4_0x44b509(_0x4b9bf4);}async['getIsoBandsFastByWorker'](_0x48a5aa,_0xedef01,_0x38f980){const _0x1b8b3e=a4_0x58fb12;if(this['values']['length']===0x0)return{'type':_0x1b8b3e(0x211),'features':[]};let _0x2e821b=[];if(_0x48a5aa[_0x1b8b3e(0x1e5)]===0x0)_0x48a5aa=this['getBreaks']();const _0x53bd47=[],_0x33862b=_0x38f980||(navigator['hardwareConcurrency']-0x4||0x1),_0x3ff440=Math[_0x1b8b3e(0x218)](_0x33862b,Math[_0x1b8b3e(0x240)](0x1,_0x48a5aa[_0x1b8b3e(0x1e5)])),_0x975b94=this[_0x1b8b3e(0x1d5)](_0x48a5aa,_0x3ff440),_0x172069=_0x975b94['map'](_0x4e8b8f=>{const _0xc4adeb=_0x1b8b3e,_0x40c9a4=new Worker(_0xedef01,{'type':_0xc4adeb(0x1e2)});return _0x53bd47[_0xc4adeb(0x1e1)](_0x40c9a4),new Promise(_0x1e283f=>{const _0x37fc37=_0xc4adeb;_0x40c9a4['onmessage']=_0x2a2755=>{const _0x3762bb=a4_0xbaa5;_0x1e283f(_0x2a2755[_0x3762bb(0x210)][_0x3762bb(0x1e8)]);},_0x40c9a4[_0x37fc37(0x1ed)]=_0x2737af=>{console['error'](_0x2737af);},_0x40c9a4['postMessage']({'breaks':_0x4e8b8f,'values':this[_0x37fc37(0x1fe)],'nx':this['nx'],'ny':this['ny'],'minVal':this['minVal'],'maxVal':this[_0x37fc37(0x1e4)],'minLng':this[_0x37fc37(0x200)],'minLat':this[_0x37fc37(0x1dd)],'gjLng':this[_0x37fc37(0x1eb)],'gjLat':this[_0x37fc37(0x212)]});});}),_0x8e8eae=await Promise[_0x1b8b3e(0x201)](_0x172069);return _0x53bd47[_0x1b8b3e(0x226)](_0x49e106=>_0x49e106[_0x1b8b3e(0x22a)]()),_0x8e8eae[_0x1b8b3e(0x226)](_0x209a72=>{const _0x8d9740=_0x1b8b3e;_0x2e821b[_0x8d9740(0x1e1)](..._0x209a72);}),_0x2e821b=this[_0x1b8b3e(0x209)](_0x2e821b),{'type':'FeatureCollection','features':_0x2e821b};}[a4_0x58fb12(0x20f)](){const _0x1429e5=a4_0x58fb12;this[_0x1429e5(0x232)]['clear']();}[a4_0x58fb12(0x23b)](_0x39d255=[],_0x352ffd){const _0x27a0d6=a4_0x58fb12;if(typeof _0x352ffd!==_0x27a0d6(0x207)&&this['_maskCache'][_0x27a0d6(0x1d7)](_0x352ffd)){const _0x4344e5=this['_maskCache'][_0x27a0d6(0x1d7)](_0x352ffd)||[],_0x350527=this[_0x27a0d6(0x209)]?this[_0x27a0d6(0x209)](_0x4344e5):_0x4344e5;return{'type':_0x27a0d6(0x211),'features':_0x350527};}if(this[_0x27a0d6(0x1fe)][_0x27a0d6(0x1e5)]===0x0)return{'type':'FeatureCollection','features':[]};if(_0x39d255[_0x27a0d6(0x1e5)]===0x0)_0x39d255=this[_0x27a0d6(0x1ea)]();const _0x505d9c=_0x39d255[_0x27a0d6(0x21a)](',');if(this[_0x27a0d6(0x236)]!==_0x505d9c){this['_maskCacheKey']=_0x505d9c,this[_0x27a0d6(0x232)][_0x27a0d6(0x20b)]();const _0x1234da=this[_0x27a0d6(0x200)],_0x3a34f2=this[_0x27a0d6(0x1dd)],_0x432ca5=this[_0x27a0d6(0x1eb)],_0x1d0be8=this[_0x27a0d6(0x212)],_0x38e545=_0x545613=>{const _0x88c2a6=_0x27a0d6;let _0x5e8a06=0x0;for(let _0x1b1e6c=0x0,_0xfba66d=_0x545613[_0x88c2a6(0x1e5)];_0x1b1e6c<_0xfba66d;_0x1b1e6c++){const _0x2c13e2=_0x545613[_0x1b1e6c][0x0],_0x500f41=_0x545613[_0x1b1e6c][0x1],_0x54bed5=_0x545613[(_0x1b1e6c+0x1)%_0xfba66d][0x0],_0x4a4a65=_0x545613[(_0x1b1e6c+0x1)%_0xfba66d][0x1];if(_0x2c13e2==null||_0x500f41==null||_0x54bed5==null||_0x4a4a65==null)continue;_0x5e8a06+=_0x2c13e2*_0x4a4a65-_0x54bed5*_0x500f41;}return _0x5e8a06/0x2;},_0xa7a576=(_0x1bdac4,_0x5b30d5)=>{const _0x5bed97=_0x27a0d6;if(!_0x1bdac4)return![];const _0x184d67=_0x1bdac4[0x0],_0x179d08=_0x1bdac4[0x1];let _0x472933=![];for(let _0x5109e0=0x0,_0x53383e=_0x5b30d5[_0x5bed97(0x1e5)]-0x1;_0x5109e0<_0x5b30d5['length'];_0x53383e=_0x5109e0++){const _0x1f6e28=_0x5b30d5[_0x5109e0][0x0],_0xde2b9f=_0x5b30d5[_0x5109e0][0x1],_0x24e4a9=_0x5b30d5[_0x53383e][0x0],_0x2d1938=_0x5b30d5[_0x53383e][0x1],_0x226fab=_0xde2b9f>_0x179d08!==_0x2d1938>_0x179d08&&_0x184d67<(_0x24e4a9-_0x1f6e28)*(_0x179d08-_0xde2b9f)/(_0x2d1938-_0xde2b9f)+_0x1f6e28;if(_0x226fab)_0x472933=!_0x472933;}return _0x472933;},_0x1580f2=_0x308cac=>{const _0x423aa1=_0x27a0d6,_0x4eb204=[];let _0x563033=null,_0xad7b56=null;for(let _0x501dd8=0x0;_0x501dd8<_0x308cac['length'];_0x501dd8++){const _0x538468=_0x308cac[_0x501dd8];if(!_0x538468)continue;const _0x54ff37=_0x538468[0x0],_0x31f6e2=_0x538468[0x1];if(_0x54ff37==null||_0x31f6e2==null||Number['isNaN'](_0x54ff37)||Number['isNaN'](_0x31f6e2))continue;const _0x562e50=_0x1234da+_0x54ff37*_0x432ca5,_0xe3a0e0=_0x3a34f2+_0x31f6e2*_0x1d0be8;if(_0x563033!==null&&_0xad7b56!==null&&_0x563033===_0x562e50&&_0xad7b56===_0xe3a0e0){_0x563033=_0x562e50,_0xad7b56=_0xe3a0e0;continue;}_0x4eb204[_0x423aa1(0x1e1)]([_0x562e50,_0xe3a0e0]),_0x563033=_0x562e50,_0xad7b56=_0xe3a0e0;}if(_0x4eb204['length']===0x0)return _0x4eb204;const _0x37ed2d=_0x4eb204[0x0],_0x21ef6d=_0x4eb204[_0x4eb204['length']-0x1];if(_0x37ed2d[0x0]!==_0x21ef6d[0x0]||_0x37ed2d[0x1]!==_0x21ef6d[0x1])_0x4eb204[_0x423aa1(0x1e1)]([_0x37ed2d[0x0],_0x37ed2d[0x1]]);return _0x4eb204;},_0x2ab71e=_0x39d255[_0x27a0d6(0x1e5)]-0x1;for(let _0xc3e244=0x0;_0xc3e244<_0x39d255[_0x27a0d6(0x1e5)];_0xc3e244++){const _0x1fbdc5=_0x39d255[_0xc3e244],_0xb7ad24=_0xc3e244<_0x2ab71e?_0x39d255[_0xc3e244+0x1]:Infinity,_0x204392=Array[_0x27a0d6(0x239)]({'length':this['values']['length']});let _0xe2627d=![];for(let _0x4d5203=0x0;_0x4d5203<this['values'][_0x27a0d6(0x1e5)];_0x4d5203++){const _0x1968a5=this[_0x27a0d6(0x1fe)][_0x4d5203],_0x205a85=_0x1968a5>=_0x1fbdc5&&_0x1968a5<_0xb7ad24?0x1:0x0;if(_0x205a85)_0xe2627d=!![];_0x204392[_0x4d5203]=_0x205a85;}if(!_0xe2627d)continue;const _0x4a25e7=contours()['size']([this['nx'],this['ny']])['thresholds']([0.5]),_0x54a8be=_0x4a25e7[_0x27a0d6(0x21f)]?_0x4a25e7[_0x27a0d6(0x21f)](_0x204392):_0x4a25e7(_0x204392);if(!_0x54a8be||_0x54a8be[_0x27a0d6(0x1e5)]===0x0)continue;const _0xcfba49=[];for(const _0x2564af of _0x54a8be){const _0x1ba847=_0x2564af&&_0x2564af[_0x27a0d6(0x1e0)];if(!_0x1ba847)continue;for(const _0x5ba6d0 of _0x1ba847){let _0x4d876f=[];if(Array['isArray'](_0x5ba6d0)&&_0x5ba6d0['length']>0x0&&typeof _0x5ba6d0[0x0][0x0]===_0x27a0d6(0x237))_0x4d876f=[_0x5ba6d0];else{if(Array[_0x27a0d6(0x20d)](_0x5ba6d0))_0x4d876f=_0x5ba6d0;else continue;}const _0x23fefc=_0x4d876f[_0x27a0d6(0x216)](_0xa96440=>({'ring':_0xa96440,'area':Math[_0x27a0d6(0x1e6)](_0x38e545(_0xa96440))}))['sort']((_0x5c8852,_0xe137fc)=>_0xe137fc[_0x27a0d6(0x222)]-_0x5c8852['area']),_0xa0162=Array[_0x27a0d6(0x239)]({'length':_0x23fefc['length']})[_0x27a0d6(0x22d)](![]);for(let _0x12bb70=0x0;_0x12bb70<_0x23fefc[_0x27a0d6(0x1e5)];_0x12bb70++){if(_0xa0162[_0x12bb70])continue;const _0x3765ad=_0x23fefc[_0x12bb70][_0x27a0d6(0x20a)];_0xa0162[_0x12bb70]=!![];const _0x5db067=[];for(let _0x39d2d1=0x0;_0x39d2d1<_0x23fefc['length'];_0x39d2d1++){if(_0xa0162[_0x39d2d1])continue;const _0x32f744=_0x23fefc[_0x39d2d1][_0x27a0d6(0x20a)],_0x5bd08c=_0x32f744[0x0];_0x5bd08c&&_0xa7a576(_0x5bd08c,_0x3765ad)&&(_0x5db067[_0x27a0d6(0x1e1)](_0x32f744),_0xa0162[_0x39d2d1]=!![]);}const _0x284582=_0x1580f2(_0x3765ad);if(_0x284582['length']<0x4)continue;const _0x10fc92=[];for(const _0x5f454c of _0x5db067){const _0x466226=_0x1580f2(_0x5f454c);if(_0x466226['length']>=0x4)_0x10fc92['push'](_0x466226);}_0xcfba49[_0x27a0d6(0x1e1)]({'type':_0x27a0d6(0x219),'properties':{'z':_0x1fbdc5},'geometry':{'type':_0x27a0d6(0x1d4),'coordinates':[_0x284582,..._0x10fc92]}});}}}_0xcfba49[_0x27a0d6(0x1e5)]&&this[_0x27a0d6(0x232)][_0x27a0d6(0x1e7)](_0x1fbdc5,_0xcfba49);}}if(typeof _0x352ffd!==_0x27a0d6(0x207)){const _0x2968a7=this[_0x27a0d6(0x232)][_0x27a0d6(0x1d7)](_0x352ffd)||[],_0x3012f3=this[_0x27a0d6(0x209)]?this['sortFeaturesByArea'](_0x2968a7):_0x2968a7;return{'type':_0x27a0d6(0x211),'features':_0x3012f3};}const _0x49877b=[];for(const _0x1b9f64 of this['_maskCache'][_0x27a0d6(0x1fe)]()){_0x49877b[_0x27a0d6(0x1e1)](..._0x1b9f64);}const _0x67d39a=this[_0x27a0d6(0x209)]?this['sortFeaturesByArea'](_0x49877b):_0x49877b;return{'type':_0x27a0d6(0x211),'features':_0x67d39a};}[a4_0x58fb12(0x21c)](){const _0x428737=a4_0x58fb12,_0x143692=Array[_0x428737(0x239)]({'length':this['nx']});for(let _0x11e6c7=0x0;_0x11e6c7<this['nx'];_0x11e6c7++){_0x143692[_0x11e6c7]=new a4_0x586e0f(this[_0x428737(0x200)])[_0x428737(0x231)](new a4_0x586e0f(_0x11e6c7)[_0x428737(0x1f2)](this[_0x428737(0x1eb)]))[_0x428737(0x23a)]();}const _0x432c76=Array[_0x428737(0x239)]({'length':this['ny']});for(let _0x3598c5=0x0;_0x3598c5<this['ny'];_0x3598c5++){_0x432c76[_0x3598c5]=new a4_0x586e0f(this[_0x428737(0x1dd)])[_0x428737(0x231)](new a4_0x586e0f(_0x3598c5)[_0x428737(0x1f2)](this['gjLat']))['toNumber']();}const _0x1350d6=Array[_0x428737(0x239)]({'length':this['nx']*this['ny']});for(let _0x2c4402=0x0;_0x2c4402<this[_0x428737(0x1fe)][_0x428737(0x1e5)];_0x2c4402++){const _0x3c868b=Math[_0x428737(0x20e)](_0x2c4402/this['nx']),_0x4929b3=_0x2c4402%this['nx'],_0x4dd0b8=_0x143692[_0x4929b3],_0x2c48c5=_0x432c76[_0x3c868b],_0x168f57=this[_0x428737(0x1fe)][_0x2c4402];_0x2c48c5&&_0x4dd0b8&&(_0x1350d6[_0x2c4402]={'lng':_0x4dd0b8,'lat':_0x2c48c5,'val':_0x168f57});}return _0x1350d6;}[a4_0x58fb12(0x1de)](_0x23ec60){const _0x22896f=a4_0x58fb12;if(this['nx']<=0x0||this['ny']<=0x0||this[_0x22896f(0x1eb)]===0x0||this[_0x22896f(0x212)]===0x0)return null;const {canvas:_0x2ca775,ctx:_0x47c717,width:_0x250645,height:_0x18c5f1}=this['createCanvas'](_0x23ec60);if(!_0x47c717)return null;const _0x420ffa=_0x250645/this['nx'],_0x8996f7=_0x18c5f1/this['ny'];_0x47c717[_0x22896f(0x1e9)](),_0x47c717[_0x22896f(0x224)]=_0x23ec60?.['strokeStyle']||_0x22896f(0x235),_0x47c717[_0x22896f(0x1f8)]=_0x23ec60?.[_0x22896f(0x1f8)]||0x1;for(let _0x282846=0x0;_0x282846<=this['nx'];_0x282846++){_0x47c717['moveTo'](_0x420ffa*_0x282846,0x0),_0x47c717[_0x22896f(0x22e)](_0x420ffa*_0x282846,_0x18c5f1);}for(let _0x35e219=0x0;_0x35e219<=this['ny'];_0x35e219++){_0x47c717[_0x22896f(0x215)](0x0,_0x8996f7*_0x35e219),_0x47c717['lineTo'](_0x250645,_0x8996f7*_0x35e219);}return _0x47c717['stroke'](),_0x47c717[_0x22896f(0x1fc)](),_0x2ca775;}['updateGridCanvas'](_0x1eae9c,_0x5cbd9f){const _0x3b7fbc=a4_0x58fb12,_0x3c9ad7=[];_0x1eae9c['map'](_0xc34b83=>{const _0x5a53cb=a4_0xbaa5;_0x3c9ad7[_0x5a53cb(0x1e1)]([_0xc34b83[_0x5a53cb(0x208)],_0xc34b83[_0x5a53cb(0x1f3)]]);});_0x3c9ad7[_0x3b7fbc(0x1e5)]>0x3&&_0x1eae9c[_0x3b7fbc(0x1e5)]>0x3&&_0x3c9ad7[_0x3b7fbc(0x1e1)]([_0x1eae9c[0x0][_0x3b7fbc(0x208)],_0x1eae9c[0x0][_0x3b7fbc(0x1f3)]]);const _0x4e3ac5=polygon([_0x3c9ad7]),_0x233292=[],_0x11ceb3=this['getJsonData']();return _0x11ceb3['map'](_0x19d6d4=>{const _0x5e004d=_0x3b7fbc,_0xa328d6=point([_0x19d6d4['lng'],_0x19d6d4[_0x5e004d(0x1f3)]]);booleanPointInPolygon(_0xa328d6,_0x4e3ac5)&&(_0x233292['push']({'lat':_0x19d6d4[_0x5e004d(0x1f3)],'lng':_0x19d6d4['lng']}),_0x19d6d4[_0x5e004d(0x204)]=_0x5cbd9f);}),this[_0x3b7fbc(0x1fe)]=_0x11ceb3[_0x3b7fbc(0x216)](_0x1c1587=>_0x1c1587['val']),_0x233292;}[a4_0x58fb12(0x1fa)](){const _0x4d4707=a4_0x58fb12;let _0x5cc00f=-Infinity,_0x15358d=Infinity;for(let _0x200532=0x0;_0x200532<this[_0x4d4707(0x1fe)][_0x4d4707(0x1e5)];_0x200532++){const _0x1256f7=this['values'][_0x200532];if(_0x1256f7&&_0x1256f7>_0x5cc00f)_0x5cc00f=_0x1256f7;if(_0x1256f7&&_0x1256f7<_0x15358d)_0x15358d=_0x1256f7;}this[_0x4d4707(0x1f9)]=_0x15358d,this[_0x4d4707(0x1e4)]=_0x5cc00f;}[a4_0x58fb12(0x209)](_0x2c3307){const _0x1fa35f=a4_0x58fb12;return _0x2c3307['map'](_0x3bf713=>{const _0xaa71a2=a4_0xbaa5;try{const _0x4180c0=a4_0xf52b76(_0x3bf713)||0x0;_0x3bf713['properties']={..._0x3bf713[_0xaa71a2(0x1d9)]||{},'__area':_0x4180c0};}catch{_0x3bf713[_0xaa71a2(0x1d9)]={..._0x3bf713[_0xaa71a2(0x1d9)]||{},'__area':0x0};}return _0x3bf713;})[_0x1fa35f(0x1f5)]((_0x16afa6,_0x122631)=>_0x122631[_0x1fa35f(0x1d9)][_0x1fa35f(0x230)]-_0x16afa6[_0x1fa35f(0x1d9)]['__area'])['filter'](_0x49de6b=>_0x49de6b['properties']&&_0x1fa35f(0x230)in _0x49de6b[_0x1fa35f(0x1d9)]&&_0x49de6b[_0x1fa35f(0x1d9)][_0x1fa35f(0x230)]!==0x0)[_0x1fa35f(0x216)](_0x425946=>{const _0x470a70=_0x1fa35f;if(_0x425946['properties']&&_0x470a70(0x230)in _0x425946['properties']){const {__area:_0x1f5c90,..._0x25a000}=_0x425946['properties'];_0x425946[_0x470a70(0x1d9)]=_0x25a000;}return _0x425946;});}['chunkArray']=(_0x42d427,_0x5c2358)=>{const _0x4f0340=a4_0x58fb12,_0xd61954=[],_0x1e2603=Math[_0x4f0340(0x240)](0x1,Math[_0x4f0340(0x1f6)](_0x42d427[_0x4f0340(0x1e5)]/_0x5c2358));for(let _0x1cf073=0x0;_0x1cf073<_0x5c2358;_0x1cf073++){_0xd61954[_0x4f0340(0x1e1)](_0x42d427['slice'](_0x1cf073*_0x1e2603,(_0x1cf073+0x1)*_0x1e2603));}return _0xd61954;};[a4_0x58fb12(0x1ea)](){const _0x22f97f=a4_0x58fb12,_0x11c3f6=[];if(this[_0x22f97f(0x1f9)]===Infinity||this[_0x22f97f(0x1e4)]===-Infinity)return _0x11c3f6;for(let _0xc0a823=this[_0x22f97f(0x1f9)]-0x1;_0xc0a823<=this['maxVal']+0x1;_0xc0a823++){_0x11c3f6[_0x22f97f(0x1e1)](_0xc0a823);}return _0x11c3f6;}[a4_0x58fb12(0x1da)]=_0x53558a=>{const _0x3e7bae=a4_0x58fb12;if(_0x53558a[_0x3e7bae(0x1e5)]===0x0)_0x53558a=this['getBreaks']();const _0x59c8f1=[];for(let _0x43a74c=0x0;_0x43a74c<_0x53558a[_0x3e7bae(0x1e5)];_0x43a74c++){const _0x6fd80d=_0x53558a[_0x43a74c],_0x31f204=_0x43a74c<_0x53558a['length']-0x1?_0x53558a[_0x43a74c+0x1]:Infinity;if(_0x6fd80d==null||_0x31f204==null)continue;if(_0x6fd80d<this[_0x3e7bae(0x1f9)]&&_0x31f204<this[_0x3e7bae(0x1f9)])continue;if(_0x6fd80d>this[_0x3e7bae(0x1e4)]&&_0x31f204>this[_0x3e7bae(0x1e4)])continue;_0x59c8f1['push'](_0x6fd80d);}const _0x2af54d=contours()['size']([this['nx'],this['ny']])[_0x3e7bae(0x1ec)](_0x59c8f1);return _0x2af54d(this[_0x3e7bae(0x1fe)]);};[a4_0x58fb12(0x220)]=_0x3b8d8f=>{const _0xd5bd44=a4_0x58fb12,_0x46b35c=Math[_0xd5bd44(0x20e)]((_0x3b8d8f?.['width']||Math[_0xd5bd44(0x221)](this['nx']/0x400)*0x400*0x2)/this['nx'])*this['nx'],_0x19d88b=_0x46b35c/this['nx']*this['ny'],_0xe15bfb=_0x3b8d8f?.['pixelRatio']||(typeof devicePixelRatio!==_0xd5bd44(0x207)?devicePixelRatio:0x1),_0x4ea6a9=document[_0xd5bd44(0x233)]('canvas'),_0x445c8a=_0x4ea6a9['getContext']('2d');return _0x4ea6a9['width']=_0x46b35c*_0xe15bfb,_0x4ea6a9[_0xd5bd44(0x23f)]=_0x19d88b*_0xe15bfb,_0x445c8a[_0xd5bd44(0x229)](_0xe15bfb,_0xe15bfb),{'canvas':_0x4ea6a9,'ctx':_0x445c8a,'width':_0x46b35c,'height':_0x19d88b};};}export default readFileM4;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { FeatureCollection } from 'geojson';
|
|
2
|
+
export interface IReadFileM4 {
|
|
3
|
+
filePath: string;
|
|
4
|
+
nx: number;
|
|
5
|
+
ny: number;
|
|
6
|
+
minLng: number;
|
|
7
|
+
minLat: number;
|
|
8
|
+
gjLng: number;
|
|
9
|
+
gjLat: number;
|
|
10
|
+
values: number[];
|
|
11
|
+
maxVal: number;
|
|
12
|
+
minVal: number;
|
|
13
|
+
/**
|
|
14
|
+
* 开始解析文件
|
|
15
|
+
* @param config
|
|
16
|
+
*/
|
|
17
|
+
start: (config?: ReadConfig) => Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* 自定义数据, 使用他不需要接文件, 也不需要执行start(). 但是需要提供详细的数据
|
|
20
|
+
* @param params
|
|
21
|
+
* @param config
|
|
22
|
+
*/
|
|
23
|
+
setParams: (params: ParamsConfig, config?: ReadConfig) => void;
|
|
24
|
+
/**
|
|
25
|
+
* 获取等值带
|
|
26
|
+
* @param breaks
|
|
27
|
+
*/
|
|
28
|
+
getIsoBandsFast: (breaks: number[]) => FeatureCollection;
|
|
29
|
+
/**
|
|
30
|
+
* 获取等值带 Canvas
|
|
31
|
+
* @param breaks
|
|
32
|
+
* @param colors
|
|
33
|
+
* @param options : { width?: number, height?: number, pixelRatio?: number }
|
|
34
|
+
*/
|
|
35
|
+
getIsoBandsCanvas: (breaks: number[], colors: (number[] | string)[], options?: CanvasOptions) => HTMLCanvasElement | null;
|
|
36
|
+
/**
|
|
37
|
+
* 提取分级对应的颜色
|
|
38
|
+
* @param z 当前分级
|
|
39
|
+
* @param level 分级数组
|
|
40
|
+
* @param color 分级颜色数组
|
|
41
|
+
*/
|
|
42
|
+
getColorFast: (z: number | string, level: (number | string)[], color: (number[] | string)[]) => string;
|
|
43
|
+
/**
|
|
44
|
+
* 裁剪数据
|
|
45
|
+
* @param iosBands 等值带数据
|
|
46
|
+
* @param json 裁剪范围数据
|
|
47
|
+
* @param intersectWorkerUrl 裁剪 Worker 脚本 URL
|
|
48
|
+
* @param useCpuCount 可选,使用的 CPU 核心数
|
|
49
|
+
*/
|
|
50
|
+
clipDataByJson: (iosBands: FeatureCollection, json: FeatureCollection, intersectWorkerUrl: string, useCpuCount?: number) => Promise<FeatureCollection>;
|
|
51
|
+
/**
|
|
52
|
+
* 使用 Worker 多线程获取等值带
|
|
53
|
+
* @param breaks 等值带分级
|
|
54
|
+
* @param bandsWorkerUrl 等值带计算 Worker 脚本 URL
|
|
55
|
+
* @param useCpuCount 可选,使用的 CPU 核心数
|
|
56
|
+
* @deprecated 即将弃用, 请使用 `getIsoBandsFast`
|
|
57
|
+
*/
|
|
58
|
+
getIsoBandsFastByWorker: (breaks: number[], bandsWorkerUrl: string, useCpuCount?: number) => Promise<FeatureCollection>;
|
|
59
|
+
/**
|
|
60
|
+
* 清理等值带缓存 (缓存只在 getIsoBandsByLayerBreak 方法中使用)
|
|
61
|
+
* @deprecated 准备弃用, 分层使用canvas来做
|
|
62
|
+
*/
|
|
63
|
+
clearMaskCache: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* 获取等值带 (支持按层获取或全部层合并获取)
|
|
66
|
+
* - 单层因为数据丢失可能不准确
|
|
67
|
+
* @param breaks
|
|
68
|
+
* @param layerLower
|
|
69
|
+
* @deprecated 准备弃用, 分层使用canvas来做
|
|
70
|
+
*/
|
|
71
|
+
getIsoBandsByLayerBreak: (breaks?: number[], layerLower?: number) => FeatureCollection;
|
|
72
|
+
/**
|
|
73
|
+
* 获取 JSON 数据数组
|
|
74
|
+
* @return JSONData[]
|
|
75
|
+
*/
|
|
76
|
+
getJsonData: () => JSONData[];
|
|
77
|
+
/**
|
|
78
|
+
* 构建一个网格网格 Canvas, 用于在融合模式下展示网格线, 网格的依据来源于数据的经纬度和分辨率
|
|
79
|
+
*/
|
|
80
|
+
buildGridCanvas: (options?: CanvasOptions) => HTMLCanvasElement | null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 读取文件对数据的处理
|
|
84
|
+
*/
|
|
85
|
+
export interface ReadConfig {
|
|
86
|
+
/**
|
|
87
|
+
* 是否将温度从开尔文转换为摄氏度(如果数据确实是温度的话)
|
|
88
|
+
*/
|
|
89
|
+
convertTemKtoC?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 附加偏移量 (如果需要对数值进行调整)
|
|
92
|
+
*/
|
|
93
|
+
plusOffset?: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 设置数据参数
|
|
97
|
+
*/
|
|
98
|
+
export interface ParamsConfig {
|
|
99
|
+
/**
|
|
100
|
+
* 数据值数组
|
|
101
|
+
*/
|
|
102
|
+
values: number[];
|
|
103
|
+
/**
|
|
104
|
+
* 栅格列数
|
|
105
|
+
*/
|
|
106
|
+
nx: number;
|
|
107
|
+
/**
|
|
108
|
+
* 栅格行数
|
|
109
|
+
*/
|
|
110
|
+
ny: number;
|
|
111
|
+
/**
|
|
112
|
+
* 最小经度
|
|
113
|
+
*/
|
|
114
|
+
minLng: number;
|
|
115
|
+
/**
|
|
116
|
+
* 最小纬度
|
|
117
|
+
*/
|
|
118
|
+
minLat: number;
|
|
119
|
+
/**
|
|
120
|
+
* 经度分辨率
|
|
121
|
+
*/
|
|
122
|
+
gjLng: number;
|
|
123
|
+
/**
|
|
124
|
+
* 纬度分辨率
|
|
125
|
+
*/
|
|
126
|
+
gjLat: number;
|
|
127
|
+
}
|
|
128
|
+
export interface Point {
|
|
129
|
+
lat: number;
|
|
130
|
+
lng: number;
|
|
131
|
+
}
|
|
132
|
+
export interface JSONData extends Point {
|
|
133
|
+
val: number;
|
|
134
|
+
}
|
|
135
|
+
export interface CanvasOptions {
|
|
136
|
+
width?: number;
|
|
137
|
+
height?: number;
|
|
138
|
+
pixelRatio?: number;
|
|
139
|
+
strokeStyle?: string;
|
|
140
|
+
lineWidth?: number;
|
|
141
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "m4-w-fast",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build:types": "tsc -p tsconfig.build.json",
|
|
18
18
|
"obfuscate": "javascript-obfuscator dist --output dist",
|
|
19
|
-
"build": "npm run build:types && npm run build:rollup && npm run obfuscate",
|
|
19
|
+
"build": "npm run build:types && npm run build:rollup && npm run build:browser && npm run obfuscate",
|
|
20
20
|
"prepublishOnly": "npm run build",
|
|
21
|
-
"build:rollup": "rollup -c"
|
|
21
|
+
"build:rollup": "rollup -c",
|
|
22
|
+
"build:browser": "rollup -c rollup.config.browser.js"
|
|
22
23
|
},
|
|
24
|
+
"browser": "dist/m4-w-fast.umd.js",
|
|
23
25
|
"author": "wangrl",
|
|
24
26
|
"license": "ISC",
|
|
25
27
|
"type": "module",
|
|
@@ -41,9 +43,11 @@
|
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
45
|
"@turf/area": "^7.2.0",
|
|
46
|
+
"@turf/boolean-point-in-polygon": "^7.3.1",
|
|
44
47
|
"@turf/isobands": "^7.2.0",
|
|
45
48
|
"@turf/isolines": "^7.2.0",
|
|
46
49
|
"@turf/turf": "^6.5.0",
|
|
50
|
+
"@types/leaflet": "^1.9.21",
|
|
47
51
|
"d3-contour": "^4",
|
|
48
52
|
"decimal.js": "^10.6.0"
|
|
49
53
|
},
|