m4-w-fast 1.0.8 → 1.0.9

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.
@@ -82,7 +82,9 @@ export declare class readFileM4 implements IReadFileM4 {
82
82
  * @return JSONData[]
83
83
  */
84
84
  getJsonData(): JSONData[];
85
- buildGridCanvas(options?: CanvasOptions): HTMLCanvasElement | null;
85
+ buildGridLineCanvas(options?: CanvasOptions): HTMLCanvasElement | null;
86
+ buildGridCanvas(breaks: number[], colors: (number[] | string)[], options?: CanvasOptions): HTMLCanvasElement | null;
87
+ buildGridCanvasClipByJson(breaks: number[], colors: (number[] | string)[], json: FeatureCollection, options?: CanvasOptions): HTMLCanvasElement | null;
86
88
  updateGridCanvas(points: Point[], updateVal: number): Point[];
87
89
  /**
88
90
  * 获取最大最小值
package/dist/readFile.js CHANGED
@@ -1 +1 @@
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;
1
+ const a4_0x2336f7=a4_0x31a7;function a4_0x31a7(_0x248111,_0x505275){const _0xb37e80=a4_0xb37e();return a4_0x31a7=function(_0x31a75a,_0x15d066){_0x31a75a=_0x31a75a-0x175;let _0x4fe0f3=_0xb37e80[_0x31a75a];return _0x4fe0f3;},a4_0x31a7(_0x248111,_0x505275);}(function(_0x58a252,_0x55d39f){const _0x211742=a4_0x31a7,_0x1f26ff=_0x58a252();while(!![]){try{const _0x316b33=parseInt(_0x211742(0x1bb))/0x1+-parseInt(_0x211742(0x1e3))/0x2*(parseInt(_0x211742(0x1a4))/0x3)+parseInt(_0x211742(0x1e1))/0x4*(-parseInt(_0x211742(0x1b6))/0x5)+parseInt(_0x211742(0x1bf))/0x6*(parseInt(_0x211742(0x17f))/0x7)+parseInt(_0x211742(0x1e6))/0x8*(parseInt(_0x211742(0x1cf))/0x9)+-parseInt(_0x211742(0x1a3))/0xa+-parseInt(_0x211742(0x1ae))/0xb*(-parseInt(_0x211742(0x187))/0xc);if(_0x316b33===_0x55d39f)break;else _0x1f26ff['push'](_0x1f26ff['shift']());}catch(_0x522680){_0x1f26ff['push'](_0x1f26ff['shift']());}}}(a4_0xb37e,0x1b18c));import{contours}from'd3-contour';function a4_0xb37e(){const _0x1ce6b6=['getIsoBandsCanvasByMap','module','FeatureCollection','isNaN','9mBhuGl','text','fill','minus','from','_maskCache','filter','Feature','value','chunkArray','getJsonData','min','data','get','lineTo','buildGridCanvas','clip','area','344tVgttg','updateGridCanvas','376982KUkVop','lineWidth','contours','483736wvzhfm','getColorFast','length','start','all','gjLat','filePath','isArray','forEach','Polygon','map','strokeStyle','times','undefined','该时次文件数据异常','getBreaks','clearMaskCache','hardwareConcurrency','21vVtIKV','sort','string','onerror','clear','values','split','getIsoBandsCanvas','21720VuUQdO','lng','set','style','properties','getContext','beginPath','flat','thresholds','fillStyle','trim','plusOffset','plus','scale','number','rgba(','setParams','minLng','height','lat','floor','max','convertTemKtoC','minLat','onmessage','coordinates','moveTo','restore','13270GwpsIJ','3XqIidt','getIsoBandsByLayerBreak','terminate','ring','getAllGeo','getMinMax','stroke','toNumber','maxVal','clipDataByJson','132RArxEJ','features','__area','push','abs','createElement','size','val','2785HMVine','getIsoBandsFast','drawImage','geometry','createCanvas','134464pjvNBi','replace','width','sortFeaturesByArea','264114qLuHls','buildGridLineCanvas','closePath','save','gjLng','latLngToLayerPoint','#FFFFFF','postMessage','minVal','rgba(255,255,255,0)','round','_maskCacheKey'];a4_0xb37e=function(){return _0x1ce6b6;};return a4_0xb37e();}import a4_0x154eb7 from'@turf/area';import{featureCollection as a4_0x3fb78f,point,polygon}from'@turf/helpers';import{booleanPointInPolygon}from'@turf/boolean-point-in-polygon';import a4_0x30e44c from'decimal.js';export class readFileM4{[a4_0x2336f7(0x1ec)]='';['nx']=0x0;['ny']=0x0;[a4_0x2336f7(0x198)]=0x0;[a4_0x2336f7(0x19e)]=0x0;['gjLng']=0x0;[a4_0x2336f7(0x1eb)]=0x0;[a4_0x2336f7(0x184)]=[];[a4_0x2336f7(0x1ac)]=-Infinity;[a4_0x2336f7(0x1c7)]=Infinity;[a4_0x2336f7(0x1ca)]='';[a4_0x2336f7(0x1d4)]=new Map();constructor(_0x231ecc){const _0x5d0f63=a4_0x2336f7;this[_0x5d0f63(0x1ec)]=_0x231ecc||'';}async[a4_0x2336f7(0x1e9)](_0x17fedc){const _0x3abbcc=a4_0x2336f7,_0x189462=await fetch(this[_0x3abbcc(0x1ec)]);if(!_0x189462['ok'])return new Promise((_0x323055,_0x2bd222)=>{_0x2bd222(new Error('该时次未获取到文件'));});const _0x4104eb=await _0x189462[_0x3abbcc(0x1d0)](),_0x3113d9=_0x4104eb[_0x3abbcc(0x1bc)](/\r\n/g,'\x0a')[_0x3abbcc(0x1bc)](/\r/g,'\x0a')[_0x3abbcc(0x185)]('\x0a');if(_0x3113d9['length']<0x4)return new Promise((_0x8aa8f9,_0x4a3caf)=>{const _0x5907e1=_0x3abbcc;_0x4a3caf(new Error(_0x5907e1(0x17b)));});const _0x180dda=(_0x3113d9[0x1]??'')[_0x3abbcc(0x191)]()['split'](/\s+/);let _0x50df83=0x2;while(_0x180dda['length']<0x13){_0x180dda[_0x3abbcc(0x1b1)](...(_0x3113d9[_0x50df83]??'')[_0x3abbcc(0x191)]()['split'](/\s+/)),_0x50df83++;}this[_0x3abbcc(0x1c3)]=Number(_0x180dda[0x6]);const _0x2bf826=Number(_0x180dda[0x8]),_0x400a3c=Number(_0x180dda[0xa]),_0x52c691=Number(_0x180dda[0xb]);this['nx']=Number(_0x180dda[0xc]),this['ny']=Number(_0x180dda[0xd]),this['minLng']=_0x2bf826,this[_0x3abbcc(0x19e)]=_0x400a3c,this[_0x3abbcc(0x1eb)]=Math[_0x3abbcc(0x1b2)](Number(_0x180dda[0x7]))*(_0x400a3c>_0x52c691?-0x1:0x1);const _0x684313=this['nx']*this['ny'];let _0xffe61f=0x0;for(let _0x5d63fb=_0x50df83;_0x5d63fb<_0x3113d9[_0x3abbcc(0x1e8)]&&_0xffe61f<_0x684313;_0x5d63fb++){const _0x4477ad=_0x3113d9[_0x5d63fb]?.[_0x3abbcc(0x191)]()??'',_0x14c060=_0x4477ad[_0x3abbcc(0x185)](/\s+/);if(!_0x14c060||_0x14c060['length']===0x0)continue;for(let _0x3b2e2d=0x0;_0x3b2e2d<_0x14c060[_0x3abbcc(0x1e8)]&&_0xffe61f<_0x684313;_0x3b2e2d++){let _0x19df4c=Number(_0x14c060[_0x3b2e2d]);if(_0x17fedc?.['convertTemKtoC'])_0x19df4c=new a4_0x30e44c(_0x19df4c)[_0x3abbcc(0x1d2)](272.15)[_0x3abbcc(0x1ab)]();else _0x17fedc?.['plusOffset']&&(_0x19df4c=new a4_0x30e44c(_0x19df4c)[_0x3abbcc(0x193)](_0x17fedc[_0x3abbcc(0x192)])[_0x3abbcc(0x1ab)]());this['values']['push'](_0x19df4c),this[_0x3abbcc(0x1c7)]=Math[_0x3abbcc(0x1da)](this[_0x3abbcc(0x1c7)],_0x19df4c),this['maxVal']=Math['max'](this['maxVal'],_0x19df4c),_0xffe61f++;}}}[a4_0x2336f7(0x197)](_0x1611cd,_0x33deca){const _0x41ae0f=a4_0x2336f7;this['nx']=_0x1611cd['nx'],this['ny']=_0x1611cd['ny'],this[_0x41ae0f(0x198)]=_0x1611cd[_0x41ae0f(0x198)],this['minLat']=_0x1611cd['minLat'],this[_0x41ae0f(0x1c3)]=_0x1611cd['gjLng'],this[_0x41ae0f(0x1eb)]=_0x1611cd[_0x41ae0f(0x1eb)];if(_0x33deca?.[_0x41ae0f(0x19d)])for(let _0x40c23e=0x0;_0x40c23e<_0x1611cd[_0x41ae0f(0x184)][_0x41ae0f(0x1e8)];_0x40c23e++){if(typeof _0x1611cd[_0x41ae0f(0x184)][_0x40c23e]===_0x41ae0f(0x17a))continue;_0x1611cd[_0x41ae0f(0x184)][_0x40c23e]=new a4_0x30e44c(_0x1611cd[_0x41ae0f(0x184)][_0x40c23e])[_0x41ae0f(0x1d2)](272.15)[_0x41ae0f(0x1ab)]();}else{if(_0x33deca?.[_0x41ae0f(0x192)])for(let _0x37fdc9=0x0;_0x37fdc9<_0x1611cd[_0x41ae0f(0x184)]['length'];_0x37fdc9++){if(typeof _0x1611cd[_0x41ae0f(0x184)][_0x37fdc9]==='undefined')continue;_0x1611cd[_0x41ae0f(0x184)][_0x37fdc9]=new a4_0x30e44c(_0x1611cd[_0x41ae0f(0x184)][_0x37fdc9])[_0x41ae0f(0x193)](_0x33deca[_0x41ae0f(0x192)])[_0x41ae0f(0x1ab)]();}else this[_0x41ae0f(0x184)]=_0x1611cd[_0x41ae0f(0x184)];}this[_0x41ae0f(0x1a9)]();}[a4_0x2336f7(0x1b7)](_0x3e7178){const _0x16e5bb=a4_0x2336f7;if(this[_0x16e5bb(0x184)][_0x16e5bb(0x1e8)]===0x0)return{'type':'FeatureCollection','features':[]};const _0x524564=[],_0x25cf55=this['getAllGeo'](_0x3e7178),_0x3875a3=new a4_0x30e44c(this[_0x16e5bb(0x198)]),_0x36aaf9=new a4_0x30e44c(this[_0x16e5bb(0x19e)]),_0x2fe4e4=new a4_0x30e44c(this[_0x16e5bb(0x1c3)]),_0x3ab158=new a4_0x30e44c(this[_0x16e5bb(0x1eb)]);for(const _0x198d37 of _0x25cf55){for(const _0x30ef84 of _0x198d37[_0x16e5bb(0x1a0)]){if(Array[_0x16e5bb(0x1ed)](_0x30ef84))for(const _0x9fa4 of _0x30ef84){_0x9fa4[_0x16e5bb(0x175)](_0x4eeae0=>{const _0x2b7d2c=_0x16e5bb,_0x4f86f0=_0x4eeae0[0x0],_0x221ac0=_0x4eeae0[0x1];if(_0x4f86f0==null||_0x221ac0==null||Number['isNaN'](_0x4f86f0)||Number[_0x2b7d2c(0x1ce)](_0x221ac0))return null;const _0x451901=_0x3875a3['plus'](_0x2fe4e4[_0x2b7d2c(0x179)](_0x4f86f0))['toNumber'](),_0x9cf4e7=_0x36aaf9[_0x2b7d2c(0x193)](_0x3ab158[_0x2b7d2c(0x179)](_0x221ac0))[_0x2b7d2c(0x1ab)]();_0x4eeae0[0x0]=_0x451901,_0x4eeae0[0x1]=_0x9cf4e7;});}}_0x524564[_0x16e5bb(0x1b1)]({'type':_0x16e5bb(0x1d6),'properties':{'z':_0x198d37[_0x16e5bb(0x1d7)]},'geometry':_0x198d37});}return{'type':_0x16e5bb(0x1cd),'features':_0x524564};}[a4_0x2336f7(0x186)](_0x521d22,_0x4a17ff,_0x2bbf80){const _0xdba749=a4_0x2336f7;if(this[_0xdba749(0x184)][_0xdba749(0x1e8)]===0x0)return null;const _0x375a2c=this[_0xdba749(0x1a8)](_0x521d22),{canvas:_0x5bfb91,ctx:_0x314b59,width:_0x57c740,height:_0x2bd538}=this[_0xdba749(0x1ba)](_0x2bbf80);if(!_0x314b59)return null;for(const _0xf94f14 of _0x375a2c){const _0x1c7890=_0xf94f14[_0xdba749(0x1d7)];_0x314b59[_0xdba749(0x18d)]();for(const _0xf2456b of _0xf94f14[_0xdba749(0x1a0)]){if(Array[_0xdba749(0x1ed)](_0xf2456b))for(const _0x38e2f3 of _0xf2456b){_0x38e2f3[_0xdba749(0x175)]((_0x2e2574,_0x10c7e6)=>{const _0x1f0006=_0xdba749,_0x1ebc3e=_0x2e2574[0x0],_0x14601a=_0x2e2574[0x1];if(_0x1ebc3e==null||_0x14601a==null||Number['isNaN'](_0x1ebc3e)||Number[_0x1f0006(0x1ce)](_0x14601a))return null;const _0x1db3e6=_0x1ebc3e/this['nx']*_0x57c740,_0x248b7a=_0x2bd538-_0x14601a/this['ny']*_0x2bd538;_0x10c7e6===0x0?_0x314b59[_0x1f0006(0x1a1)](_0x1db3e6,_0x248b7a):_0x314b59[_0x1f0006(0x1dd)](_0x1db3e6,_0x248b7a);});}}_0x314b59['closePath'](),_0x314b59['fillStyle']=this[_0xdba749(0x1e7)](_0x1c7890,_0x521d22,_0x4a17ff),_0x314b59['fill']();}return _0x5bfb91;}[a4_0x2336f7(0x1cb)](_0x239213,_0x51a5d8,_0x4e30bf,_0x44d98c){const _0x337264=a4_0x2336f7;if(this[_0x337264(0x184)][_0x337264(0x1e8)]===0x0)return null;if(!_0x4e30bf)return null;const _0x64c054=this[_0x337264(0x198)],_0x308deb=this['minLat'],_0x11e844=_0x64c054+this['nx']*this[_0x337264(0x1c3)],_0x117713=_0x308deb+this['ny']*this['gjLat'],_0x41f35e=_0x4e30bf[_0x337264(0x1c4)]([_0x117713,_0x64c054]),_0xc87780=_0x4e30bf['latLngToLayerPoint']([_0x308deb,_0x11e844]),_0x1473ea=Math[_0x337264(0x19c)](0x1,Math[_0x337264(0x1c9)](_0xc87780['x']-_0x41f35e['x'])),_0x19b4dd=Math[_0x337264(0x19c)](0x1,Math[_0x337264(0x1c9)](_0xc87780['y']-_0x41f35e['y'])),_0x2c2cf0=_0x44d98c?.['pixelRatio']||(typeof devicePixelRatio!==_0x337264(0x17a)?devicePixelRatio:0x1),_0x1dbf6a=document[_0x337264(0x1b3)]('canvas'),_0x69d28e=_0x1dbf6a['getContext']('2d');_0x1dbf6a[_0x337264(0x1bd)]=Math[_0x337264(0x19c)](0x1,Math[_0x337264(0x19b)](_0x1473ea*_0x2c2cf0)),_0x1dbf6a['height']=Math['max'](0x1,Math[_0x337264(0x19b)](_0x19b4dd*_0x2c2cf0)),_0x1dbf6a[_0x337264(0x18a)]['width']=_0x1473ea+'px',_0x1dbf6a[_0x337264(0x18a)][_0x337264(0x199)]=_0x19b4dd+'px';if(_0x69d28e)_0x69d28e[_0x337264(0x194)](_0x2c2cf0,_0x2c2cf0);const _0x4aac13=this[_0x337264(0x1a8)](_0x239213);for(const _0x5616d5 of _0x4aac13){const _0x566968=_0x5616d5['value'];if(!_0x5616d5['coordinates'])continue;_0x69d28e[_0x337264(0x18d)]();for(const _0x3a54ba of _0x5616d5[_0x337264(0x1a0)]){if(Array[_0x337264(0x1ed)](_0x3a54ba))for(const _0x47280c of _0x3a54ba){_0x47280c['forEach']((_0x4bf905,_0x52e85c)=>{const _0x26eb6f=_0x337264,_0x4c4ac0=_0x4bf905[0x0],_0x161c26=_0x4bf905[0x1];if(_0x4c4ac0==null||_0x161c26==null||Number['isNaN'](_0x4c4ac0)||Number[_0x26eb6f(0x1ce)](_0x161c26))return;const _0x2fa7c=_0x64c054+_0x4c4ac0*this[_0x26eb6f(0x1c3)],_0x824b41=_0x308deb+_0x161c26*this[_0x26eb6f(0x1eb)],_0x4ffebb=_0x4e30bf[_0x26eb6f(0x1c4)]([_0x824b41,_0x2fa7c]),_0x584c00=_0x4ffebb['x']-_0x41f35e['x'],_0xb2b0a7=_0x4ffebb['y']-_0x41f35e['y'];if(_0x52e85c===0x0)_0x69d28e[_0x26eb6f(0x1a1)](_0x584c00,_0xb2b0a7);else _0x69d28e[_0x26eb6f(0x1dd)](_0x584c00,_0xb2b0a7);});}}_0x69d28e[_0x337264(0x1c1)](),_0x69d28e[_0x337264(0x190)]=this['getColorFast'](_0x566968,_0x239213,_0x51a5d8),_0x69d28e[_0x337264(0x1d1)]();}return _0x1dbf6a;}[a4_0x2336f7(0x1e7)](_0x1770f1,_0x5a907a,_0x316edb){const _0x390a3e=a4_0x2336f7;let _0x5126be=_0x390a3e(0x1c8);const _0x2293cf=_0x5a907a['indexOf'](_0x1770f1);if(typeof _0x316edb[_0x2293cf]=='string')_0x5126be=_0x316edb[_0x2293cf];else _0x2293cf!==-0x1&&(_0x5126be='rgba('+_0x316edb[_0x2293cf][0x0]+','+_0x316edb[_0x2293cf][0x1]+','+_0x316edb[_0x2293cf][0x2]+','+(_0x316edb[_0x2293cf][0x3]||_0x316edb[_0x2293cf][0x3]===0x0?_0x316edb[_0x2293cf][0x3]:0x1)+')');return _0x5126be;}async[a4_0x2336f7(0x1ad)](_0x2959db,_0x55bfd9,_0x8e7cee,_0x41f102){const _0x2afb63=a4_0x2336f7,_0x4e5b4e=_0x41f102||(navigator[_0x2afb63(0x17e)]-0x4||0x1),_0x20f9ba=Math[_0x2afb63(0x1da)](_0x4e5b4e,Math['max'](0x1,_0x2959db[_0x2afb63(0x1af)][_0x2afb63(0x1e8)])),_0x56e4f4=this[_0x2afb63(0x1d8)](_0x2959db['features'],_0x20f9ba),_0x4465b3=[],_0x3fa8b3=_0x56e4f4['map'](_0x140d8b=>{const _0x180ba9=_0x2afb63,_0x34b89a=new Worker(_0x8e7cee,{'type':'module'});return _0x4465b3[_0x180ba9(0x1b1)](_0x34b89a),new Promise(_0x3bace2=>{const _0x3087f3=_0x180ba9;_0x34b89a[_0x3087f3(0x19f)]=_0x2bcec6=>{const _0x2ddb89=_0x3087f3;_0x3bace2(_0x2bcec6[_0x2ddb89(0x1db)]['features']);},_0x34b89a[_0x3087f3(0x182)]=_0x44971a=>{console['error'](_0x44971a);},_0x34b89a[_0x3087f3(0x1c6)]({'isoChunk':_0x140d8b,'gansuFeatures':_0x55bfd9[_0x3087f3(0x1af)]});});}),_0x3c8feb=await Promise[_0x2afb63(0x1ea)](_0x3fa8b3);_0x4465b3[_0x2afb63(0x175)](_0x22bf12=>_0x22bf12[_0x2afb63(0x1a6)]());const _0x58b3a6=_0x3c8feb[_0x2afb63(0x18e)]();return a4_0x3fb78f(_0x58b3a6);}async['getIsoBandsFastByWorker'](_0x1cea57,_0x3a72fc,_0x2b6d98){const _0x3b343b=a4_0x2336f7;if(this['values'][_0x3b343b(0x1e8)]===0x0)return{'type':_0x3b343b(0x1cd),'features':[]};let _0x5ed8d6=[];if(_0x1cea57['length']===0x0)_0x1cea57=this[_0x3b343b(0x17c)]();const _0x2703a6=[],_0x59d34a=_0x2b6d98||(navigator[_0x3b343b(0x17e)]-0x4||0x1),_0x316027=Math[_0x3b343b(0x1da)](_0x59d34a,Math[_0x3b343b(0x19c)](0x1,_0x1cea57[_0x3b343b(0x1e8)])),_0x273727=this[_0x3b343b(0x1d8)](_0x1cea57,_0x316027),_0x263ddd=_0x273727[_0x3b343b(0x177)](_0x11c670=>{const _0x5eee91=_0x3b343b,_0x4bee38=new Worker(_0x3a72fc,{'type':_0x5eee91(0x1cc)});return _0x2703a6['push'](_0x4bee38),new Promise(_0x55ff08=>{const _0xe31962=_0x5eee91;_0x4bee38['onmessage']=_0x47d62e=>{const _0x5ea133=a4_0x31a7;_0x55ff08(_0x47d62e['data'][_0x5ea133(0x1af)]);},_0x4bee38[_0xe31962(0x182)]=_0x4935d0=>{console['error'](_0x4935d0);},_0x4bee38[_0xe31962(0x1c6)]({'breaks':_0x11c670,'values':this[_0xe31962(0x184)],'nx':this['nx'],'ny':this['ny'],'minVal':this['minVal'],'maxVal':this['maxVal'],'minLng':this[_0xe31962(0x198)],'minLat':this['minLat'],'gjLng':this[_0xe31962(0x1c3)],'gjLat':this[_0xe31962(0x1eb)]});});}),_0xa30cfd=await Promise[_0x3b343b(0x1ea)](_0x263ddd);return _0x2703a6[_0x3b343b(0x175)](_0x7e4757=>_0x7e4757['terminate']()),_0xa30cfd['forEach'](_0x150ce5=>{const _0x14ae73=_0x3b343b;_0x5ed8d6[_0x14ae73(0x1b1)](..._0x150ce5);}),_0x5ed8d6=this['sortFeaturesByArea'](_0x5ed8d6),{'type':_0x3b343b(0x1cd),'features':_0x5ed8d6};}[a4_0x2336f7(0x17d)](){const _0x31a550=a4_0x2336f7;this[_0x31a550(0x1d4)][_0x31a550(0x183)]();}[a4_0x2336f7(0x1a5)](_0x5a262c=[],_0x4700ad){const _0x2c6849=a4_0x2336f7;if(typeof _0x4700ad!==_0x2c6849(0x17a)&&this[_0x2c6849(0x1d4)][_0x2c6849(0x1dc)](_0x4700ad)){const _0x528995=this[_0x2c6849(0x1d4)][_0x2c6849(0x1dc)](_0x4700ad)||[],_0x342661=this[_0x2c6849(0x1be)]?this[_0x2c6849(0x1be)](_0x528995):_0x528995;return{'type':_0x2c6849(0x1cd),'features':_0x342661};}if(this['values'][_0x2c6849(0x1e8)]===0x0)return{'type':_0x2c6849(0x1cd),'features':[]};if(_0x5a262c[_0x2c6849(0x1e8)]===0x0)_0x5a262c=this[_0x2c6849(0x17c)]();const _0x57d837=_0x5a262c['join'](',');if(this[_0x2c6849(0x1ca)]!==_0x57d837){this[_0x2c6849(0x1ca)]=_0x57d837,this[_0x2c6849(0x1d4)][_0x2c6849(0x183)]();const _0x1c972a=this['minLng'],_0x47b5e5=this['minLat'],_0x5aa570=this['gjLng'],_0x4591=this[_0x2c6849(0x1eb)],_0x53a058=_0x50a95a=>{const _0x49490f=_0x2c6849;let _0x3371df=0x0;for(let _0x2320d1=0x0,_0x316e9c=_0x50a95a[_0x49490f(0x1e8)];_0x2320d1<_0x316e9c;_0x2320d1++){const _0xfec75e=_0x50a95a[_0x2320d1][0x0],_0x6bc0e6=_0x50a95a[_0x2320d1][0x1],_0x346cd1=_0x50a95a[(_0x2320d1+0x1)%_0x316e9c][0x0],_0x366288=_0x50a95a[(_0x2320d1+0x1)%_0x316e9c][0x1];if(_0xfec75e==null||_0x6bc0e6==null||_0x346cd1==null||_0x366288==null)continue;_0x3371df+=_0xfec75e*_0x366288-_0x346cd1*_0x6bc0e6;}return _0x3371df/0x2;},_0x4ccd25=(_0x30d845,_0x588ad2)=>{const _0x4d4448=_0x2c6849;if(!_0x30d845)return![];const _0x16c8c1=_0x30d845[0x0],_0x41766c=_0x30d845[0x1];let _0x49445f=![];for(let _0x149ee4=0x0,_0x418c56=_0x588ad2[_0x4d4448(0x1e8)]-0x1;_0x149ee4<_0x588ad2['length'];_0x418c56=_0x149ee4++){const _0xc7f7f2=_0x588ad2[_0x149ee4][0x0],_0x4f09ca=_0x588ad2[_0x149ee4][0x1],_0x302905=_0x588ad2[_0x418c56][0x0],_0x560da2=_0x588ad2[_0x418c56][0x1],_0x15d957=_0x4f09ca>_0x41766c!==_0x560da2>_0x41766c&&_0x16c8c1<(_0x302905-_0xc7f7f2)*(_0x41766c-_0x4f09ca)/(_0x560da2-_0x4f09ca)+_0xc7f7f2;if(_0x15d957)_0x49445f=!_0x49445f;}return _0x49445f;},_0x1421e3=_0x2cdacf=>{const _0x44824d=_0x2c6849,_0x2ef86b=[];let _0x88f054=null,_0x79efcd=null;for(let _0x57aa39=0x0;_0x57aa39<_0x2cdacf[_0x44824d(0x1e8)];_0x57aa39++){const _0x568707=_0x2cdacf[_0x57aa39];if(!_0x568707)continue;const _0x5199b8=_0x568707[0x0],_0x3ae631=_0x568707[0x1];if(_0x5199b8==null||_0x3ae631==null||Number['isNaN'](_0x5199b8)||Number[_0x44824d(0x1ce)](_0x3ae631))continue;const _0x2d1fcd=_0x1c972a+_0x5199b8*_0x5aa570,_0x264e17=_0x47b5e5+_0x3ae631*_0x4591;if(_0x88f054!==null&&_0x79efcd!==null&&_0x88f054===_0x2d1fcd&&_0x79efcd===_0x264e17){_0x88f054=_0x2d1fcd,_0x79efcd=_0x264e17;continue;}_0x2ef86b[_0x44824d(0x1b1)]([_0x2d1fcd,_0x264e17]),_0x88f054=_0x2d1fcd,_0x79efcd=_0x264e17;}if(_0x2ef86b[_0x44824d(0x1e8)]===0x0)return _0x2ef86b;const _0x5e9042=_0x2ef86b[0x0],_0x40fc2f=_0x2ef86b[_0x2ef86b[_0x44824d(0x1e8)]-0x1];if(_0x5e9042[0x0]!==_0x40fc2f[0x0]||_0x5e9042[0x1]!==_0x40fc2f[0x1])_0x2ef86b[_0x44824d(0x1b1)]([_0x5e9042[0x0],_0x5e9042[0x1]]);return _0x2ef86b;},_0x12216c=_0x5a262c[_0x2c6849(0x1e8)]-0x1;for(let _0x16c339=0x0;_0x16c339<_0x5a262c[_0x2c6849(0x1e8)];_0x16c339++){const _0x1d9d67=_0x5a262c[_0x16c339],_0x5952ac=_0x16c339<_0x12216c?_0x5a262c[_0x16c339+0x1]:Infinity,_0x320ccc=Array[_0x2c6849(0x1d3)]({'length':this[_0x2c6849(0x184)][_0x2c6849(0x1e8)]});let _0x50c8cd=![];for(let _0x19f2ac=0x0;_0x19f2ac<this[_0x2c6849(0x184)]['length'];_0x19f2ac++){const _0x361d15=this['values'][_0x19f2ac],_0x18ab1f=_0x361d15>=_0x1d9d67&&_0x361d15<_0x5952ac?0x1:0x0;if(_0x18ab1f)_0x50c8cd=!![];_0x320ccc[_0x19f2ac]=_0x18ab1f;}if(!_0x50c8cd)continue;const _0x306f36=contours()[_0x2c6849(0x1b4)]([this['nx'],this['ny']])[_0x2c6849(0x18f)]([0.5]),_0x376b34=_0x306f36[_0x2c6849(0x1e5)]?_0x306f36[_0x2c6849(0x1e5)](_0x320ccc):_0x306f36(_0x320ccc);if(!_0x376b34||_0x376b34[_0x2c6849(0x1e8)]===0x0)continue;const _0x2991b5=[];for(const _0x535129 of _0x376b34){const _0x500770=_0x535129&&_0x535129[_0x2c6849(0x1a0)];if(!_0x500770)continue;for(const _0x9b08c7 of _0x500770){let _0x13a47a=[];if(Array['isArray'](_0x9b08c7)&&_0x9b08c7['length']>0x0&&typeof _0x9b08c7[0x0][0x0]===_0x2c6849(0x195))_0x13a47a=[_0x9b08c7];else{if(Array[_0x2c6849(0x1ed)](_0x9b08c7))_0x13a47a=_0x9b08c7;else continue;}const _0x132a57=_0x13a47a[_0x2c6849(0x177)](_0xf0612f=>({'ring':_0xf0612f,'area':Math[_0x2c6849(0x1b2)](_0x53a058(_0xf0612f))}))[_0x2c6849(0x180)]((_0x400740,_0x171072)=>_0x171072['area']-_0x400740[_0x2c6849(0x1e0)]),_0x461aa3=Array[_0x2c6849(0x1d3)]({'length':_0x132a57['length']})[_0x2c6849(0x1d1)](![]);for(let _0x4f3d38=0x0;_0x4f3d38<_0x132a57[_0x2c6849(0x1e8)];_0x4f3d38++){if(_0x461aa3[_0x4f3d38])continue;const _0x3f029d=_0x132a57[_0x4f3d38][_0x2c6849(0x1a7)];_0x461aa3[_0x4f3d38]=!![];const _0x3ef24c=[];for(let _0x4374f9=0x0;_0x4374f9<_0x132a57[_0x2c6849(0x1e8)];_0x4374f9++){if(_0x461aa3[_0x4374f9])continue;const _0x43f19c=_0x132a57[_0x4374f9][_0x2c6849(0x1a7)],_0x39b956=_0x43f19c[0x0];_0x39b956&&_0x4ccd25(_0x39b956,_0x3f029d)&&(_0x3ef24c[_0x2c6849(0x1b1)](_0x43f19c),_0x461aa3[_0x4374f9]=!![]);}const _0x35151e=_0x1421e3(_0x3f029d);if(_0x35151e[_0x2c6849(0x1e8)]<0x4)continue;const _0x5b4563=[];for(const _0x195c5d of _0x3ef24c){const _0x57bb50=_0x1421e3(_0x195c5d);if(_0x57bb50[_0x2c6849(0x1e8)]>=0x4)_0x5b4563[_0x2c6849(0x1b1)](_0x57bb50);}_0x2991b5[_0x2c6849(0x1b1)]({'type':_0x2c6849(0x1d6),'properties':{'z':_0x1d9d67},'geometry':{'type':_0x2c6849(0x176),'coordinates':[_0x35151e,..._0x5b4563]}});}}}_0x2991b5[_0x2c6849(0x1e8)]&&this['_maskCache'][_0x2c6849(0x189)](_0x1d9d67,_0x2991b5);}}if(typeof _0x4700ad!=='undefined'){const _0x4c88c5=this[_0x2c6849(0x1d4)][_0x2c6849(0x1dc)](_0x4700ad)||[],_0xa57c2d=this[_0x2c6849(0x1be)]?this[_0x2c6849(0x1be)](_0x4c88c5):_0x4c88c5;return{'type':'FeatureCollection','features':_0xa57c2d};}const _0x5672d9=[];for(const _0x361edc of this[_0x2c6849(0x1d4)]['values']()){_0x5672d9[_0x2c6849(0x1b1)](..._0x361edc);}const _0x32f53f=this[_0x2c6849(0x1be)]?this[_0x2c6849(0x1be)](_0x5672d9):_0x5672d9;return{'type':_0x2c6849(0x1cd),'features':_0x32f53f};}[a4_0x2336f7(0x1d9)](){const _0x4fdad8=a4_0x2336f7,_0x6c983c=Array[_0x4fdad8(0x1d3)]({'length':this['nx']});for(let _0x2640c7=0x0;_0x2640c7<this['nx'];_0x2640c7++){_0x6c983c[_0x2640c7]=new a4_0x30e44c(this[_0x4fdad8(0x198)])['plus'](new a4_0x30e44c(_0x2640c7)[_0x4fdad8(0x179)](this[_0x4fdad8(0x1c3)]))[_0x4fdad8(0x1ab)]();}const _0x1df387=Array[_0x4fdad8(0x1d3)]({'length':this['ny']});for(let _0x40b4d3=0x0;_0x40b4d3<this['ny'];_0x40b4d3++){_0x1df387[_0x40b4d3]=new a4_0x30e44c(this['minLat'])['plus'](new a4_0x30e44c(_0x40b4d3)[_0x4fdad8(0x179)](this[_0x4fdad8(0x1eb)]))[_0x4fdad8(0x1ab)]();}const _0x39d8f3=Array[_0x4fdad8(0x1d3)]({'length':this['nx']*this['ny']});for(let _0x1eb56d=0x0;_0x1eb56d<this[_0x4fdad8(0x184)][_0x4fdad8(0x1e8)];_0x1eb56d++){const _0x487b16=Math[_0x4fdad8(0x19b)](_0x1eb56d/this['nx']),_0x2f20bc=_0x1eb56d%this['nx'],_0x8a4ae1=_0x6c983c[_0x2f20bc],_0x126f80=_0x1df387[_0x487b16],_0x31396a=this[_0x4fdad8(0x184)][_0x1eb56d];_0x126f80&&_0x8a4ae1&&(_0x39d8f3[_0x1eb56d]={'lng':_0x8a4ae1,'lat':_0x126f80,'val':_0x31396a});}return _0x39d8f3;}[a4_0x2336f7(0x1c0)](_0x30aee0){const _0x354855=a4_0x2336f7;if(this['nx']<=0x0||this['ny']<=0x0||this[_0x354855(0x1c3)]===0x0||this['gjLat']===0x0)return null;const {canvas:_0x33a9a9,ctx:_0x1cffe5,width:_0x150cef,height:_0x534405}=this['createCanvas'](_0x30aee0);if(!_0x1cffe5)return null;const _0xc68696=_0x150cef/this['nx'],_0x1e5334=_0x534405/this['ny'];_0x1cffe5[_0x354855(0x18d)](),_0x1cffe5[_0x354855(0x178)]=_0x30aee0?.[_0x354855(0x178)]||_0x354855(0x1c5),_0x1cffe5[_0x354855(0x1e4)]=_0x30aee0?.[_0x354855(0x1e4)]||0x1;for(let _0x56ddba=0x0;_0x56ddba<=this['nx'];_0x56ddba++){_0x1cffe5['moveTo'](_0xc68696*_0x56ddba,0x0),_0x1cffe5[_0x354855(0x1dd)](_0xc68696*_0x56ddba,_0x534405);}for(let _0x41ff05=0x0;_0x41ff05<=this['ny'];_0x41ff05++){_0x1cffe5[_0x354855(0x1a1)](0x0,_0x1e5334*_0x41ff05),_0x1cffe5[_0x354855(0x1dd)](_0x150cef,_0x1e5334*_0x41ff05);}return _0x1cffe5[_0x354855(0x1aa)](),_0x1cffe5[_0x354855(0x1c1)](),_0x33a9a9;}['buildGridCanvas'](_0x3609ea,_0x11e46d,_0x494b25){const _0x3a1f52=a4_0x2336f7;if(this['nx']<=0x0||this['ny']<=0x0||this['gjLng']===0x0||this['gjLat']===0x0)return null;const _0x4fd175=_0x3609ea&&_0x3609ea[_0x3a1f52(0x1e8)]?_0x3609ea:this['getBreaks'](),{canvas:_0x12565a,ctx:_0x118a31,width:_0x1ea299,height:_0x3729d6}=this['createCanvas'](_0x494b25);if(!_0x118a31)return null;const _0xa8d7ed=_0x1ea299/this['nx'],_0x351028=_0x3729d6/this['ny'],_0x33f5b7=_0x29912b=>{const _0x1d7769=_0x3a1f52;if(_0x29912b==null||Number[_0x1d7769(0x1ce)](_0x29912b))return'rgba(0,0,0,0)';for(let _0x1f5f02=0x0;_0x1f5f02<_0x4fd175[_0x1d7769(0x1e8)];_0x1f5f02++){const _0xcb39e4=_0x4fd175[_0x1f5f02],_0xf56762=_0x1f5f02<_0x4fd175[_0x1d7769(0x1e8)]-0x1?_0x4fd175[_0x1f5f02+0x1]:Infinity;if(_0x29912b>=_0xcb39e4&&_0x29912b<_0xf56762){const _0x496918=_0x11e46d[_0x1f5f02];if(typeof _0x496918===_0x1d7769(0x181))return _0x496918;return _0x1d7769(0x196)+_0x496918[0x0]+','+_0x496918[0x1]+','+_0x496918[0x2]+','+(_0x496918[0x3]||_0x496918[0x3]===0x0?_0x496918[0x3]:0x1)+')';}}return'rgba(0,0,0,0)';};for(let _0x49901e=0x0;_0x49901e<this['ny'];_0x49901e++){for(let _0x106eef=0x0;_0x106eef<this['nx'];_0x106eef++){const _0x46adf3=_0x49901e*this['nx']+_0x106eef,_0x206c8b=this['values'][_0x46adf3],_0xb928b5=_0x33f5b7(_0x206c8b),_0x2df71c=_0x106eef*_0xa8d7ed,_0x1ba214=_0x3729d6-(_0x49901e+0x1)*_0x351028;_0x118a31['fillStyle']=_0xb928b5,_0x118a31['fillRect'](_0x2df71c,_0x1ba214,_0xa8d7ed,_0x351028);}}if(!_0x494b25?.[_0x3a1f52(0x178)]&&!_0x494b25?.[_0x3a1f52(0x1e4)]||_0x494b25?.['lineWidth']===0x0)return _0x12565a;const _0x5bb895=this['buildGridLineCanvas'](_0x494b25);return _0x5bb895&&_0x118a31[_0x3a1f52(0x1b8)](_0x5bb895,0x0,0x0,_0x1ea299,_0x3729d6),_0x12565a;}['buildGridCanvasClipByJson'](_0x1aea02,_0x1a3ba4,_0x2d570b,_0x230533){const _0xfa37b6=a4_0x2336f7,_0x4ea4ac=this[_0xfa37b6(0x1de)](_0x1aea02,_0x1a3ba4,_0x230533);if(!_0x4ea4ac)return null;const {canvas:_0x1ea828,ctx:_0x291cb0,width:_0x22cf65,height:_0x5ea0ad}=this[_0xfa37b6(0x1ba)](_0x230533);if(!_0x291cb0)return null;const _0x2fe512=[];return _0x2d570b[_0xfa37b6(0x1af)][_0xfa37b6(0x177)](_0x37e8b5=>{const _0x40f397=_0xfa37b6,_0x5248b2=_0x37e8b5[_0x40f397(0x1b9)];if(_0x5248b2['type']===_0x40f397(0x176))_0x5248b2[_0x40f397(0x1a0)][_0x40f397(0x177)](_0x5ef50b=>{const _0x302448=_0x40f397,_0x1a1f9f=[];_0x5ef50b['map'](_0x210826=>{const _0x9cdd81=a4_0x31a7;_0x1a1f9f[_0x9cdd81(0x1b1)]([_0x210826[0x0],_0x210826[0x1]]);}),_0x2fe512[_0x302448(0x1b1)](_0x1a1f9f);});else _0x5248b2['type']==='MultiPolygon'&&_0x5248b2[_0x40f397(0x1a0)]['map'](_0x269054=>{const _0x2bee2e=_0x40f397;_0x269054[_0x2bee2e(0x177)](_0x248a3a=>{const _0x3151c4=_0x2bee2e,_0x551db0=[];_0x248a3a[_0x3151c4(0x177)](_0x203fce=>{const _0xb58345=_0x3151c4;_0x551db0[_0xb58345(0x1b1)]([_0x203fce[0x0],_0x203fce[0x1]]);}),_0x2fe512['push'](_0x551db0);});});}),_0x291cb0[_0xfa37b6(0x1c2)](),_0x291cb0['beginPath'](),_0x2fe512[_0xfa37b6(0x177)](_0x1dd45d=>{const _0x327f8d=_0xfa37b6;_0x1dd45d[_0x327f8d(0x175)]((_0x2039a8,_0xa7d860)=>{const _0x5f0889=_0x327f8d,_0x1272ed=_0x2039a8[0x0],_0xf1cd81=_0x2039a8[0x1],_0x4995e0=(_0x1272ed-this['minLng'])/(this['nx']*this[_0x5f0889(0x1c3)])*_0x22cf65,_0x299557=_0x5ea0ad-(_0xf1cd81-this['minLat'])/(this['ny']*this['gjLat'])*_0x5ea0ad;_0xa7d860===0x0?_0x291cb0['moveTo'](_0x4995e0,_0x299557):_0x291cb0['lineTo'](_0x4995e0,_0x299557);}),_0x291cb0['closePath']();}),_0x291cb0[_0xfa37b6(0x1df)](),_0x291cb0['drawImage'](_0x4ea4ac,0x0,0x0,_0x22cf65,_0x5ea0ad),_0x291cb0[_0xfa37b6(0x1a2)](),_0x1ea828;}[a4_0x2336f7(0x1e2)](_0x12395c,_0x8f3910){const _0x1d41ca=a4_0x2336f7,_0xb3149f=[];_0x12395c[_0x1d41ca(0x177)](_0x397f14=>{const _0x30cf32=_0x1d41ca;_0xb3149f[_0x30cf32(0x1b1)]([_0x397f14[_0x30cf32(0x188)],_0x397f14['lat']]);});_0xb3149f[_0x1d41ca(0x1e8)]>0x3&&_0x12395c['length']>0x3&&_0xb3149f[_0x1d41ca(0x1b1)]([_0x12395c[0x0]['lng'],_0x12395c[0x0][_0x1d41ca(0x19a)]]);const _0x56fb1c=polygon([_0xb3149f]),_0xf0bfed=[],_0x2462f7=this[_0x1d41ca(0x1d9)]();return _0x2462f7[_0x1d41ca(0x177)](_0x34c004=>{const _0x8efc1f=_0x1d41ca,_0x45c5a0=point([_0x34c004['lng'],_0x34c004[_0x8efc1f(0x19a)]]);booleanPointInPolygon(_0x45c5a0,_0x56fb1c)&&(_0xf0bfed['push']({'lat':_0x34c004[_0x8efc1f(0x19a)],'lng':_0x34c004[_0x8efc1f(0x188)]}),_0x34c004['val']=_0x8f3910);}),this['values']=_0x2462f7['map'](_0xf270a0=>_0xf270a0[_0x1d41ca(0x1b5)]),_0xf0bfed;}['getMinMax'](){const _0x3e48c8=a4_0x2336f7;let _0x32c276=-Infinity,_0x43aae6=Infinity;for(let _0x4284f3=0x0;_0x4284f3<this[_0x3e48c8(0x184)][_0x3e48c8(0x1e8)];_0x4284f3++){const _0x2c12fa=this[_0x3e48c8(0x184)][_0x4284f3];if(_0x2c12fa&&_0x2c12fa>_0x32c276)_0x32c276=_0x2c12fa;if(_0x2c12fa&&_0x2c12fa<_0x43aae6)_0x43aae6=_0x2c12fa;}this[_0x3e48c8(0x1c7)]=_0x43aae6,this['maxVal']=_0x32c276;}['sortFeaturesByArea'](_0x4b87b4){const _0x183e36=a4_0x2336f7;return _0x4b87b4[_0x183e36(0x177)](_0x3a31c6=>{const _0x4c2f12=_0x183e36;try{const _0x3b258b=a4_0x154eb7(_0x3a31c6)||0x0;_0x3a31c6[_0x4c2f12(0x18b)]={..._0x3a31c6['properties']||{},'__area':_0x3b258b};}catch{_0x3a31c6[_0x4c2f12(0x18b)]={..._0x3a31c6[_0x4c2f12(0x18b)]||{},'__area':0x0};}return _0x3a31c6;})['sort']((_0x15bb94,_0x3110f8)=>_0x3110f8['properties'][_0x183e36(0x1b0)]-_0x15bb94[_0x183e36(0x18b)][_0x183e36(0x1b0)])[_0x183e36(0x1d5)](_0x490f58=>_0x490f58[_0x183e36(0x18b)]&&'__area'in _0x490f58[_0x183e36(0x18b)]&&_0x490f58[_0x183e36(0x18b)][_0x183e36(0x1b0)]!==0x0)[_0x183e36(0x177)](_0x2a17fa=>{const _0x619903=_0x183e36;if(_0x2a17fa[_0x619903(0x18b)]&&_0x619903(0x1b0)in _0x2a17fa[_0x619903(0x18b)]){const {__area:_0x400d55,..._0xaff3ad}=_0x2a17fa[_0x619903(0x18b)];_0x2a17fa[_0x619903(0x18b)]=_0xaff3ad;}return _0x2a17fa;});}[a4_0x2336f7(0x1d8)]=(_0x196c2a,_0x4ac5ed)=>{const _0x30cb4c=a4_0x2336f7,_0x38f679=[],_0x59da21=Math[_0x30cb4c(0x19c)](0x1,Math['ceil'](_0x196c2a[_0x30cb4c(0x1e8)]/_0x4ac5ed));for(let _0x542d4a=0x0;_0x542d4a<_0x4ac5ed;_0x542d4a++){_0x38f679[_0x30cb4c(0x1b1)](_0x196c2a['slice'](_0x542d4a*_0x59da21,(_0x542d4a+0x1)*_0x59da21));}return _0x38f679;};[a4_0x2336f7(0x17c)](){const _0x3e0f57=a4_0x2336f7,_0x4b2157=[];if(this['minVal']===Infinity||this[_0x3e0f57(0x1ac)]===-Infinity)return _0x4b2157;for(let _0x262084=this[_0x3e0f57(0x1c7)]-0x1;_0x262084<=this[_0x3e0f57(0x1ac)]+0x1;_0x262084++){_0x4b2157[_0x3e0f57(0x1b1)](_0x262084);}return _0x4b2157;}[a4_0x2336f7(0x1a8)]=_0x5cb6e2=>{const _0x2f4e75=a4_0x2336f7;if(_0x5cb6e2['length']===0x0)_0x5cb6e2=this['getBreaks']();const _0x4fd326=[];for(let _0x4b85b5=0x0;_0x4b85b5<_0x5cb6e2[_0x2f4e75(0x1e8)];_0x4b85b5++){const _0x42c553=_0x5cb6e2[_0x4b85b5],_0x5cd0fa=_0x4b85b5<_0x5cb6e2[_0x2f4e75(0x1e8)]-0x1?_0x5cb6e2[_0x4b85b5+0x1]:Infinity;if(_0x42c553==null||_0x5cd0fa==null)continue;if(_0x42c553<this['minVal']&&_0x5cd0fa<this[_0x2f4e75(0x1c7)])continue;if(_0x42c553>this[_0x2f4e75(0x1ac)]&&_0x5cd0fa>this['maxVal'])continue;_0x4fd326[_0x2f4e75(0x1b1)](_0x42c553);}const _0x40da3b=contours()['size']([this['nx'],this['ny']])[_0x2f4e75(0x18f)](_0x4fd326);return _0x40da3b(this[_0x2f4e75(0x184)]);};[a4_0x2336f7(0x1ba)]=_0x4c60f6=>{const _0x5c35da=a4_0x2336f7,_0x4adf4b=Math[_0x5c35da(0x19b)]((_0x4c60f6?.['width']||Math[_0x5c35da(0x1c9)](this['nx']/0x400)*0x400*0x2)/this['nx'])*this['nx'],_0x172788=_0x4adf4b/this['nx']*this['ny'],_0xeff6c3=_0x4c60f6?.['pixelRatio']||(typeof devicePixelRatio!==_0x5c35da(0x17a)?devicePixelRatio:0x1),_0x336c04=document[_0x5c35da(0x1b3)]('canvas'),_0x5b54d8=_0x336c04[_0x5c35da(0x18c)]('2d');return _0x336c04[_0x5c35da(0x1bd)]=_0x4adf4b*_0xeff6c3,_0x336c04[_0x5c35da(0x199)]=_0x172788*_0xeff6c3,_0x5b54d8[_0x5c35da(0x194)](_0xeff6c3,_0xeff6c3),{'canvas':_0x336c04,'ctx':_0x5b54d8,'width':_0x4adf4b,'height':_0x172788};};}export default readFileM4;
package/dist/types.d.ts CHANGED
@@ -77,7 +77,23 @@ export interface IReadFileM4 {
77
77
  /**
78
78
  * 构建一个网格网格 Canvas, 用于在融合模式下展示网格线, 网格的依据来源于数据的经纬度和分辨率
79
79
  */
80
- buildGridCanvas: (options?: CanvasOptions) => HTMLCanvasElement | null;
80
+ buildGridLineCanvas: (options?: CanvasOptions) => HTMLCanvasElement | null;
81
+ /**
82
+ * 构建一个网格色块 Canvas 有填色
83
+ * @param breaks
84
+ * @param colors
85
+ * @param options
86
+ */
87
+ buildGridCanvas(breaks: number[], colors: (number[] | string)[], options?: CanvasOptions): HTMLCanvasElement | null;
88
+ /**
89
+ * 构建一个裁剪后的网格色块 Canvas 有填色
90
+ * @param breaks
91
+ * @param colors
92
+ * @param json
93
+ * @param clipWorkerUrl
94
+ * @param options
95
+ */
96
+ buildGridCanvasClipByJson(breaks: number[], colors: (number[] | string)[], json: FeatureCollection, options?: CanvasOptions): HTMLCanvasElement | null;
81
97
  }
82
98
  /**
83
99
  * 读取文件对数据的处理
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m4-w-fast",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",