Skip to content

Instantly share code, notes, and snippets.

@rveciana
Last active November 28, 2016 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rveciana/6f8647ac87232e769df4807035c507cc to your computer and use it in GitHub Desktop.
Save rveciana/6f8647ac87232e769df4807035c507cc to your computer and use it in GitHub Desktop.
Wind barbs from a projected GeoTIFF & JavaScript libraries
license: mit

This example is the same as this block, but using the original GeoTIFF, ehich is in the Lambert conic conformal projection. Since the GeoJSON and coordinates needed by d3 to draw the map are in WGS84 (longitude-latitude) projection, all the data must be reprojected before drawing it. You can see here how to do it for polygons (the coloured isobands) and points (for wind barbs).

The results are more or less the same as in the previous pre-reprojected example, but should be better, since the isobands and barbs are created from the original data, not interpolated as in the other case.

Several liraries have been used:

  • geotiff: Reading the GeoTIFF data (not the projectiopn, which would be cool)
  • proj4js: Reprojecting points
  • d3-marching-squares: Creating the isobands with the wind speed
  • reproject: Reprojecting the generated GeoJSON

reproject doesn't ork directly with the browser, so an operation with browserify is needed before doing it:

npm install reproject
cd node_modules/reproject
browserify index.js --standalone reproject > ../../reproject.js
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.rastertools=e.rastertools||{})}(this,function(e){"use strict";function t(e,t,o){return(e-t)/(o-t)}function o(e){for(var t=[],o=e.rows,r=e.cols,l=[],h=0;h<o;h++)for(var a=0;a<r;a++)if("undefined"!=typeof e.cells[h][a]&&e.cells[h][a].edges.length>0){var n=e.cells[h][a],f=(n.cval,p(n)),i=null,c=a,b=h;null!==f&&l.push([f.p[0]+c,f.p[1]+b]);do{if(i=u(e.cells[b][c],f.x,f.y,f.o),null===i)break;if(l.push([i.p[0]+c,i.p[1]+b]),c+=i.x,b+=i.y,f=i,b<0||b>=o||c<0||c>=r||"undefined"==typeof e.cells[b][c]){c-=i.x,b-=i.y;var g=s(e,c,b,i.x,i.y,i.o);if(null===g)break;g.path.forEach(function(e){l.push(e)}),c=g.i,b=g.j,f=g}}while("undefined"!=typeof e.cells[b][c]&&e.cells[b][c].edges.length>0);t.push(l),l=[],e.cells[h][a].edges.length>0&&a--}return t}function s(e,t,o,s,r,p){for(var u=e.cells[o][t],l=u.cval_real,h=t+s,a=o+r,n=[],f=(e.rows,e.cols,!1);!f;){if("undefined"==typeof e.cells[a]||"undefined"==typeof e.cells[a][h])if(a-=r,h-=s,u=e.cells[a][h],l=u.cval_real,r===-1)if(0===p)if(l&w)n.push([h,a]),s=-1,r=0,p=0;else{if(!(l&x)){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h+1,a]),s=1,r=0,p=0}else{if(!(l&w)){if(l&x){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h+u.bottomleft,a]),s=0,r=1,p=0,f=!0;break}n.push([h,a]),s=-1,r=0,p=0}else if(1===r)if(0===p){if(!(l&k)){if(l&v){n.push([h+u.topleft,a+1]),s=0,r=-1,p=0,f=!0;break}n.push([h+u.topright,a+1]),s=0,r=-1,p=1,f=!0;break}n.push([h+1,a+1]),s=1,r=0,p=1}else l&k?(n.push([h+1,a+1]),s=1,r=0,p=1):(n.push([h+1,a+1]),s=1,r=0,p=1);else if(s===-1)if(0===p){if(!(l&v)){if(l&w){n.push([h,a+u.leftbottom]),s=1,r=0,p=0,f=!0;break}n.push([h,a+u.lefttop]),s=1,r=0,p=1,f=!0;break}n.push([h,a+1]),s=0,r=1,p=0}else{if(!(l&v)){console.log("wtf");break}n.push([h,a+1]),s=0,r=1,p=0}else{if(1!==s){console.log("we came from nowhere!");break}if(0===p){if(!(l&x)){n.push([h+1,a+u.rightbottom]),s=-1,r=0,p=0,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}else{if(!(l&x)){if(l&k){n.push([h+1,a+u.righttop]),s=-1,r=0,p=1;break}n.push([h+1,a+u.rightbottom]),s=-1,r=0,p=0,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}}else if(u=e.cells[a][h],l=u.cval_real,s===-1)if(0===p)if("undefined"!=typeof e.cells[a-1]&&"undefined"!=typeof e.cells[a-1][h])s=0,r=-1,p=1;else{if(!(l&w)){n.push([h+u.bottomright,a]),s=0,r=1,p=1,f=!0;break}n.push([h,a])}else{if(!(l&v)){console.log("found entry from top at "+h+","+a);break}console.log("proceeding in x-direction!")}else if(1===s){if(0===p){console.log("wtf");break}if("undefined"!=typeof e.cells[a+1]&&"undefined"!=typeof e.cells[a+1][h])s=0,r=1,p=0;else{if(!(l&k)){n.push([h+u.topleft,a+1]),s=0,r=-1,p=0,f=!0;break}n.push([h+1,a+1]),s=1,r=0,p=1}}else if(r===-1){if(1!==p){console.log("wtf");break}if("undefined"!=typeof e.cells[a][h+1])s=1,r=0,p=1;else{if(!(l&x)){n.push([h+1,a+u.righttop]),s=-1,r=0,p=1,f=!0;break}n.push([h+1,a]),s=0,r=-1,p=1}}else{if(1!==r){console.log("where did we came from???");break}if(0!==p){console.log("wtf");break}if("undefined"!=typeof e.cells[a][h-1])s=-1,r=0,p=0;else{if(!(l&v)){n.push([h,a+u.leftbottom]),s=1,r=0,p=0,f=!0;break}n.push([h,a+1]),s=0,r=1,p=0}}if(h+=s,a+=r,h===t&&a===o)break}return{path:n,i:h,j:a,x:s,y:r,o:p}}function r(e,t){delete e.edges[t];for(var o=t+1;o<e.edges.length;o++)e.edges[o-1]=e.edges[o];e.edges.pop()}function p(e){if(e.edges.length>0){var t=e.edges[e.edges.length-1],o=e.cval_real;switch(t){case 0:return o&k?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 1:return o&x?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 2:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 3:return o&w?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 4:return o&k?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 5:return o&x?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 6:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 7:return o&w?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 8:return o&x?{p:[e.bottomright],x:0,y:1,o:1}:{p:[1,e.righttop],x:-1,y:0,o:1};case 9:return o&w?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 10:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.righttop],x:-1,y:0,o:1};case 11:return o&v?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 12:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 13:return o&w?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 14:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 15:return o&v?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 16:return o&x?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 17:return o&v?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 18:return o&w?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 19:return o&v?{p:[e.bottomleft,0],x:0,y:1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 20:return o&v?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 21:return o&k?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.topright,1],x:0,y:-1,o:1};case 22:return o&v?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 23:return o&k?{p:[0,e.lefttop],x:1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};default:console.log("edge index out of range!"),console.log(e)}}return null}function u(e,t,o,s){var p,u,t,o,l,h,a,n=e.cval;switch(t){case-1:switch(s){case 0:p=U[n],l=A[n],h=G[n],a=P[n];break;default:p=R[n],l=F[n],h=O[n],a=I[n]}break;case 1:switch(s){case 0:p=Y[n],l=J[n],h=K[n],a=Q[n];break;default:p=Z[n],l=B[n],h=D[n],a=H[n]}break;default:switch(o){case-1:switch(s){case 0:p=$[n],l=N[n],h=C[n],a=j[n];break;default:p=ee[n],l=_[n],h=E[n],a=M[n]}break;case 1:switch(s){case 0:p=X[n],l=T[n],h=V[n],a=L[n];break;default:p=W[n],l=S[n],h=q[n],a=z[n]}}}if(u=e.edges.indexOf(p),"undefined"==typeof e.edges[u])return null;switch(r(e,u),n=e.cval_real,p){case 0:n&k?(t=e.topleft,o=1):(t=1,o=e.righttop);break;case 1:n&x?(t=1,o=e.rightbottom):(t=e.topleft,o=1);break;case 2:n&x?(t=e.topleft,o=1):(t=e.bottomright,o=0);break;case 3:n&w?(t=e.bottomleft,o=0):(t=e.topleft,o=1);break;case 4:n&k?(t=e.topright,o=1):(t=1,o=e.righttop);break;case 5:n&x?(t=1,o=e.rightbottom):(t=e.topright,o=1);break;case 6:n&x?(t=e.topright,o=1):(t=e.bottomright,o=0);break;case 7:n&w?(t=e.bottomleft,o=0):(t=e.topright,o=1);break;case 8:n&x?(t=1,o=e.righttop):(t=e.bottomright,o=0);break;case 9:n&w?(t=e.bottomleft,o=0):(t=1,o=e.righttop);break;case 10:n&w?(t=1,o=e.righttop):(t=0,o=e.leftbottom);break;case 11:n&v?(t=0,o=e.lefttop):(t=1,o=e.righttop);break;case 12:n&x?(t=1,o=e.rightbottom):(t=e.bottomright,o=0);break;case 13:n&w?(t=e.bottomleft,o=0):(t=1,o=e.rightbottom);break;case 14:n&w?(t=1,o=e.rightbottom):(t=0,o=e.leftbottom);break;case 15:n&v?(t=0,o=e.lefttop):(t=1,o=e.rightbottom);break;case 16:n&x?(t=0,o=e.leftbottom):(t=e.bottomright,o=0);break;case 17:n&v?(t=0,o=e.lefttop):(t=e.bottomright,o=0);break;case 18:n&w?(t=e.bottomleft,o=0):(t=0,o=e.leftbottom);break;case 19:n&v?(t=0,o=e.lefttop):(t=e.bottomleft,o=0);break;case 20:n&v?(t=0,o=e.leftbottom):(t=e.topleft,o=1);break;case 21:n&k?(t=e.topright,o=1):(t=0,o=e.leftbottom);break;case 22:n&v?(t=0,o=e.lefttop):(t=e.topleft,o=1);break;case 23:n&k?(t=e.topright,o=1):(t=0,o=e.lefttop);break;default:return console.log("edge index out of range!"),console.log(e),null}return"undefined"!=typeof t&&"undefined"!=typeof o&&"undefined"!=typeof l&&"undefined"!=typeof h&&"undefined"!=typeof a||(console.log("undefined value!"),console.log(e),console.log(t+" "+o+" "+l+" "+h+" "+a)),{p:[t,o],x:l,y:h,o:a}}function l(e,t,o){return(e-t)/(o-t)}function h(e,t){for(var o=e.length-1,s=e[0].length-1,r={rows:o,cols:s,cells:[]},p=0;p<o;++p){r.cells[p]=[];for(var u=0;u<s;++u){var h=0,a=e[p+1][u],n=e[p+1][u+1],f=e[p][u+1],i=e[p][u];if(!(isNaN(a)||isNaN(n)||isNaN(f)||isNaN(i))){h|=a>=t?8:0,h|=n>=t?4:0,h|=f>=t?2:0,h|=i>=t?1:0;var c=!1;if(5==h||10==h){var b=(a+n+f+i)/4;5==h&&b<t?(h=10,c=!0):10==h&&b<t&&(h=5,c=!0)}if(0!=h&&15!=h){var g,d,y,m;g=d=y=m=.5,1==h?(y=1-l(t,a,i),d=1-l(t,f,i)):2==h?(d=l(t,i,f),m=1-l(t,n,f)):3==h?(y=1-l(t,a,i),m=1-l(t,n,f)):4==h?(g=l(t,a,n),m=l(t,f,n)):5==h?(g=l(t,a,n),m=l(t,f,n),d=1-l(t,f,i),y=1-l(t,a,i)):6==h?(d=l(t,i,f),g=l(t,a,n)):7==h?(y=1-l(t,a,i),g=l(t,a,n)):8==h?(y=l(t,i,a),g=1-l(t,n,a)):9==h?(d=1-l(t,f,i),g=1-l(t,n,a)):10==h?(g=1-l(t,n,a),m=1-l(t,n,f),d=l(t,i,f),y=l(t,i,a)):11==h?(g=1-l(t,n,a),m=1-l(t,n,f)):12==h?(y=l(t,i,a),m=l(t,f,n)):13==h?(d=1-l(t,f,i),m=l(t,f,n)):14==h?(y=l(t,i,a),d=l(t,i,f)):console.log("Illegal cval detected: "+h),r.cells[p][u]={cval:h,flipped:c,top:g,right:m,bottom:d,left:y}}}}}return r}function a(e){return 5==e.cval||10==e.cval}function n(e){return 0==e.cval||15==e.cval}function f(e){n(e)||5==e.cval||10==e.cval||(e.cval=15)}function i(e,t){return"top"===t?[e.top,1]:"bottom"===t?[e.bottom,0]:"right"===t?[1,e.right]:"left"===t?[0,e.left]:void 0}function c(e){var t=[],o=0,s=(e.rows,e.cols,1e-7);return e.cells.forEach(function(r,p){r.forEach(function(r,u){if("undefined"!=typeof r&&!a(r)&&!n(r)){var l=b(e.cells,p,u),h=!1;if("mergeable"==l.info)for(var f=l.path[l.path.length-1][0],i=l.path[l.path.length-1][1],c=o-1;c>=0;c--)if(Math.abs(t[c][0][0]-f)<=s&&Math.abs(t[c][0][1]-i)<=s){for(var g=l.path.length-2;g>=0;--g)t[c].unshift(l.path[g]);h=!0;break}h||(t[o++]=l.path)}})}),t}function b(e,t,o){var s,r,p,u=e.length,l=[],h=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],a=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],n=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],c=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],b=(e[t][o],e[t][o]),g=b.cval,p=n[g],d=i(b,p);l.push([o+d[0],t+d[1]]),p=c[g],d=i(b,p),l.push([o+d[0],t+d[1]]),f(b);for(var y=o+h[g],m=t+a[g],v=g;y>=0&&m>=0&&m<u&&(y!=o||m!=t)&&(b=e[m][y],"undefined"!=typeof b);){if(g=b.cval,0==g||15==g)return{path:l,info:"mergeable"};p=c[g],s=h[g],r=a[g],5!=g&&10!=g||(5==g?b.flipped?a[v]==-1?(p="left",s=-1,r=0):(p="right",s=1,r=0):h[v]==-1&&(p="bottom",s=0,r=-1):10==g&&(b.flipped?h[v]==-1?(p="top",s=0,r=1):(p="bottom",s=0,r=-1):1==a[v]&&(p="left",s=-1,r=0))),d=i(b,p),l.push([y+d[0],m+d[1]]),f(b),y+=s,m+=r,v=g}return{path:l,info:"closed"}}var g=function(e,t,o){for(var s={type:"FeatureCollection",features:[]},r=1;r<o.length;r++){for(var p=o[r-1],u=o[r],l=d(e,t,p,u-p),h=0;h<l.length;h++)l[h].reverse();s.features.push({type:"Feature",geometry:{type:"Polygon",coordinates:l},properties:[{lowerValue:p,upperValue:u}]})}return s},d=function(e,t,o,s){if(typeof t!=typeof new Array||6!=t.length)throw new Error("GeoTransform must be a 6 elements array");for(var r=m(e,o,s),p=0;p<r.length;p++)for(var u=0;u<r[p].length;u++){var l=y(r[p][u][0],r[p][u][1],t);r[p][u][0]=l[0],r[p][u][1]=l[1]}return r},y=function(e,t,o){var s=o[0]+e*o[1]+t*o[2],r=o[3]+e*o[4]+t*o[5];return[s,r]},m=function(e,t,s,r){var p={},u={successCallback:null,progressCallback:null,verbose:!1};r=r?r:{};for(var l=Object.keys(u),h=0;h<l.length;h++){var a=l[h],n=r[a];n="undefined"!=typeof n&&null!==n?n:u[a],p[a]=n}p.verbose&&console.log("computing isobands for ["+t+":"+(t+s)+"]");var f=te(e,t,s);p.verbose&&(p.polygons?console.log("returning single polygons for each grid cell"):console.log("returning polygon paths for entire data grid"));var i=o(f);return"function"==typeof p.successCallback&&p.successCallback(i),i},v=64,k=16,x=4,w=1,N=[],C=[],j=[],_=[],E=[],M=[],F=[],O=[],I=[],A=[],G=[],P=[],T=[],V=[],L=[],S=[],q=[],z=[],B=[],D=[],H=[],J=[],K=[],Q=[];F[85]=A[85]=-1,O[85]=G[85]=0,I[85]=P[85]=1,B[85]=J[85]=1,D[85]=K[85]=0,H[85]=Q[85]=1,N[85]=_[85]=0,C[85]=E[85]=-1,j[85]=L[85]=0,S[85]=T[85]=0,q[85]=V[85]=1,M[85]=z[85]=1,J[1]=J[169]=0,K[1]=K[169]=-1,Q[1]=Q[169]=0,T[1]=T[169]=-1,V[1]=V[169]=0,L[1]=L[169]=0,A[4]=A[166]=0,G[4]=G[166]=-1,P[4]=P[166]=1,S[4]=S[166]=1,q[4]=q[166]=0,z[4]=z[166]=0,F[16]=F[154]=0,O[16]=O[154]=1,I[16]=I[154]=1,_[16]=_[154]=1,E[16]=E[154]=0,M[16]=M[154]=1,B[64]=B[106]=0,D[64]=D[106]=1,H[64]=H[106]=0,N[64]=N[106]=-1,C[64]=C[106]=0,j[64]=j[106]=1,B[2]=B[168]=0,D[2]=D[168]=-1,H[2]=H[168]=1,J[2]=J[168]=0,K[2]=K[168]=-1,Q[2]=Q[168]=0,T[2]=T[168]=-1,V[2]=V[168]=0,L[2]=L[168]=0,S[2]=S[168]=-1,q[2]=q[168]=0,z[2]=z[168]=1,F[8]=F[162]=0,O[8]=O[162]=-1,I[8]=I[162]=0,A[8]=A[162]=0,G[8]=G[162]=-1,P[8]=P[162]=1,T[8]=T[162]=1,V[8]=V[162]=0,L[8]=L[162]=1,S[8]=S[162]=1,q[8]=q[162]=0,z[8]=z[162]=0,F[32]=F[138]=0,O[32]=O[138]=1,I[32]=I[138]=1,A[32]=A[138]=0,G[32]=G[138]=1,P[32]=P[138]=0,N[32]=N[138]=1,C[32]=C[138]=0,j[32]=j[138]=0,_[32]=_[138]=1,E[32]=E[138]=0,M[32]=M[138]=1,J[128]=J[42]=0,K[128]=K[42]=1,Q[128]=Q[42]=1,B[128]=B[42]=0,D[128]=D[42]=1,H[128]=H[42]=0,N[128]=N[42]=-1,C[128]=C[42]=0,j[128]=j[42]=1,_[128]=_[42]=-1,E[128]=E[42]=0,M[128]=M[42]=0,A[5]=A[165]=-1,G[5]=G[165]=0,P[5]=P[165]=0,J[5]=J[165]=1,K[5]=K[165]=0,Q[5]=Q[165]=0,S[20]=S[150]=0,q[20]=q[150]=1,z[20]=z[150]=1,_[20]=_[150]=0,E[20]=E[150]=-1,M[20]=M[150]=1,F[80]=F[90]=-1,O[80]=O[90]=0,I[80]=I[90]=1,B[80]=B[90]=1,D[80]=D[90]=0,H[80]=H[90]=1,T[65]=T[105]=0,V[65]=V[105]=1,L[65]=L[105]=0,N[65]=N[105]=0,C[65]=C[105]=-1,j[65]=j[105]=0,F[160]=F[10]=-1,O[160]=O[10]=0,I[160]=I[10]=1,A[160]=A[10]=-1,G[160]=G[10]=0,P[160]=P[10]=0,J[160]=J[10]=1,K[160]=K[10]=0,Q[160]=Q[10]=0,B[160]=B[10]=1,D[160]=D[10]=0,H[160]=H[10]=1,S[130]=S[40]=0,q[130]=q[40]=1,z[130]=z[40]=1,T[130]=T[40]=0,V[130]=V[40]=1,L[130]=L[40]=0,N[130]=N[40]=0,C[130]=C[40]=-1,j[130]=j[40]=0,_[130]=_[40]=0,E[130]=E[40]=-1,M[130]=M[40]=1,A[37]=A[133]=0,G[37]=G[133]=1,P[37]=P[133]=1,J[37]=J[133]=0,K[37]=K[133]=1,Q[37]=Q[133]=0,N[37]=N[133]=-1,C[37]=C[133]=0,j[37]=j[133]=0,_[37]=_[133]=1,E[37]=E[133]=0,M[37]=M[133]=0,S[148]=S[22]=-1,q[148]=q[22]=0,z[148]=z[22]=0,J[148]=J[22]=0,K[148]=K[22]=-1,Q[148]=Q[22]=1,B[148]=B[22]=0,D[148]=D[22]=1,H[148]=H[22]=1,_[148]=_[22]=-1,E[148]=E[22]=0,M[148]=M[22]=1,F[82]=F[88]=0,O[82]=O[88]=-1,I[82]=I[88]=1,S[82]=S[88]=1,q[82]=q[88]=0,z[82]=z[88]=1,T[82]=T[88]=-1,V[82]=V[88]=0,L[82]=L[88]=1,B[82]=B[88]=0,D[82]=D[88]=-1,H[82]=H[88]=0,F[73]=F[97]=0,O[73]=O[97]=1,I[73]=I[97]=0,A[73]=A[97]=0,G[73]=G[97]=-1,P[73]=P[97]=0,T[73]=T[97]=1,V[73]=V[97]=0,L[73]=L[97]=0,N[73]=N[97]=1,C[73]=C[97]=0,j[73]=j[97]=1,F[145]=F[25]=0,O[145]=O[25]=-1,I[145]=I[25]=0,T[145]=T[25]=1,V[145]=V[25]=0,L[145]=L[25]=1,J[145]=J[25]=0,K[145]=K[25]=1,Q[145]=Q[25]=1,_[145]=_[25]=-1,E[145]=E[25]=0,M[145]=M[25]=0,A[70]=A[100]=0,G[70]=G[100]=1,P[70]=P[100]=0,S[70]=S[100]=-1,q[70]=q[100]=0,z[70]=z[100]=1,B[70]=B[100]=0,D[70]=D[100]=-1;H[70]=H[100]=1;N[70]=N[100]=1,C[70]=C[100]=0,j[70]=j[100]=0,A[101]=A[69]=0,G[101]=G[69]=1,P[101]=P[69]=0,N[101]=N[69]=1,C[101]=C[69]=0,j[101]=j[69]=0,J[149]=J[21]=0,K[149]=K[21]=1,Q[149]=Q[21]=1,_[149]=_[21]=-1,E[149]=E[21]=0,M[149]=M[21]=0,S[86]=S[84]=-1,q[86]=q[84]=0,z[86]=z[84]=1,B[86]=B[84]=0,D[86]=D[84]=-1,H[86]=H[84]=1,F[89]=F[81]=0,O[89]=O[81]=-1,I[89]=I[81]=0,T[89]=T[81]=1,V[89]=V[81]=0,L[89]=L[81]=1,F[96]=F[74]=0,O[96]=O[74]=1,I[96]=I[74]=0,A[96]=A[74]=-1,G[96]=G[74]=0,P[96]=P[74]=1,B[96]=B[74]=1,D[96]=D[74]=0,H[96]=H[74]=0,N[96]=N[74]=1,C[96]=C[74]=0,j[96]=j[74]=1,F[24]=F[146]=0,O[24]=O[146]=-1,I[24]=I[146]=1,S[24]=S[146]=1,q[24]=q[146]=0,z[24]=z[146]=1,T[24]=T[146]=0,V[24]=V[146]=1,L[24]=L[146]=1,_[24]=_[146]=0,E[24]=E[146]=-1,M[24]=M[146]=0,A[6]=A[164]=-1,G[6]=G[164]=0,P[6]=P[164]=1,S[6]=S[164]=-1,q[6]=q[164]=0,z[6]=z[164]=0,J[6]=J[164]=0,K[6]=K[164]=-1,Q[6]=Q[164]=1,B[6]=B[164]=1,D[6]=D[164]=0,H[6]=H[164]=0,T[129]=T[41]=0,V[129]=V[41]=1,L[129]=L[41]=1,J[129]=J[41]=0,K[129]=K[41]=1,Q[129]=Q[41]=0,N[129]=N[41]=-1,C[129]=C[41]=0,j[129]=j[41]=0,_[129]=_[41]=0,E[129]=E[41]=-1,M[129]=M[41]=0,S[66]=S[104]=0,q[66]=q[104]=1,z[66]=z[104]=0,T[66]=T[104]=-1,V[66]=V[104]=0,L[66]=L[104]=1,B[66]=B[104]=0,D[66]=D[104]=-1,H[66]=H[104]=0,N[66]=N[104]=0,C[66]=C[104]=-1,j[66]=j[104]=1,F[144]=F[26]=-1,O[144]=O[26]=0,I[144]=I[26]=0,J[144]=J[26]=1,K[144]=K[26]=0,Q[144]=Q[26]=1,B[144]=B[26]=0,D[144]=D[26]=1,H[144]=H[26]=1,_[144]=_[26]=-1,E[144]=E[26]=0,M[144]=M[26]=1,A[36]=A[134]=0,G[36]=G[134]=1,P[36]=P[134]=1,S[36]=S[134]=0,q[36]=q[134]=1,z[36]=z[134]=0,N[36]=N[134]=0,C[36]=C[134]=-1,j[36]=j[134]=1,_[36]=_[134]=1,E[36]=E[134]=0,M[36]=M[134]=0,F[9]=F[161]=-1,O[9]=O[161]=0,I[9]=I[161]=0,A[9]=A[161]=0,G[9]=G[161]=-1,P[9]=P[161]=0,T[9]=T[161]=1,V[9]=V[161]=0,L[9]=L[161]=0,J[9]=J[161]=1,K[9]=K[161]=0,Q[9]=Q[161]=1,F[136]=0,O[136]=1,I[136]=1,A[136]=0,G[136]=1,P[136]=0,S[136]=-1,q[136]=0,z[136]=1,T[136]=-1,V[136]=0,L[136]=0,J[136]=0,K[136]=-1,Q[136]=0,B[136]=0,D[136]=-1,H[136]=1,N[136]=1,C[136]=0,j[136]=0,_[136]=1,E[136]=0,M[136]=1,F[34]=0,O[34]=-1,I[34]=0,A[34]=0,G[34]=-1,P[34]=1,S[34]=1,q[34]=0,z[34]=0,T[34]=1,V[34]=0,L[34]=1,J[34]=0,K[34]=1,Q[34]=1,B[34]=0,D[34]=1,H[34]=0,N[34]=-1,C[34]=0,j[34]=1,_[34]=-1,E[34]=0,M[34]=0,F[35]=0,O[35]=1,I[35]=1,A[35]=0,G[35]=-1,P[35]=1,S[35]=1,q[35]=0,z[35]=0,T[35]=-1,V[35]=0,L[35]=0,J[35]=0,K[35]=-1,Q[35]=0,B[35]=0,D[35]=1,H[35]=0,N[35]=-1,C[35]=0,j[35]=1,_[35]=1,E[35]=0,M[35]=1,F[153]=0,O[153]=1,I[153]=1,T[153]=-1,V[153]=0;L[153]=0;J[153]=0,K[153]=-1,Q[153]=0,_[153]=1,E[153]=0,M[153]=1,A[102]=0,G[102]=-1,P[102]=1,S[102]=1,q[102]=0,z[102]=0,B[102]=0,D[102]=1,H[102]=0,N[102]=-1,C[102]=0,j[102]=1,F[155]=0,O[155]=-1,I[155]=0,T[155]=1,V[155]=0,L[155]=1,J[155]=0,K[155]=1,Q[155]=1,_[155]=-1,E[155]=0,M[155]=0,A[103]=0,G[103]=1,P[103]=0,S[103]=-1,q[103]=0,z[103]=1,B[103]=0,D[103]=-1,H[103]=1,N[103]=1,C[103]=0,j[103]=0,F[152]=0,O[152]=1,I[152]=1,S[152]=-1,q[152]=0,z[152]=1,T[152]=-1,V[152]=0,L[152]=0,J[152]=0,K[152]=-1,Q[152]=0,B[152]=0,D[152]=-1,H[152]=1,_[152]=1,E[152]=0,M[152]=1,F[156]=0,O[156]=-1,I[156]=1,S[156]=1,q[156]=0,z[156]=1,T[156]=-1,V[156]=0,L[156]=0,J[156]=0,K[156]=-1,Q[156]=0,B[156]=0,D[156]=1,H[156]=1,_[156]=-1,E[156]=0,M[156]=1,F[137]=0,O[137]=1,I[137]=1,A[137]=0,G[137]=1,P[137]=0,T[137]=-1,V[137]=0,L[137]=0,J[137]=0,K[137]=-1,Q[137]=0,N[137]=1,C[137]=0,j[137]=0,_[137]=1,E[137]=0,M[137]=1,F[139]=0,O[139]=1,I[139]=1,A[139]=0,G[139]=-1,P[139]=0,T[139]=1,V[139]=0,L[139]=0,J[139]=0,K[139]=1,Q[139]=0,N[139]=-1,C[139]=0,j[139]=0,_[139]=1,E[139]=0,M[139]=1,F[98]=0,O[98]=-1,I[98]=0,A[98]=0,G[98]=-1,P[98]=1,S[98]=1,q[98]=0,z[98]=0,T[98]=1,V[98]=0,L[98]=1,B[98]=0,D[98]=1,H[98]=0,N[98]=-1,C[98]=0,j[98]=1,F[99]=0,O[99]=1,I[99]=0,A[99]=0,G[99]=-1,P[99]=1,S[99]=1,q[99]=0,z[99]=0,T[99]=-1,V[99]=0,L[99]=1,B[99]=0,D[99]=-1,H[99]=0,N[99]=1,C[99]=0,j[99]=1,A[38]=0,G[38]=-1,P[38]=1,S[38]=1,q[38]=0,z[38]=0,J[38]=0,K[38]=1,Q[38]=1,B[38]=0,D[38]=1,H[38]=0,N[38]=-1,C[38]=0,j[38]=1,_[38]=-1,E[38]=0,M[38]=0,A[39]=0,G[39]=1,P[39]=1,S[39]=-1,q[39]=0,z[39]=0,J[39]=0,K[39]=-1,Q[39]=1,B[39]=0,D[39]=1,H[39]=0,N[39]=-1,C[39]=0,j[39]=1,_[39]=1,E[39]=0,M[39]=0;var R=[],U=[],W=[],X=[],Y=[],Z=[],$=[],ee=[];X[1]=Y[1]=18,X[169]=Y[169]=18,W[4]=U[4]=12,W[166]=U[166]=12,R[16]=ee[16]=4,R[154]=ee[154]=4,Z[64]=$[64]=22,Z[106]=$[106]=22,W[2]=Z[2]=17,X[2]=Y[2]=18,W[168]=Z[168]=17,X[168]=Y[168]=18,R[8]=X[8]=9,U[8]=W[8]=12,R[162]=X[162]=9,U[162]=W[162]=12,R[32]=ee[32]=4,U[32]=$[32]=1,R[138]=ee[138]=4,U[138]=$[138]=1,Y[128]=ee[128]=21,Z[128]=$[128]=22,Y[42]=ee[42]=21,Z[42]=$[42]=22,U[5]=Y[5]=14,U[165]=Y[165]=14,W[20]=ee[20]=6,W[150]=ee[150]=6,R[80]=Z[80]=11,R[90]=Z[90]=11,X[65]=$[65]=3,X[105]=$[105]=3,R[160]=Z[160]=11,U[160]=Y[160]=14,R[10]=Z[10]=11,U[10]=Y[10]=14,W[130]=ee[130]=6,X[130]=$[130]=3,W[40]=ee[40]=6,X[40]=$[40]=3,U[101]=$[101]=1,U[69]=$[69]=1,Y[149]=ee[149]=21,Y[21]=ee[21]=21,W[86]=Z[86]=17,W[84]=Z[84]=17,R[89]=X[89]=9,R[81]=X[81]=9,R[96]=$[96]=0,U[96]=Z[96]=15,R[74]=$[74]=0,U[74]=Z[74]=15,R[24]=W[24]=8,X[24]=ee[24]=7,R[146]=W[146]=8,X[146]=ee[146]=7,U[6]=Z[6]=15,W[6]=Y[6]=16,U[164]=Z[164]=15,W[164]=Y[164]=16,X[129]=ee[129]=7,Y[129]=$[129]=20,X[41]=ee[41]=7,Y[41]=$[41]=20,W[66]=$[66]=2,X[66]=Z[66]=19,W[104]=$[104]=2,X[104]=Z[104]=19,R[144]=Y[144]=10,Z[144]=ee[144]=23,R[26]=Y[26]=10,Z[26]=ee[26]=23,U[36]=ee[36]=5,W[36]=$[36]=2,U[134]=ee[134]=5,W[134]=$[134]=2,R[9]=Y[9]=10,U[9]=X[9]=13,R[161]=Y[161]=10,U[161]=X[161]=13,U[37]=ee[37]=5,Y[37]=$[37]=20,U[133]=ee[133]=5,Y[133]=$[133]=20,W[148]=Y[148]=16,Z[148]=ee[148]=23,W[22]=Y[22]=16,Z[22]=ee[22]=23,R[82]=W[82]=8,X[82]=Z[82]=19,R[88]=W[88]=8,X[88]=Z[88]=19,R[73]=$[73]=0,U[73]=X[73]=13,R[97]=$[97]=0,U[97]=X[97]=13,R[145]=X[145]=9,Y[145]=ee[145]=21,R[25]=X[25]=9,Y[25]=ee[25]=21,U[70]=$[70]=1,W[70]=Z[70]=17,U[100]=$[100]=1,W[100]=Z[100]=17,R[34]=X[34]=9,U[34]=W[34]=12,Y[34]=ee[34]=21,Z[34]=$[34]=22,R[136]=ee[136]=4,U[136]=$[136]=1,W[136]=Z[136]=17,X[136]=Y[136]=18,R[35]=ee[35]=4,U[35]=W[35]=12,X[35]=Y[35]=18,Z[35]=$[35]=22,R[153]=ee[153]=4,X[153]=Y[153]=18,U[102]=W[102]=12,Z[102]=$[102]=22,R[155]=X[155]=9,Y[155]=ee[155]=23,U[103]=$[103]=1,W[103]=Z[103]=17,R[152]=ee[152]=4,W[152]=Z[152]=17,X[152]=Y[152]=18,R[156]=W[156]=8,X[156]=Y[156]=18,Z[156]=ee[156]=23,R[137]=ee[137]=4,U[137]=$[137]=1,X[137]=Y[137]=18,R[139]=ee[139]=4,U[139]=X[139]=13,Y[139]=$[139]=20,R[98]=X[98]=9,U[98]=W[98]=12,Z[98]=$[98]=22,R[99]=$[99]=0,U[99]=W[99]=12,X[99]=Z[99]=19,U[38]=W[38]=12,Y[38]=ee[38]=21,Z[38]=$[38]=22,U[39]=ee[39]=5,W[39]=Y[39]=16,Z[39]=$[39]=22;var te=function(e,o,s){for(var r=e.length-1,p=e[0].length-1,u={rows:r,cols:p,cells:[]},l=o+Math.abs(s),h=0;h<r;++h){u.cells[h]=[];for(var a=0;a<p;++a){var n=0,f=e[h+1][a],i=e[h+1][a+1],c=e[h][a+1],b=e[h][a];if(!(isNaN(f)||isNaN(i)||isNaN(c)||isNaN(b))){n|=f<o?0:f>l?128:64,n|=i<o?0:i>l?32:16,n|=c<o?0:c>l?8:4,n|=b<o?0:b>l?2:1;var g=+n,d=0;if(17==n||18==n||33==n||34==n||38==n||68==n||72==n||98==n||102==n||132==n||136==n||137==n||152==n||153==n){var y=(f+i+c+b)/4;d=y>l?2:y<o?0:1,34===n?1===d?n=35:0===d&&(n=136):136===n?1===d?(n=35,d=4):0===d&&(n=34):17===n?1===d?(n=155,d=4):0===d&&(n=153):68===n?1===d?(n=103,d=4):0===d&&(n=102):153===n?1===d&&(n=155):102===n?1===d&&(n=103):152===n?d<2&&(n=156,d=1):137===n?d<2&&(n=139,d=1):98===n?d<2&&(n=99,d=1):38===n?d<2&&(n=39,d=1):18===n?d>0?(n=156,d=4):n=152:33===n?d>0?(n=139,d=4):n=137:72===n?d>0?(n=99,d=4):n=98:132===n&&(d>0?(n=39,d=4):n=38)}if(0!=n&&170!=n){var m,v,k,x,w,N,C,j;m=v=k=x=w=N=C=j=.5;var _=[];1===n?(k=1-t(o,c,b),j=1-t(o,f,b),_.push(X[n])):169===n?(k=t(l,b,c),j=t(l,b,f),_.push(X[n])):4===n?(N=1-t(o,i,c),x=t(o,b,c),_.push(U[n])):166===n?(N=t(l,c,i),x=1-t(l,c,b),_.push(U[n])):16===n?(w=t(o,c,i),v=t(o,f,i),_.push(R[n])):154===n?(w=1-t(l,i,c),v=1-t(l,i,f),_.push(R[n])):64===n?(C=t(o,b,f),m=1-t(o,i,f),_.push(Z[n])):106===n?(C=1-t(l,f,b),m=t(l,f,i),_.push(Z[n])):168===n?(x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),_.push(W[n]),_.push(X[n])):2===n?(x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),_.push(W[n]),_.push(X[n])):162===n?(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),_.push(W[n]),_.push(X[n])):8===n?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),_.push(R[n]),_.push(U[n])):138===n?(w=1-t(o,i,c),N=1-t(l,i,c),m=1-t(l,i,f),v=1-t(o,i,f),_.push(R[n]),_.push(U[n])):32===n?(w=t(l,c,i),N=t(o,c,i),m=t(o,f,i),v=t(l,f,i),_.push(R[n]),_.push(U[n])):42===n?(j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(Y[n]),_.push(Z[n])):128===n&&(j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(Y[n]),_.push(Z[n])),5===n?(N=1-t(o,i,c),j=1-t(o,f,b),_.push(U[n])):165===n?(N=t(l,c,i),j=t(l,b,f),_.push(U[n])):20===n?(x=t(o,b,c),v=t(o,f,i),_.push(W[n])):150===n?(x=1-t(l,c,b),v=1-t(l,i,f),_.push(W[n])):80===n?(w=t(o,c,i),C=t(o,b,f),_.push(R[n])):90===n?(w=1-t(l,i,c),C=1-t(l,f,b),_.push(R[n])):65===n?(k=1-t(o,c,b),m=1-t(o,i,f),_.push(X[n])):105===n?(k=t(l,b,c),m=t(l,f,i),_.push(X[n])):160===n?(w=t(l,c,i),N=t(o,c,i),j=t(o,b,f),C=t(l,b,f),_.push(R[n]),_.push(U[n])):10===n?(w=1-t(o,i,c),N=1-t(l,i,c),j=1-t(l,f,b),C=1-t(o,f,b),_.push(R[n]),_.push(U[n])):130===n?(x=1-t(o,c,b),k=1-t(l,c,b),m=1-t(l,i,f),v=1-t(o,i,f),_.push(W[n]),_.push(X[n])):40===n?(x=t(l,b,c),k=t(o,b,c),m=t(o,f,i),v=t(l,f,i),_.push(W[n]),_.push(X[n])):101===n?(N=t(l,c,i),m=t(l,f,i),_.push(U[n])):69===n?(N=1-t(o,i,c),m=1-t(o,i,f),_.push(U[n])):149===n?(j=t(l,b,f),v=1-t(l,i,f),_.push(Y[n])):21===n?(j=1-t(o,f,b),v=t(o,f,i),_.push(Y[n])):86===n?(x=1-t(l,c,b),C=1-t(l,f,b),_.push(W[n])):84===n?(x=t(o,b,c),C=t(o,b,f),_.push(W[n])):89===n?(w=1-t(l,i,c),k=t(l,b,c),_.push(X[n])):81===n?(w=t(o,c,i),k=1-t(o,c,b),_.push(X[n])):96===n?(w=t(l,c,i),N=t(o,c,i),C=t(o,b,f),m=t(l,f,i),_.push(R[n]),_.push(U[n])):74===n?(w=1-t(o,i,c),N=1-t(l,i,c),C=1-t(l,f,b),m=1-t(o,i,f),_.push(R[n]),_.push(U[n])):24===n?(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),v=t(o,f,i),_.push(R[n]),_.push(X[n])):146===n?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),v=1-t(l,i,f),_.push(R[n]),_.push(X[n])):6===n?(N=1-t(o,i,c),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),_.push(U[n]),_.push(W[n])):164===n?(N=t(l,c,i),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),_.push(U[n]),_.push(W[n])):129===n?(k=1-t(o,c,b),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(X[n]),_.push(Y[n])):41===n?(k=t(l,b,c),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(X[n]),_.push(Y[n])):66===n?(x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=1-t(o,i,f),_.push(W[n]),_.push(X[n])):104===n?(x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=t(l,f,i),_.push(X[n]),_.push($[n])):144===n?(w=t(o,c,i),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f),_.push(R[n]),_.push(Z[n])):26===n?(w=1-t(l,i,c),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i),_.push(R[n]),_.push(Z[n])):36===n?(N=t(l,c,i),x=t(o,b,c),m=t(o,f,i),v=t(l,f,i),_.push(U[n]),_.push(W[n])):134===n?(N=1-t(o,i,c),x=1-t(l,c,b),m=1-t(l,i,f),v=1-t(o,i,f),_.push(U[n]),_.push(W[n])):9===n?(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=1-t(o,f,b),_.push(R[n]),_.push(U[n])):161===n?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=t(l,b,f),_.push(R[n]),_.push(U[n])):37===n?(N=t(l,c,i),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i),_.push(U[n]),_.push(Y[n])):133===n?(N=1-t(o,i,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f),_.push(U[n]),_.push(Y[n])):148===n?(x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f),_.push(W[n]),_.push(Z[n])):22===n?(x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i),_.push(W[n]),_.push(Z[n])):82===n?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),_.push(R[n]),_.push(X[n])):88===n?(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),_.push(R[n]),_.push(X[n])):73===n?(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),m=1-t(o,i,f),_.push(R[n]),_.push(U[n])):97===n?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),m=t(l,f,i),_.push(R[n]),_.push(U[n])):145===n?(w=t(o,c,i),k=1-t(o,c,b),j=t(l,b,f),v=1-t(l,i,f),_.push(R[n]),_.push(Y[n])):25===n?(w=1-t(l,i,c),k=t(l,b,c),j=1-t(o,f,b),v=t(o,f,i),_.push(R[n]),_.push(Y[n])):70===n?(N=1-t(o,i,c),x=1-t(l,c,b),C=1-t(l,f,b),m=1-t(o,i,f),_.push(U[n]),_.push(W[n])):100===n?(N=t(l,c,i),x=t(o,b,c),C=t(o,b,f),m=t(l,f,i),_.push(U[n]),_.push(W[n])):34===n?(0===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):35===n?(4===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(X[n]),_.push(Z[n])):136===n?(0===d?(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):153===n?(0===d?(w=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(X[n])):102===n?(0===d?(N=1-t(o,i,c),x=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(U[n]),_.push(Z[n])):155===n?(4===d?(w=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(Y[n])):103===n?(4===d?(N=1-t(o,i,c),x=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(U[n]),_.push(W[n])):152===n?(0===d?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(W[n]),_.push(X[n])):156===n?(4===d?(w=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),v=t(o,f,i)):(w=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),j=t(o,b,f),C=t(l,b,f),v=1-t(l,i,f)),_.push(R[n]),_.push(X[n]),_.push(Z[n])):137===n?(0===d?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(X[n])):139===n?(4===d?(w=t(l,c,i),N=t(o,c,i),k=1-t(o,c,b),j=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)):(w=1-t(o,i,c),N=1-t(l,i,c),k=t(l,b,c),j=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)),_.push(R[n]),_.push(U[n]),_.push(Y[n])):98===n?(0===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(Z[n])):99===n?(4===d?(w=1-t(o,i,c),N=1-t(l,i,c),x=t(l,b,c),k=t(o,b,c),C=t(o,b,f),m=1-t(o,i,f)):(w=t(l,c,i),N=t(o,c,i),x=1-t(o,c,b),k=1-t(l,c,b),C=1-t(l,f,b),m=t(l,f,i)),_.push(R[n]),_.push(U[n]),_.push(X[n])):38===n?(0===d?(N=1-t(o,i,c),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(U[n]),_.push(Y[n]),_.push(Z[n])):39===n?(4===d?(N=1-t(o,i,c),x=t(o,b,c),j=t(o,b,f),C=t(l,b,f),m=1-t(l,i,f),v=1-t(o,i,f)):(N=t(l,c,i),x=1-t(l,c,b),j=1-t(l,f,b),C=1-t(o,f,b),m=t(o,f,i),v=t(l,f,i)),_.push(U[n]),_.push(W[n]),_.push(Z[n])):85===n&&(w=1,N=0,x=1,k=0,j=0,C=1,m=0,v=1),(m<0||m>1||v<0||v>1||w<0||w>1||x<0||x>1||j<0||j>1||C<0||C>1)&&console.log(n+" "+g+" "+f+","+i+","+c+","+b+" "+d+" "+m+" "+v+" "+w+" "+N+" "+x+" "+k+" "+j+" "+C),u.cells[h][a]={cval:n,cval_real:g,flipped:d,topleft:m,topright:v,righttop:w,rightbottom:N,bottomright:x,bottomleft:k,leftbottom:j,lefttop:C,edges:_}}}}}return u},oe=function(e,t,o){for(var s={type:"FeatureCollection",features:[]},r=0;r<o.length;r++){var p=o[r],u=se(e,t,p);s.features.push({type:"Feature",geometry:{type:"MultiLineString",coordinates:u},properties:[{value:p}]})}return s},se=function(e,t,o){if(typeof t!=typeof new Array||6!=t.length)throw new Error("GeoTransform must be a 6 elements array");for(var s=pe(e,o),r=0;r<s.length;r++)for(var p=0;p<s[r].length;p++){var u=re(s[r][p][0],s[r][p][1],t);s[r][p][0]=u[0],s[r][p][1]=u[1]}return s},re=function(e,t,o){var s=o[0]+e*o[1]+t*o[2],r=o[3]+e*o[4]+t*o[5];return[s,r]},pe=function(e,t,o){var s={successCallback:null,progressCallback:null,verbose:!1},r={};o=o?o:{};for(var p=Object.keys(s),u=0;u<p.length;u++){var l=p[u],a=o[l];a="undefined"!=typeof a&&null!==a?a:s[l],r[l]=a}r.verbose&&console.log("computing isocontour for "+t);var n=c(h(e,t));return"function"==typeof r.successCallback&&r.successCallback(n),n};e.isoband=m,e.projectedIsoband=d,e.isobands=g,e.isoline=pe,e.projectedIsoline=se,e.isolines=oe,Object.defineProperty(e,"__esModule",{value:!0})});
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(){}d.prototype={isAsync:function(){return"undefined"==typeof this.decodeBlock}},b.exports=d},{}],2:[function(a,b,c){"use strict";function d(){}var e=a("../abstractdecoder.js");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.decodeBlockAsync=function(a,b){throw new Error("DeflateDecoder is not yet implemented.")},b.exports=d},{"../abstractdecoder.js":1}],3:[function(a,b,c){"use strict";function d(){}var e=a("../abstractdecoder.js");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.decodeBlock=function(a){throw new Error("LZWDecoder is not yet implemented")},b.exports=d},{"../abstractdecoder.js":1}],4:[function(a,b,c){"use strict";function d(){}var e=a("../abstractdecoder.js");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.decodeBlock=function(a){var b,c,d=new DataView(a),e=[];for(b=0;b<a.byteLength;++b){var f=d.getInt8(b);if(0>f){var g=d.getUint8(b+1);for(f=-f,c=0;f>=c;++c)e.push(g);b+=1}else{for(c=0;f>=c;++c)e.push(d.getUint8(b+c+1));b+=f+1}}return new Uint8Array(e).buffer},b.exports=d},{"../abstractdecoder.js":1}],5:[function(a,b,c){"use strict";function d(){}var e=a("../abstractdecoder.js");d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.prototype.decodeBlock=function(a){return a},b.exports=d},{"../abstractdecoder.js":1}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a),this._dataView=new DataView(b)}return e(a,[{key:"getUint64",value:function(a,b){var c=this.getUint32(a,b),d=this.getUint32(a+4,b);return b?c<<32|d:d<<32|c}},{key:"getInt64",value:function(a,b){var c,d;return b?(c=this.getInt32(a,b),d=this.getUint32(a+4,b),c<<32|d):(c=this.getUint32(a,b),d=this.getInt32(a+4,b),d<<32|c)}},{key:"getUint8",value:function(a,b){return this._dataView.getUint8(a,b)}},{key:"getInt8",value:function(a,b){return this._dataView.getInt8(a,b)}},{key:"getUint16",value:function(a,b){return this._dataView.getUint16(a,b)}},{key:"getInt16",value:function(a,b){return this._dataView.getInt16(a,b)}},{key:"getUint32",value:function(a,b){return this._dataView.getUint32(a,b)}},{key:"getInt32",value:function(a,b){return this._dataView.getInt32(a,b)}},{key:"getFloat32",value:function(a,b){return this._dataView.getFloat32(a,b)}},{key:"getFloat64",value:function(a,b){return this._dataView.getFloat64(a,b)}},{key:"buffer",get:function(){return this._dataView.buffer}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";function d(a,b){this.dataView=new g(a),b=b||{},this.cache=b.cache||!1;var c=this.dataView.getUint16(0,0);if(18761===c)this.littleEndian=!0;else{if(19789!==c)throw new TypeError("Invalid byte order value.");this.littleEndian=!1}var d=this.dataView.getUint16(2,this.littleEndian);if(42===this.dataView.getUint16(2,this.littleEndian))this.bigTiff=!1;else{if(43!==d)throw new TypeError("Invalid magic number.");this.bigTiff=!0;var e=this.dataView.getUint16(4,this.littleEndian);if(8!==e)throw new Error("Unsupported offset byte-size.")}this.fileDirectories=this.parseFileDirectories(this.getOffset(this.bigTiff?8:4))}var e=a("./globals.js"),f=a("./geotiffimage.js"),g=a("./dataview64.js"),h=e.fieldTypes,i=e.fieldTagNames,j=e.arrayFields,k=e.geoKeyNames;d.prototype={getOffset:function(a){return this.bigTiff?this.dataView.getUint64(a,this.littleEndian):this.dataView.getUint32(a,this.littleEndian)},getFieldTypeLength:function(a){switch(a){case h.BYTE:case h.ASCII:case h.SBYTE:case h.UNDEFINED:return 1;case h.SHORT:case h.SSHORT:return 2;case h.LONG:case h.SLONG:case h.FLOAT:return 4;case h.RATIONAL:case h.SRATIONAL:case h.DOUBLE:case h.LONG8:case h.SLONG8:case h.IFD8:return 8;default:throw new RangeError("Invalid field type: "+a)}},getValues:function(a,b,c){var d,e=null,f=null,g=this.getFieldTypeLength(a);switch(a){case h.BYTE:case h.ASCII:case h.UNDEFINED:e=new Uint8Array(b),f=this.dataView.getUint8;break;case h.SBYTE:e=new Int8Array(b),f=this.dataView.getInt8;break;case h.SHORT:e=new Uint16Array(b),f=this.dataView.getUint16;break;case h.SSHORT:e=new Int16Array(b),f=this.dataView.getInt16;break;case h.LONG:e=new Uint32Array(b),f=this.dataView.getUint32;break;case h.SLONG:e=new Int32Array(b),f=this.dataView.getInt32;break;case h.LONG8:case h.IFD8:e=new Array(b),f=this.dataView.getUint64;break;case h.SLONG8:e=new Array(b),f=this.dataView.getInt64;break;case h.RATIONAL:e=new Uint32Array(2*b),f=this.dataView.getUint32;break;case h.SRATIONAL:e=new Int32Array(2*b),f=this.dataView.getInt32;break;case h.FLOAT:e=new Float32Array(b),f=this.dataView.getFloat32;break;case h.DOUBLE:e=new Float64Array(b),f=this.dataView.getFloat64;break;default:throw new RangeError("Invalid field type: "+a)}if(a!==h.RATIONAL&&a!==h.SRATIONAL)for(d=0;b>d;++d)e[d]=f.call(this.dataView,c+d*g,this.littleEndian);else for(d=0;2*b>d;d+=2)e[d]=f.call(this.dataView,c+d*g,this.littleEndian),e[d+1]=f.call(this.dataView,c+(d+1)*g,this.littleEndian);return a===h.ASCII?String.fromCharCode.apply(null,e):e},getFieldValues:function(a,b,c,d){var e,f=this.getFieldTypeLength(b);if(f*c<=(this.bigTiff?8:4))e=this.getValues(b,c,d);else{var g=this.getOffset(d);e=this.getValues(b,c,g)}return 1===c&&-1===j.indexOf(a)&&b!==h.RATIONAL&&b!==h.SRATIONAL?e[0]:e},parseGeoKeyDirectory:function(a){var b=a.GeoKeyDirectory;if(!b)return null;for(var c={},d=4;d<4*b[3];d+=4){var e=k[b[d]],f=b[d+1]?i[b[d+1]]:null,g=b[d+2],h=b[d+3],j=null;if(f){if(j=a[f],"undefined"==typeof j||null===j)throw new Error("Could not get value of geoKey '"+e+"'.");"string"==typeof j?j=j.substring(h,h+g-1):j.subarray&&(j=j.subarray(h,h+g-1))}else j=h;c[e]=j}return c},parseFileDirectories:function(a){for(var b=a,c=[];0!==b;){for(var d=this.bigTiff?this.dataView.getUint64(b,this.littleEndian):this.dataView.getUint16(b,this.littleEndian),e={},f=a+(this.bigTiff?8:2),g=0;d>g;f+=this.bigTiff?20:12,++g){var h=this.dataView.getUint16(f,this.littleEndian),j=this.dataView.getUint16(f+2,this.littleEndian),k=this.bigTiff?this.dataView.getUint64(f+4,this.littleEndian):this.dataView.getUint32(f+4,this.littleEndian);e[i[h]]=this.getFieldValues(h,j,k,f+(this.bigTiff?12:8))}c.push([e,this.parseGeoKeyDirectory(e)]),b=this.getOffset(f)}return c},getImage:function(a){a=a||0;var b=this.fileDirectories[a];if(!b)throw new RangeError("Invalid image index");return new f(b[0],b[1],this.dataView,this.littleEndian,this.cache)},getImageCount:function(){return this.fileDirectories.length}},b.exports=d},{"./dataview64.js":6,"./geotiffimage.js":8,"./globals.js":9}],8:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.fileDirectory=a,this.geoKeys=b,this.dataView=c,this.littleEndian=d,this.tiles=e?{}:null,this.isTiled=a.StripOffsets?!1:!0;var j=a.PlanarConfiguration;if(this.planarConfiguration="undefined"==typeof j?1:j,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");switch(this.fileDirectory.Compression){case void 0:case 1:this.decoder=new f;break;case 5:this.decoder=new g;break;case 6:throw new Error("JPEG compression not supported.");case 8:this.decoder=new h;break;case 32773:this.decoder=new i;break;default:throw new Error("Unknown compresseion method identifier: "+this.fileDirectory.Compression)}}var e=a("./globals.js"),f=a("./compression/raw.js"),g=a("./compression/lzw.js"),h=a("./compression/deflate.js"),i=a("./compression/packbits.js"),j=function(a,b,c){for(var d=0,e=b;c>e;++e)d+=a[e];return d},k=function(a,b,c){switch(a){case 1:switch(b){case 8:return new Uint8Array(c);case 16:return new Uint16Array(c);case 32:return new Uint32Array(c)}break;case 2:switch(b){case 8:return new Int8Array(c);case 16:return new Int16Array(c);case 32:return new Int32Array(c)}break;case 3:switch(b){case 32:return new Float32Array(c);case 64:return new Float64Array(c)}}throw Error("Unsupported data format/bitsPerSample")};d.prototype={getFileDirectory:function(){return this.fileDirectory},getGeoKeys:function(){return this.geoKeys},getWidth:function(){return this.fileDirectory.ImageWidth},getHeight:function(){return this.fileDirectory.ImageLength},getSamplesPerPixel:function(){return this.fileDirectory.SamplesPerPixel},getTileWidth:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()},getTileHeight:function(){return this.isTiled?this.fileDirectory.TileLength:this.fileDirectory.RowsPerStrip},getBytesPerPixel:function(){for(var a=0,b=0;b<this.fileDirectory.BitsPerSample.length;++b){var c=this.fileDirectory.BitsPerSample[b];if(c%8!==0)throw new Error("Sample bit-width of "+c+" is not supported.");if(c!==this.fileDirectory.BitsPerSample[0])throw new Error("Differing size of samples in a pixel are not supported.");a+=c}return a/8},getSampleByteSize:function(a){if(a>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index "+a+" is out of range.");var b=this.fileDirectory.BitsPerSample[a];if(b%8!==0)throw new Error("Sample bit-width of "+b+" is not supported.");return b/8},getReaderForSample:function(a){var b=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[a]:1,c=this.fileDirectory.BitsPerSample[a];switch(b){case 1:switch(c){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(c){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(c){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}},getArrayForSample:function(a,b){var c=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[a]:1,d=this.fileDirectory.BitsPerSample[a];return k(c,d,b)},getDecoder:function(){return this.decoder},getTileOrStrip:function(a,b,c,d){var e,f=Math.ceil(this.getWidth()/this.getTileWidth()),g=Math.ceil(this.getHeight()/this.getTileHeight()),h=this.tiles;if(1===this.planarConfiguration?e=b*f+a:2===this.planarConfiguration&&(e=c*f*g+b*f+a),null!==h&&e in h)return d?d(null,{x:a,y:b,sample:c,data:h[e]}):h[e];var i,j;this.isTiled?(i=this.fileDirectory.TileOffsets[e],j=this.fileDirectory.TileByteCounts[e]):(i=this.fileDirectory.StripOffsets[e],j=this.fileDirectory.StripByteCounts[e]);var k=this.dataView.buffer.slice(i,i+j);if(d)return this.getDecoder().decodeBlockAsync(k,function(f,g){f||null===h||(h[e]=g),d(f,{x:a,y:b,sample:c,data:g})});var l=this.getDecoder().decodeBlock(k);return null!==h&&(h[e]=l),l},_readRasterAsync:function(a,b,c,d,e,f){function g(e,f){if(e)x=e;else for(var g=new DataView(f.data),j=f.y*k,l=f.x*i,m=(f.y+1)*k,n=(f.x+1)*i,o=(f.sample,Math.max(0,a[1]-j));o<Math.min(k,k-(m-a[3]));++o)for(var t=Math.max(0,a[0]-l);t<Math.min(i,i-(n-a[2]));++t){var u,y=(o*i+t)*q,z=s[C].call(g,y+r[C],w);d?(u=(o+j-a[1])*p*b.length+(t+l-a[0])*b.length+C,c[u]=z):(u=(o+j-a[1])*p+t+l-a[0],c[C][u]=z)}v-=1,h()}function h(){u&&0===v&&(x?f(x):e(c))}for(var i=this.getTileWidth(),k=this.getTileHeight(),l=Math.floor(a[0]/i),m=Math.ceil(a[2]/i),n=Math.floor(a[1]/k),o=Math.ceil(a[3]/k),p=(Math.ceil(this.getWidth()/i),a[2]-a[0]),q=(a[3]-a[1],this.getBytesPerPixel()),r=(this.getWidth(),[]),s=[],t=0;t<b.length;++t)1===this.planarConfiguration?r.push(j(this.fileDirectory.BitsPerSample,0,b[t])/8):r.push(0),s.push(this.getReaderForSample(b[t]));for(var u=!1,v=0,w=this.littleEndian,x=null,y=n;o>=y;++y)for(var z=l;m>=z;++z)for(var A=0;A<b.length;++A){var B=b[A];2===this.planarConfiguration&&(q=this.getSampleByteSize(B));var C=A;v+=1,this.getTileOrStrip(z,y,B,g)}u=!0,h()},_readRaster:function(a,b,c,d,e,f){try{for(var g=this.getTileWidth(),h=this.getTileHeight(),i=Math.floor(a[0]/g),k=Math.ceil(a[2]/g),l=Math.floor(a[1]/h),m=Math.ceil(a[3]/h),n=(Math.ceil(this.getWidth()/g),a[2]-a[0]),o=(a[3]-a[1],this.getBytesPerPixel()),p=(this.getWidth(),[]),q=[],r=0;r<b.length;++r)1===this.planarConfiguration?p.push(j(this.fileDirectory.BitsPerSample,0,b[r])/8):p.push(0),q.push(this.getReaderForSample(b[r]));for(var s=l;m>s;++s)for(var t=i;k>t;++t)for(var u=s*h,v=t*g,w=(s+1)*h,x=(t+1)*g,y=0;y<b.length;++y){var z=b[y];2===this.planarConfiguration&&(o=this.getSampleByteSize(z));for(var A=new DataView(this.getTileOrStrip(t,s,z)),B=Math.max(0,a[1]-u);B<Math.min(h,h-(w-a[3]));++B)for(var C=Math.max(0,a[0]-v);C<Math.min(g,g-(x-a[2]));++C){var D,E=(B*g+C)*o,F=q[y].call(A,E+p[y],this.littleEndian);d?(D=(B+u-a[1])*n*b.length+(C+v-a[0])*b.length+y,c[D]=F):(D=(B+u-a[1])*n+C+v-a[0],c[y][D]=F)}}return e(c),c}catch(G){return f(G)}},readRasters:function(){var a,b,c;switch(arguments.length){case 0:break;case 1:"function"==typeof arguments[0]?b=arguments[0]:a=arguments[0];break;case 2:"function"==typeof arguments[0]?(b=arguments[0],c=arguments[1]):(a=arguments[0],b=arguments[1]);break;case 3:a=arguments[0],b=arguments[1],c=arguments[2];break;default:throw new Error("Invalid number of arguments passed.")}a=a||{},c=c||function(a){console.error(a)};var d=a.window||[0,0,this.getWidth(),this.getHeight()],e=a.samples,f=a.interleave;if(d[0]<0||d[1]<0||d[2]>this.getWidth()||d[3]>this.getHeight())throw new Error("Select window is out of image bounds.");if(d[0]>d[2]||d[1]>d[3])throw new Error("Invalid subsets");var g,h=d[2]-d[0],i=d[3]-d[1],j=h*i;if(e){for(g=0;g<e.length;++g)if(e[g]>=this.fileDirectory.SamplesPerPixel)throw new RangeError("Invalid sample index '"+e[g]+"'.")}else for(e=[],g=0;g<this.fileDirectory.SamplesPerPixel;++g)e.push(g);var l;if(f){var m=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,n=Math.max.apply(null,this.fileDirectory.BitsPerSample);l=k(m,n,j*e.length)}else for(l=[],g=0;g<e.length;++g)l.push(this.getArrayForSample(e[g],j));var o=this.getDecoder();if(o.isAsync()){if(!b)throw new Error("No callback specified for asynchronous raster reading.");return this._readRasterAsync(d,e,l,f,b,c)}return b=b||function(){},this._readRaster(d,e,l,f,b,c)},getTiePoints:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var a=[],b=0;b<this.fileDirectory.ModelTiepoint.length;b+=6)a.push({i:this.fileDirectory.ModelTiepoint[b],j:this.fileDirectory.ModelTiepoint[b+1],k:this.fileDirectory.ModelTiepoint[b+2],x:this.fileDirectory.ModelTiepoint[b+3],y:this.fileDirectory.ModelTiepoint[b+4],z:this.fileDirectory.ModelTiepoint[b+5]});return a},getGDALMetadata:function(){var a={};if(!this.fileDirectory.GDAL_METADATA)return null;for(var b=this.fileDirectory.GDAL_METADATA,c=e.parseXml(b.substring(0,b.length-1)),d=c.evaluate("GDALMetadata/Item",c,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),f=0;f<d.snapshotLength;++f){var g=d.snapshotItem(f);a[g.getAttribute("name")]=g.textContent}return a}},b.exports=d},{"./compression/deflate.js":2,"./compression/lzw.js":3,"./compression/packbits.js":4,"./compression/raw.js":5,"./globals.js":9}],9:[function(a,b,c){"use strict";var d,e={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams"},f={};for(d in e)f[e[d]]=parseInt(d);var g=[f.BitsPerSample,f.ExtraSamples,f.SampleFormat,f.StripByteCounts,f.StripOffsets,f.StripRowCounts,f.TileByteCounts,f.TileOffsets],h={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",16:"LONG8",17:"SLONG8",18:"IFD8"},i={};for(d in h)i[h[d]]=parseInt(d);var j={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},k={};for(d in j)k[j[d]]=parseInt(d);var l;"undefined"==typeof window?l=function(b){var c=a("xmldom").DOMParser;return(new c).parseFromString(b,"text/xml")}:"undefined"!=typeof window.DOMParser?l=function(a){return(new window.DOMParser).parseFromString(a,"text/xml")}:"undefined"!=typeof window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")&&(l=function(a){var b=new window.ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b}),b.exports={fieldTags:f,fieldTagNames:e,arrayFields:g,fieldTypes:i,fieldTypeNames:h,geoKeys:k,geoKeyNames:j,parseXml:l}},{xmldom:"xmldom"}],10:[function(a,b,c){"use strict";var d=a("./geotiff.js"),e=function(a,b){var c,e,f,g;if("string"==typeof a||a instanceof String)for(c=new ArrayBuffer(2*a.length),g=new Uint16Array(c),e=0,f=a.length;f>e;++e)g[e]=a.charCodeAt(e);else{if(!(a instanceof ArrayBuffer))throw new Error("Invalid input data given.");c=a}return new d(c,b)};"undefined"!=typeof b&&"undefined"!=typeof b.exports&&(b.exports.parse=e),"undefined"!=typeof window&&(window.GeoTIFF={parse:e})},{"./geotiff.js":7}]},{},[10]);
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="geotiff.min.js"></script>
<script src="reproject.js"></script>
<script src="proj4.js"></script>
<script src="d3-marching-squares.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script>
var width = 680,
height = 500,
barbSize = 40;
var projection = d3.geoConicConformal()
.rotate([82, 0])
.center([0, 34.83158])
.parallels([30, 60])
.scale(2300)
.translate([width / 2, height / 2]);
var canvas = d3.select("body").append("canvas")
.attr("width", width)
.attr("height", height);
var context = canvas.node().getContext("2d");
d3.request("wrf_lambert.tiff")
.responseType('arraybuffer')
.get(function(error, tiffData){
d3.json("world-110m.json", function(error, topojsonData) {
var countries = topojson.feature(topojsonData, topojsonData.objects.countries);
var path = d3.geoPath()
.projection(projection).context(context);
context.beginPath();
context.strokeStyle = "#777";
context.fillStyle = "#aaa";
path(countries);
context.fill();
context.stroke();
var tiff = GeoTIFF.parse(tiffData.response);
var image = tiff.getImage();
var rasters = image.readRasters();
var tiepoint = image.getTiePoints()[0];
var pixelScale = image.getFileDirectory().ModelPixelScale;
var geoTransform = [tiepoint.x, pixelScale[0], 0, tiepoint.y, 0, -1*pixelScale[1]];
var uData = new Array(image.getHeight());
var vData = new Array(image.getHeight());
var spdData = new Array(image.getHeight());
for (var j = 0; j<image.getHeight(); j++){
uData[j] = new Array(image.getWidth());
vData[j] = new Array(image.getWidth());
spdData[j] = new Array(image.getWidth());
for (var i = 0; i<image.getWidth(); i++){
uData[j][i] = rasters[0][i + j*image.getWidth()];
vData[j][i] = rasters[1][i + j*image.getWidth()];
spdData[j][i] = 1.943844492 * Math.sqrt(uData[j][i]*uData[j][i] + vData[j][i]*vData[j][i]);
}
}
var intervalsSpd = [0, 5, 10, 15, 20, 25, 30, 35, 40];
var bandsSpd = rastertools.isobands(spdData, geoTransform, intervalsSpd);
//console.info(image.getGeoKeys());
var firstProjection='PROJCS["unnamed",\
GEOGCS["unnamed ellipse",\
DATUM["unknown",\
SPHEROID["unnamed",6370997,0]],\
PRIMEM["Greenwich",0],\
UNIT["degree",0.0174532925199433]],\
PROJECTION["Lambert_Conformal_Conic_2SP"],\
PARAMETER["standard_parallel_1",30],\
PARAMETER["standard_parallel_2",60],\
PARAMETER["latitude_of_origin",34.83158],\
PARAMETER["central_meridian",-98],\
PARAMETER["false_easting",0],\
PARAMETER["false_northing",0],\
UNIT["metre",1,\
AUTHORITY["EPSG","9001"]]]';
bandsSpd = reproject.toWgs84(bandsSpd, firstProjection);
var colorScale = d3.scaleSequential(d3.interpolateBuPu);
bandsSpd.features.forEach(function(d, i) {
context.beginPath();
context.globalAlpha = 0.7;
context.fillStyle = colorScale(intervalsSpd[i]/40);
path(d);
context.fill();
});
var xPos = d3.range(barbSize, width, barbSize);
var yPos = d3.range(barbSize, height, barbSize);
xPos.forEach(function(x){
yPos.forEach(function(y){
var coords = projection.invert([x,y]);
coords = proj4(firstProjection).forward(coords);
var px = Math.round((coords[0] - geoTransform[0]) / geoTransform[1]);
var py = Math.round((coords[1] - geoTransform[3]) / geoTransform[5]);
var angle = Math.atan2(vData[py][px],uData[py][px]);
var spd5 = Math.round(spdData[py][px]/5);
var spd10 = Math.floor(spd5/2);
spd5 = spd5%2;
var spd50 = Math.floor(spd10/5);
spd10 = spd10%5;
context.save();
context.translate(x, y);
context.rotate(angle);
context.beginPath();
context.strokeStyle = "#444";
context.fillStyle = "#444";
var pos = -barbSize/2;
var separation = 3;
for(var i=0; i<spd50; i++){
context.moveTo(pos, 0);
context.lineTo(pos+barbSize/8, barbSize/4);
context.lineTo(pos+barbSize/4, 0);
pos = pos + barbSize/4 + separation;
context.fill();
}
for(var i=0; i<spd10; i++){
context.moveTo(pos, 0);
context.lineTo(pos, barbSize/3);
pos = pos + separation
}
if(spd5==1){
if (pos == -barbSize/2){
pos = pos + separation
}
context.moveTo(pos, 0);
context.lineTo(pos, barbSize/6);
}
if(spd5==0 && spd10== 0 && spd50==0){
context.arc(0, 0, 4, 0, 2 * Math.PI, false);
} else {
context.moveTo(-barbSize/2,0);
context.lineTo(barbSize/2,0);
}
context.stroke();
context.restore();
});
});
});
});
</script>
</body>
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.proj4=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({"./includedProjections":[function(a,b,c){var d=[a("./lib/projections/tmerc"),a("./lib/projections/utm"),a("./lib/projections/sterea"),a("./lib/projections/stere"),a("./lib/projections/somerc"),a("./lib/projections/omerc"),a("./lib/projections/lcc"),a("./lib/projections/krovak"),a("./lib/projections/cass"),a("./lib/projections/laea"),a("./lib/projections/aea"),a("./lib/projections/gnom"),a("./lib/projections/cea"),a("./lib/projections/eqc"),a("./lib/projections/poly"),a("./lib/projections/nzmg"),a("./lib/projections/mill"),a("./lib/projections/sinu"),a("./lib/projections/moll"),a("./lib/projections/eqdc"),a("./lib/projections/vandg"),a("./lib/projections/aeqd"),a("./lib/projections/ortho")];b.exports=function(proj4){d.forEach(function(a){proj4.Proj.projections.add(a)})}},{"./lib/projections/aea":40,"./lib/projections/aeqd":41,"./lib/projections/cass":42,"./lib/projections/cea":43,"./lib/projections/eqc":44,"./lib/projections/eqdc":45,"./lib/projections/gnom":47,"./lib/projections/krovak":48,"./lib/projections/laea":49,"./lib/projections/lcc":50,"./lib/projections/mill":53,"./lib/projections/moll":54,"./lib/projections/nzmg":55,"./lib/projections/omerc":56,"./lib/projections/ortho":57,"./lib/projections/poly":58,"./lib/projections/sinu":59,"./lib/projections/somerc":60,"./lib/projections/stere":61,"./lib/projections/sterea":62,"./lib/projections/tmerc":63,"./lib/projections/utm":64,"./lib/projections/vandg":65}],1:[function(a,b,c){function Point(a,b,c){if(!(this instanceof Point))return new Point(a,b,c);if(Array.isArray(a))this.x=a[0],this.y=a[1],this.z=a[2]||0;else if("object"==typeof a)this.x=a.x,this.y=a.y,this.z=a.z||0;else if("string"==typeof a&&"undefined"==typeof b){var d=a.split(",");this.x=parseFloat(d[0],10),this.y=parseFloat(d[1],10),this.z=parseFloat(d[2],10)||0}else this.x=a,this.y=b,this.z=c||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}var d=a("mgrs");Point.fromMGRS=function(a){return new Point(d.toPoint(a))},Point.prototype.toMGRS=function(a){return d.forward([this.x,this.y],a)},b.exports=Point},{mgrs:68}],2:[function(a,b,c){function Projection(a,b){if(!(this instanceof Projection))return new Projection(a);b=b||function(a){if(a)throw a};var c=d(a);if("object"!=typeof c)return void b(a);var f=g(c),h=Projection.projections.get(f.projName);h?(e(this,f),e(this,h),this.init(),b(null,this)):b(a)}var d=a("./parseCode"),e=a("./extend"),f=a("./projections"),g=a("./deriveConstants");Projection.projections=f,Projection.projections.start(),b.exports=Projection},{"./deriveConstants":33,"./extend":34,"./parseCode":37,"./projections":39}],3:[function(a,b,c){b.exports=function(a,b,c){var d,e,f,g=c.x,h=c.y,i=c.z||0;for(f=0;3>f;f++)if(!b||2!==f||void 0!==c.z)switch(0===f?(d=g,e="x"):1===f?(d=h,e="y"):(d=i,e="z"),a.axis[f]){case"e":c[e]=d;break;case"w":c[e]=-d;break;case"n":c[e]=d;break;case"s":c[e]=-d;break;case"u":void 0!==c[e]&&(c.z=d);break;case"d":void 0!==c[e]&&(c.z=-d);break;default:return null}return c}},{}],4:[function(a,b,c){var d=Math.PI/2,e=a("./sign");b.exports=function(a){return Math.abs(a)<d?a:a-e(a)*Math.PI}},{"./sign":21}],5:[function(a,b,c){var d=2*Math.PI,e=3.14159265359,f=a("./sign");b.exports=function(a){return Math.abs(a)<=e?a:a-f(a)*d}},{"./sign":21}],6:[function(a,b,c){b.exports=function(a){return Math.abs(a)>1&&(a=a>1?1:-1),Math.asin(a)}},{}],7:[function(a,b,c){b.exports=function(a){return 1-.25*a*(1+a/16*(3+1.25*a))}},{}],8:[function(a,b,c){b.exports=function(a){return.375*a*(1+.25*a*(1+.46875*a))}},{}],9:[function(a,b,c){b.exports=function(a){return.05859375*a*a*(1+.75*a)}},{}],10:[function(a,b,c){b.exports=function(a){return a*a*a*(35/3072)}},{}],11:[function(a,b,c){b.exports=function(a,b,c){var d=b*c;return a/Math.sqrt(1-d*d)}},{}],12:[function(a,b,c){b.exports=function(a,b,c,d,e){var f,g;f=a/b;for(var h=0;15>h;h++)if(g=(a-(b*f-c*Math.sin(2*f)+d*Math.sin(4*f)-e*Math.sin(6*f)))/(b-2*c*Math.cos(2*f)+4*d*Math.cos(4*f)-6*e*Math.cos(6*f)),f+=g,Math.abs(g)<=1e-10)return f;return NaN}},{}],13:[function(a,b,c){var d=Math.PI/2;b.exports=function(a,b){var c=1-(1-a*a)/(2*a)*Math.log((1-a)/(1+a));if(Math.abs(Math.abs(b)-c)<1e-6)return 0>b?-1*d:d;for(var e,f,g,h,i=Math.asin(.5*b),j=0;30>j;j++)if(f=Math.sin(i),g=Math.cos(i),h=a*f,e=Math.pow(1-h*h,2)/(2*g)*(b/(1-a*a)-f/(1-h*h)+.5/a*Math.log((1-h)/(1+h))),i+=e,Math.abs(e)<=1e-10)return i;return NaN}},{}],14:[function(a,b,c){b.exports=function(a,b,c,d,e){return a*e-b*Math.sin(2*e)+c*Math.sin(4*e)-d*Math.sin(6*e)}},{}],15:[function(a,b,c){b.exports=function(a,b,c){var d=a*b;return c/Math.sqrt(1-d*d)}},{}],16:[function(a,b,c){var d=Math.PI/2;b.exports=function(a,b){for(var c,e,f=.5*a,g=d-2*Math.atan(b),h=0;15>=h;h++)if(c=a*Math.sin(g),e=d-2*Math.atan(b*Math.pow((1-c)/(1+c),f))-g,g+=e,Math.abs(e)<=1e-10)return g;return-9999}},{}],17:[function(a,b,c){var d=1,e=.25,f=.046875,g=.01953125,h=.01068115234375,i=.75,j=.46875,k=.013020833333333334,l=.007120768229166667,m=.3645833333333333,n=.005696614583333333,o=.3076171875;b.exports=function(a){var b=[];b[0]=d-a*(e+a*(f+a*(g+a*h))),b[1]=a*(i-a*(f+a*(g+a*h)));var c=a*a;return b[2]=c*(j-a*(k+a*l)),c*=a,b[3]=c*(m-a*n),b[4]=c*a*o,b}},{}],18:[function(a,b,c){var d=a("./pj_mlfn"),e=1e-10,f=20;b.exports=function(a,b,c){for(var g=1/(1-b),h=a,i=f;i;--i){var j=Math.sin(h),k=1-b*j*j;if(k=(d(h,j,Math.cos(h),c)-a)*(k*Math.sqrt(k))*g,h-=k,Math.abs(k)<e)return h}return h}},{"./pj_mlfn":19}],19:[function(a,b,c){b.exports=function(a,b,c,d){return c*=b,b*=b,d[0]*a-c*(d[1]+b*(d[2]+b*(d[3]+b*d[4])))}},{}],20:[function(a,b,c){b.exports=function(a,b){var c;return a>1e-7?(c=a*b,(1-a*a)*(b/(1-c*c)-.5/a*Math.log((1-c)/(1+c)))):2*b}},{}],21:[function(a,b,c){b.exports=function(a){return 0>a?-1:1}},{}],22:[function(a,b,c){b.exports=function(a,b){return Math.pow((1-a)/(1+a),b)}},{}],23:[function(a,b,c){b.exports=function(a){var b={x:a[0],y:a[1]};return a.length>2&&(b.z=a[2]),a.length>3&&(b.m=a[3]),b}},{}],24:[function(a,b,c){var d=Math.PI/2;b.exports=function(a,b,c){var e=a*c,f=.5*a;return e=Math.pow((1-e)/(1+e),f),Math.tan(.5*(d-b))/e}},{}],25:[function(a,b,c){c.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},c.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},c.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},c.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},c.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},c.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},c.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},c.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},c.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},c.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},c.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},c.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},c.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},c.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},c.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},c.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},{}],26:[function(a,b,c){c.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},c.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},c.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},c.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},c.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},c.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},c.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},c.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},c.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},c.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},c.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},c.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},c.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},c.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},c.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},c.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},c.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},c.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},c.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},c.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},c.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},c.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},c.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},c.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},c.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},c.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},c.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},c.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},c.hough={a:6378270,rf:297,ellipseName:"Hough"},c.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},c.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},c.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},c.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},c.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},c.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},c.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},c.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},c.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},c.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},c.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},c.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"},c.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"},c.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},{}],27:[function(a,b,c){c.greenwich=0,c.lisbon=-9.131906111111,c.paris=2.337229166667,c.bogota=-74.080916666667,c.madrid=-3.687938888889,c.rome=12.452333333333,c.bern=7.439583333333,c.jakarta=106.807719444444,c.ferro=-17.666666666667,c.brussels=4.367975,c.stockholm=18.058277777778,c.athens=23.7163375,c.oslo=10.722916666667},{}],28:[function(a,b,c){c.ft={to_meter:.3048},c["us-ft"]={to_meter:1200/3937}},{}],29:[function(a,b,c){function d(a,b,c){var d;return Array.isArray(c)?(d=g(a,b,c),3===c.length?[d.x,d.y,d.z]:[d.x,d.y]):g(a,b,c)}function e(a){return a instanceof f?a:a.oProj?a.oProj:f(a)}function proj4(a,b,c){a=e(a);var f,g=!1;return"undefined"==typeof b?(b=a,a=h,g=!0):("undefined"!=typeof b.x||Array.isArray(b))&&(c=b,b=a,a=h,g=!0),b=e(b),c?d(a,b,c):(f={forward:function(c){return d(a,b,c)},inverse:function(c){return d(b,a,c)}},g&&(f.oProj=b),f)}var f=a("./Proj"),g=a("./transform"),h=f("WGS84");b.exports=proj4},{"./Proj":2,"./transform":66}],30:[function(a,b,c){var d=Math.PI/2,e=1,f=2,g=3,h=4,i=5,j=484813681109536e-20,k=1.0026,l=.3826834323650898,m=function(a){return this instanceof m?(this.datum_type=h,void(a&&(a.datumCode&&"none"===a.datumCode&&(this.datum_type=i),a.datum_params&&(this.datum_params=a.datum_params.map(parseFloat),0===this.datum_params[0]&&0===this.datum_params[1]&&0===this.datum_params[2]||(this.datum_type=e),this.datum_params.length>3&&(0===this.datum_params[3]&&0===this.datum_params[4]&&0===this.datum_params[5]&&0===this.datum_params[6]||(this.datum_type=f,this.datum_params[3]*=j,this.datum_params[4]*=j,this.datum_params[5]*=j,this.datum_params[6]=this.datum_params[6]/1e6+1))),this.datum_type=a.grids?g:this.datum_type,this.a=a.a,this.b=a.b,this.es=a.es,this.ep2=a.ep2,this.datum_type===g&&(this.grids=a.grids)))):new m(a)};m.prototype={compare_datums:function(a){return this.datum_type!==a.datum_type?!1:this.a!==a.a||Math.abs(this.es-a.es)>5e-11?!1:this.datum_type===e?this.datum_params[0]===a.datum_params[0]&&this.datum_params[1]===a.datum_params[1]&&this.datum_params[2]===a.datum_params[2]:this.datum_type===f?this.datum_params[0]===a.datum_params[0]&&this.datum_params[1]===a.datum_params[1]&&this.datum_params[2]===a.datum_params[2]&&this.datum_params[3]===a.datum_params[3]&&this.datum_params[4]===a.datum_params[4]&&this.datum_params[5]===a.datum_params[5]&&this.datum_params[6]===a.datum_params[6]:this.datum_type===g||a.datum_type===g?this.nadgrids===a.nadgrids:!0},geodetic_to_geocentric:function(a){var b,c,e,f,g,h,i,j=a.x,k=a.y,l=a.z?a.z:0,m=0;if(-d>k&&k>-1.001*d)k=-d;else if(k>d&&1.001*d>k)k=d;else if(-d>k||k>d)return null;return j>Math.PI&&(j-=2*Math.PI),g=Math.sin(k),i=Math.cos(k),h=g*g,f=this.a/Math.sqrt(1-this.es*h),b=(f+l)*i*Math.cos(j),c=(f+l)*i*Math.sin(j),e=(f*(1-this.es)+l)*g,a.x=b,a.y=c,a.z=e,m},geocentric_to_geodetic:function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=1e-12,u=t*t,v=30,w=a.x,x=a.y,y=a.z?a.z:0;if(o=!1,b=Math.sqrt(w*w+x*x),c=Math.sqrt(w*w+x*x+y*y),b/this.a<t){if(o=!0,q=0,c/this.a<t)return r=d,void(s=-this.b)}else q=Math.atan2(x,w);e=y/c,f=b/c,g=1/Math.sqrt(1-this.es*(2-this.es)*f*f),j=f*(1-this.es)*g,k=e*g,p=0;do p++,i=this.a/Math.sqrt(1-this.es*k*k),s=b*j+y*k-i*(1-this.es*k*k),h=this.es*i/(i+s),g=1/Math.sqrt(1-h*(2-h)*f*f),l=f*(1-h)*g,m=e*g,n=m*j-l*k,j=l,k=m;while(n*n>u&&v>p);return r=Math.atan(m/Math.abs(l)),a.x=q,a.y=r,a.z=s,a},geocentric_to_geodetic_noniter:function(a){var b,c,e,f,g,h,i,j,m,n,o,p,q,r,s,t,u,v=a.x,w=a.y,x=a.z?a.z:0;if(v=parseFloat(v),w=parseFloat(w),x=parseFloat(x),u=!1,0!==v)b=Math.atan2(w,v);else if(w>0)b=d;else if(0>w)b=-d;else if(u=!0,b=0,x>0)c=d;else{if(!(0>x))return c=d,void(e=-this.b);c=-d}return g=v*v+w*w,f=Math.sqrt(g),h=x*k,j=Math.sqrt(h*h+g),n=h/j,p=f/j,o=n*n*n,i=x+this.b*this.ep2*o,t=f-this.a*this.es*p*p*p,m=Math.sqrt(i*i+t*t),q=i/m,r=t/m,s=this.a/Math.sqrt(1-this.es*q*q),e=r>=l?f/r-s:-l>=r?f/-r-s:x/q+s*(this.es-1),u===!1&&(c=Math.atan(q/r)),a.x=b,a.y=c,a.z=e,a},geocentric_to_wgs84:function(a){if(this.datum_type===e)a.x+=this.datum_params[0],a.y+=this.datum_params[1],a.z+=this.datum_params[2];else if(this.datum_type===f){var b=this.datum_params[0],c=this.datum_params[1],d=this.datum_params[2],g=this.datum_params[3],h=this.datum_params[4],i=this.datum_params[5],j=this.datum_params[6],k=j*(a.x-i*a.y+h*a.z)+b,l=j*(i*a.x+a.y-g*a.z)+c,m=j*(-h*a.x+g*a.y+a.z)+d;a.x=k,a.y=l,a.z=m}},geocentric_from_wgs84:function(a){if(this.datum_type===e)a.x-=this.datum_params[0],a.y-=this.datum_params[1],a.z-=this.datum_params[2];else if(this.datum_type===f){var b=this.datum_params[0],c=this.datum_params[1],d=this.datum_params[2],g=this.datum_params[3],h=this.datum_params[4],i=this.datum_params[5],j=this.datum_params[6],k=(a.x-b)/j,l=(a.y-c)/j,m=(a.z-d)/j;a.x=k+i*l-h*m,a.y=-i*k+l+g*m,a.z=h*k-g*l+m}}},b.exports=m},{}],31:[function(a,b,c){var d=1,e=2,f=3,g=5,h=6378137,i=.006694379990141316;b.exports=function(a,b,c){function j(a){return a===d||a===e}var k,l,m;if(a.compare_datums(b))return c;if(a.datum_type===g||b.datum_type===g)return c;var n=a.a,o=a.es,p=b.a,q=b.es,r=a.datum_type;if(r===f)if(0===this.apply_gridshift(a,0,c))a.a=h,a.es=i;else{if(!a.datum_params)return a.a=n,a.es=a.es,c;for(k=1,l=0,m=a.datum_params.length;m>l;l++)k*=a.datum_params[l];if(0===k)return a.a=n,a.es=a.es,c;r=a.datum_params.length>3?e:d}return b.datum_type===f&&(b.a=h,b.es=i),(a.es!==b.es||a.a!==b.a||j(r)||j(b.datum_type))&&(a.geodetic_to_geocentric(c),j(a.datum_type)&&a.geocentric_to_wgs84(c),j(b.datum_type)&&b.geocentric_from_wgs84(c),b.geocentric_to_geodetic(c)),b.datum_type===f&&this.apply_gridshift(b,1,c),a.a=n,a.es=o,b.a=p,b.es=q,c}},{}],32:[function(a,b,c){function d(a){var b=this;if(2===arguments.length){var c=arguments[1];"string"==typeof c?"+"===c.charAt(0)?d[a]=f(arguments[1]):d[a]=g(arguments[1]):d[a]=c}else if(1===arguments.length){if(Array.isArray(a))return a.map(function(a){Array.isArray(a)?d.apply(b,a):d(a)});if("string"==typeof a){if(a in d)return d[a]}else"EPSG"in a?d["EPSG:"+a.EPSG]=a:"ESRI"in a?d["ESRI:"+a.ESRI]=a:"IAU2000"in a?d["IAU2000:"+a.IAU2000]=a:console.log(a);return}}var e=a("./global"),f=a("./projString"),g=a("./wkt");e(d),b.exports=d},{"./global":35,"./projString":38,"./wkt":67}],33:[function(a,b,c){var d=a("./constants/Datum"),e=a("./constants/Ellipsoid"),f=a("./extend"),g=a("./datum"),h=1e-10,i=.16666666666666666,j=.04722222222222222,k=.022156084656084655;b.exports=function(a){if(a.datumCode&&"none"!==a.datumCode){var b=d[a.datumCode];b&&(a.datum_params=b.towgs84?b.towgs84.split(","):null,a.ellps=b.ellipse,a.datumName=b.datumName?b.datumName:a.datumCode)}if(!a.a){var c=e[a.ellps]?e[a.ellps]:e.WGS84;f(a,c)}return a.rf&&!a.b&&(a.b=(1-1/a.rf)*a.a),(0===a.rf||Math.abs(a.a-a.b)<h)&&(a.sphere=!0,a.b=a.a),a.a2=a.a*a.a,a.b2=a.b*a.b,a.es=(a.a2-a.b2)/a.a2,a.e=Math.sqrt(a.es),a.R_A&&(a.a*=1-a.es*(i+a.es*(j+a.es*k)),a.a2=a.a*a.a,a.b2=a.b*a.b,a.es=0),a.ep2=(a.a2-a.b2)/a.b2,a.k0||(a.k0=1),a.axis||(a.axis="enu"),a.datum||(a.datum=g(a)),a}},{"./constants/Datum":25,"./constants/Ellipsoid":26,"./datum":30,"./extend":34}],34:[function(a,b,c){b.exports=function(a,b){a=a||{};var c,d;if(!b)return a;for(d in b)c=b[d],void 0!==c&&(a[d]=c);return a}},{}],35:[function(a,b,c){b.exports=function(a){a("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),a("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),a("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),a.WGS84=a["EPSG:4326"],a["EPSG:3785"]=a["EPSG:3857"],a.GOOGLE=a["EPSG:3857"],a["EPSG:900913"]=a["EPSG:3857"],a["EPSG:102113"]=a["EPSG:3857"]}},{}],36:[function(a,b,c){var proj4=a("./core");proj4.defaultDatum="WGS84",proj4.Proj=a("./Proj"),proj4.WGS84=new proj4.Proj("WGS84"),proj4.Point=a("./Point"),proj4.toPoint=a("./common/toPoint"),proj4.defs=a("./defs"),proj4.transform=a("./transform"),proj4.mgrs=a("mgrs"),proj4.version=a("../package.json").version,a("./includedProjections")(proj4),b.exports=proj4},{"../package.json":69,"./Point":1,"./Proj":2,"./common/toPoint":23,"./core":29,"./defs":32,"./includedProjections":"./includedProjections","./transform":66,mgrs:68}],37:[function(a,b,c){function d(a){return"string"==typeof a}function e(a){return a in i}function f(a){var b=["GEOGCS","GEOCCS","PROJCS","LOCAL_CS"];return b.reduce(function(b,c){return b+1+a.indexOf(c)},0)}function g(a){return"+"===a[0]}function h(a){return d(a)?e(a)?i[a]:f(a)?j(a):g(a)?k(a):void 0:a}var i=a("./defs"),j=a("./wkt"),k=a("./projString");b.exports=h},{"./defs":32,"./projString":38,"./wkt":67}],38:[function(a,b,c){var d=.017453292519943295,e=a("./constants/PrimeMeridian"),f=a("./constants/units");b.exports=function(a){var b={},c={};a.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).forEach(function(a){var b=a.split("=");b.push(!0),c[b[0].toLowerCase()]=b[1]});var g,h,i,j={proj:"projName",datum:"datumCode",rf:function(a){b.rf=parseFloat(a)},lat_0:function(a){b.lat0=a*d},lat_1:function(a){b.lat1=a*d},lat_2:function(a){b.lat2=a*d},lat_ts:function(a){b.lat_ts=a*d},lon_0:function(a){b.long0=a*d},lon_1:function(a){b.long1=a*d},lon_2:function(a){b.long2=a*d},alpha:function(a){b.alpha=parseFloat(a)*d},lonc:function(a){b.longc=a*d},x_0:function(a){b.x0=parseFloat(a)},y_0:function(a){b.y0=parseFloat(a)},k_0:function(a){b.k0=parseFloat(a)},k:function(a){b.k0=parseFloat(a)},a:function(a){b.a=parseFloat(a)},b:function(a){b.b=parseFloat(a)},r_a:function(){b.R_A=!0},zone:function(a){b.zone=parseInt(a,10)},south:function(){b.utmSouth=!0},towgs84:function(a){b.datum_params=a.split(",").map(function(a){return parseFloat(a)})},to_meter:function(a){b.to_meter=parseFloat(a)},units:function(a){b.units=a,f[a]&&(b.to_meter=f[a].to_meter)},from_greenwich:function(a){b.from_greenwich=a*d},pm:function(a){b.from_greenwich=(e[a]?e[a]:parseFloat(a))*d},nadgrids:function(a){"@null"===a?b.datumCode="none":b.nadgrids=a},axis:function(a){var c="ewnsud";3===a.length&&-1!==c.indexOf(a.substr(0,1))&&-1!==c.indexOf(a.substr(1,1))&&-1!==c.indexOf(a.substr(2,1))&&(b.axis=a)}};for(g in c)h=c[g],g in j?(i=j[g],"function"==typeof i?i(h):b[i]=h):b[g]=h;return"string"==typeof b.datumCode&&"WGS84"!==b.datumCode&&(b.datumCode=b.datumCode.toLowerCase()),b}},{"./constants/PrimeMeridian":27,"./constants/units":28}],39:[function(a,b,c){function d(a,b){var c=g.length;return a.names?(g[c]=a,a.names.forEach(function(a){f[a.toLowerCase()]=c}),this):(console.log(b),!0)}var e=[a("./projections/merc"),a("./projections/longlat")],f={},g=[];c.add=d,c.get=function(a){if(!a)return!1;var b=a.toLowerCase();return"undefined"!=typeof f[b]&&g[f[b]]?g[f[b]]:void 0},c.start=function(){e.forEach(d)}},{"./projections/longlat":51,"./projections/merc":52}],40:[function(a,b,c){var d=1e-10,e=a("../common/msfnz"),f=a("../common/qsfnz"),g=a("../common/adjust_lon"),h=a("../common/asinz");c.init=function(){Math.abs(this.lat1+this.lat2)<d||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=e(this.e3,this.sin_po,this.cos_po),this.qs1=f(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=e(this.e3,this.sin_po,this.cos_po),this.qs2=f(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=f(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>d?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},c.forward=function(a){var b=a.x,c=a.y;this.sin_phi=Math.sin(c),this.cos_phi=Math.cos(c);var d=f(this.e3,this.sin_phi,this.cos_phi),e=this.a*Math.sqrt(this.c-this.ns0*d)/this.ns0,h=this.ns0*g(b-this.long0),i=e*Math.sin(h)+this.x0,j=this.rh-e*Math.cos(h)+this.y0;return a.x=i,a.y=j,a},c.inverse=function(a){var b,c,d,e,f,h;return a.x-=this.x0,a.y=this.rh-a.y+this.y0,this.ns0>=0?(b=Math.sqrt(a.x*a.x+a.y*a.y),d=1):(b=-Math.sqrt(a.x*a.x+a.y*a.y),d=-1),e=0,0!==b&&(e=Math.atan2(d*a.x,d*a.y)),d=b*this.ns0/this.a,this.sphere?h=Math.asin((this.c-d*d)/(2*this.ns0)):(c=(this.c-d*d)/this.ns0,h=this.phi1z(this.e3,c)),f=g(e/this.ns0+this.long0),a.x=f,a.y=h,a},c.phi1z=function(a,b){var c,e,f,g,i,j=h(.5*b);if(d>a)return j;for(var k=a*a,l=1;25>=l;l++)if(c=Math.sin(j),e=Math.cos(j),f=a*c,g=1-f*f,i=.5*g*g/e*(b/(1-k)-c/g+.5/a*Math.log((1-f)/(1+f))),j+=i,Math.abs(i)<=1e-7)return j;return null},c.names=["Albers_Conic_Equal_Area","Albers","aea"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/msfnz":15,"../common/qsfnz":20}],41:[function(a,b,c){var d=a("../common/adjust_lon"),e=Math.PI/2,f=1e-10,g=a("../common/mlfn"),h=a("../common/e0fn"),i=a("../common/e1fn"),j=a("../common/e2fn"),k=a("../common/e3fn"),l=a("../common/gN"),m=a("../common/asinz"),n=a("../common/imlfn");c.init=function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},c.forward=function(a){var b,c,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=a.x,I=a.y,J=Math.sin(a.y),K=Math.cos(a.y),L=d(H-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=f?(a.x=this.x0+this.a*(e-I)*Math.sin(L),a.y=this.y0-this.a*(e-I)*Math.cos(L),a):Math.abs(this.sin_p12+1)<=f?(a.x=this.x0+this.a*(e+I)*Math.sin(L),a.y=this.y0+this.a*(e+I)*Math.cos(L),a):(B=this.sin_p12*J+this.cos_p12*K*Math.cos(L),z=Math.acos(B),A=z/Math.sin(z),a.x=this.x0+this.a*A*K*Math.sin(L),a.y=this.y0+this.a*A*(this.cos_p12*J-this.sin_p12*K*Math.cos(L)),a):(b=h(this.es),c=i(this.es),m=j(this.es),n=k(this.es),Math.abs(this.sin_p12-1)<=f?(o=this.a*g(b,c,m,n,e),p=this.a*g(b,c,m,n,I),a.x=this.x0+(o-p)*Math.sin(L),a.y=this.y0-(o-p)*Math.cos(L),a):Math.abs(this.sin_p12+1)<=f?(o=this.a*g(b,c,m,n,e),p=this.a*g(b,c,m,n,I),a.x=this.x0+(o+p)*Math.sin(L),a.y=this.y0+(o+p)*Math.cos(L),a):(q=J/K,r=l(this.a,this.e,this.sin_p12),s=l(this.a,this.e,J),t=Math.atan((1-this.es)*q+this.es*r*this.sin_p12/(s*K)),u=Math.atan2(Math.sin(L),this.cos_p12*Math.tan(t)-this.sin_p12*Math.cos(L)),C=0===u?Math.asin(this.cos_p12*Math.sin(t)-this.sin_p12*Math.cos(t)):Math.abs(Math.abs(u)-Math.PI)<=f?-Math.asin(this.cos_p12*Math.sin(t)-this.sin_p12*Math.cos(t)):Math.asin(Math.sin(L)*Math.cos(t)/Math.sin(u)),v=this.e*this.sin_p12/Math.sqrt(1-this.es),w=this.e*this.cos_p12*Math.cos(u)/Math.sqrt(1-this.es),x=v*w,y=w*w,D=C*C,E=D*C,F=E*C,G=F*C,z=r*C*(1-D*y*(1-y)/6+E/8*x*(1-2*y)+F/120*(y*(4-7*y)-3*v*v*(1-7*y))-G/48*x),a.x=this.x0+z*Math.sin(u),a.y=this.y0+z*Math.cos(u),a))},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b,c,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I;if(this.sphere){if(b=Math.sqrt(a.x*a.x+a.y*a.y),b>2*e*this.a)return;return c=b/this.a,o=Math.sin(c),p=Math.cos(c),q=this.long0,Math.abs(b)<=f?r=this.lat0:(r=m(p*this.sin_p12+a.y*o*this.cos_p12/b),s=Math.abs(this.lat0)-e,q=d(Math.abs(s)<=f?this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y):this.long0+Math.atan2(a.x*o,b*this.cos_p12*p-a.y*this.sin_p12*o))),a.x=q,a.y=r,a}return t=h(this.es),u=i(this.es),v=j(this.es),w=k(this.es),Math.abs(this.sin_p12-1)<=f?(x=this.a*g(t,u,v,w,e),b=Math.sqrt(a.x*a.x+a.y*a.y),y=x-b,r=n(y/this.a,t,u,v,w),q=d(this.long0+Math.atan2(a.x,-1*a.y)),a.x=q,a.y=r,a):Math.abs(this.sin_p12+1)<=f?(x=this.a*g(t,u,v,w,e),b=Math.sqrt(a.x*a.x+a.y*a.y),y=b-x,r=n(y/this.a,t,u,v,w),q=d(this.long0+Math.atan2(a.x,a.y)),a.x=q,a.y=r,a):(b=Math.sqrt(a.x*a.x+a.y*a.y),B=Math.atan2(a.x,a.y),z=l(this.a,this.e,this.sin_p12),C=Math.cos(B),D=this.e*this.cos_p12*C,E=-D*D/(1-this.es),F=3*this.es*(1-E)*this.sin_p12*this.cos_p12*C/(1-this.es),G=b/z,H=G-E*(1+E)*Math.pow(G,3)/6-F*(1+3*E)*Math.pow(G,4)/24,I=1-E*H*H/2-G*H*H*H/6,A=Math.asin(this.sin_p12*Math.cos(H)+this.cos_p12*Math.sin(H)*C),q=d(this.long0+Math.asin(Math.sin(B)*Math.sin(H)/Math.cos(A))),r=Math.atan((1-this.es*I*this.sin_p12/Math.sin(A))*Math.tan(A)/(1-this.es)),a.x=q,a.y=r,a)},c.names=["Azimuthal_Equidistant","aeqd"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],42:[function(a,b,c){var d=a("../common/mlfn"),e=a("../common/e0fn"),f=a("../common/e1fn"),g=a("../common/e2fn"),h=a("../common/e3fn"),i=a("../common/gN"),j=a("../common/adjust_lon"),k=a("../common/adjust_lat"),l=a("../common/imlfn"),m=Math.PI/2,n=1e-10;c.init=function(){this.sphere||(this.e0=e(this.es),this.e1=f(this.es),this.e2=g(this.es),this.e3=h(this.es),this.ml0=this.a*d(this.e0,this.e1,this.e2,this.e3,this.lat0))},c.forward=function(a){var b,c,e=a.x,f=a.y;if(e=j(e-this.long0),this.sphere)b=this.a*Math.asin(Math.cos(f)*Math.sin(e)),c=this.a*(Math.atan2(Math.tan(f),Math.cos(e))-this.lat0);else{var g=Math.sin(f),h=Math.cos(f),k=i(this.a,this.e,g),l=Math.tan(f)*Math.tan(f),m=e*Math.cos(f),n=m*m,o=this.es*h*h/(1-this.es),p=this.a*d(this.e0,this.e1,this.e2,this.e3,f);b=k*m*(1-n*l*(1/6-(8-l+8*o)*n/120)),c=p-this.ml0+k*g/h*n*(.5+(5-l+6*o)*n/24)}return a.x=b+this.x0,a.y=c+this.y0,a},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b,c,d=a.x/this.a,e=a.y/this.a;if(this.sphere){var f=e+this.lat0;b=Math.asin(Math.sin(f)*Math.cos(d)),c=Math.atan2(Math.tan(d),Math.cos(f))}else{var g=this.ml0/this.a+e,h=l(g,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-m)<=n)return a.x=this.long0,a.y=m,0>e&&(a.y*=-1),a;var o=i(this.a,this.e,Math.sin(h)),p=o*o*o/this.a/this.a*(1-this.es),q=Math.pow(Math.tan(h),2),r=d*this.a/o,s=r*r;b=h-o*Math.tan(h)/p*r*r*(.5-(1+3*q)*r*r/24),c=r*(1-s*(q/3+(1+3*q)*q*s/15))/Math.cos(h)}return a.x=j(c+this.long0),a.y=k(b),a},c.names=["Cassini","Cassini_Soldner","cass"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],43:[function(a,b,c){var d=a("../common/adjust_lon"),e=a("../common/qsfnz"),f=a("../common/msfnz"),g=a("../common/iqsfnz");c.init=function(){this.sphere||(this.k0=f(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},c.forward=function(a){var b,c,f=a.x,g=a.y,h=d(f-this.long0);if(this.sphere)b=this.x0+this.a*h*Math.cos(this.lat_ts),c=this.y0+this.a*Math.sin(g)/Math.cos(this.lat_ts);else{var i=e(this.e,Math.sin(g));b=this.x0+this.a*this.k0*h,c=this.y0+this.a*i*.5/this.k0}return a.x=b,a.y=c,a},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b,c;return this.sphere?(b=d(this.long0+a.x/this.a/Math.cos(this.lat_ts)),c=Math.asin(a.y/this.a*Math.cos(this.lat_ts))):(c=g(this.e,2*a.y*this.k0/this.a),b=d(this.long0+a.x/(this.a*this.k0))),a.x=b,a.y=c,a},c.names=["cea"]},{"../common/adjust_lon":5,"../common/iqsfnz":13,"../common/msfnz":15,"../common/qsfnz":20}],44:[function(a,b,c){var d=a("../common/adjust_lon"),e=a("../common/adjust_lat");c.init=function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},c.forward=function(a){var b=a.x,c=a.y,f=d(b-this.long0),g=e(c-this.lat0);return a.x=this.x0+this.a*f*this.rc,a.y=this.y0+this.a*g,a},c.inverse=function(a){var b=a.x,c=a.y;return a.x=d(this.long0+(b-this.x0)/(this.a*this.rc)),a.y=e(this.lat0+(c-this.y0)/this.a),a},c.names=["Equirectangular","Equidistant_Cylindrical","eqc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5}],45:[function(a,b,c){var d=a("../common/e0fn"),e=a("../common/e1fn"),f=a("../common/e2fn"),g=a("../common/e3fn"),h=a("../common/msfnz"),i=a("../common/mlfn"),j=a("../common/adjust_lon"),k=a("../common/adjust_lat"),l=a("../common/imlfn"),m=1e-10;c.init=function(){Math.abs(this.lat1+this.lat2)<m||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=d(this.es),this.e1=e(this.es),this.e2=f(this.es),this.e3=g(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=h(this.e,this.sinphi,this.cosphi),this.ml1=i(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<m?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=h(this.e,this.sinphi,this.cosphi),this.ml2=i(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=i(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},c.forward=function(a){var b,c=a.x,d=a.y;if(this.sphere)b=this.a*(this.g-d);else{var e=i(this.e0,this.e1,this.e2,this.e3,d);b=this.a*(this.g-e)}var f=this.ns*j(c-this.long0),g=this.x0+b*Math.sin(f),h=this.y0+this.rh-b*Math.cos(f);return a.x=g,a.y=h,a},c.inverse=function(a){a.x-=this.x0,a.y=this.rh-a.y+this.y0;var b,c,d,e;this.ns>=0?(c=Math.sqrt(a.x*a.x+a.y*a.y),
b=1):(c=-Math.sqrt(a.x*a.x+a.y*a.y),b=-1);var f=0;if(0!==c&&(f=Math.atan2(b*a.x,b*a.y)),this.sphere)return e=j(this.long0+f/this.ns),d=k(this.g-c/this.a),a.x=e,a.y=d,a;var g=this.g-c/this.a;return d=l(g,this.e0,this.e1,this.e2,this.e3),e=j(this.long0+f/this.ns),a.x=e,a.y=d,a},c.names=["Equidistant_Conic","eqdc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/imlfn":12,"../common/mlfn":14,"../common/msfnz":15}],46:[function(a,b,c){var d=Math.PI/4,e=a("../common/srat"),f=Math.PI/2,g=20;c.init=function(){var a=Math.sin(this.lat0),b=Math.cos(this.lat0);b*=b,this.rc=Math.sqrt(1-this.es)/(1-this.es*a*a),this.C=Math.sqrt(1+this.es*b*b/(1-this.es)),this.phic0=Math.asin(a/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+d)/(Math.pow(Math.tan(.5*this.lat0+d),this.C)*e(this.e*a,this.ratexp))},c.forward=function(a){var b=a.x,c=a.y;return a.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*c+d),this.C)*e(this.e*Math.sin(c),this.ratexp))-f,a.x=this.C*b,a},c.inverse=function(a){for(var b=1e-14,c=a.x/this.C,h=a.y,i=Math.pow(Math.tan(.5*h+d)/this.K,1/this.C),j=g;j>0&&(h=2*Math.atan(i*e(this.e*Math.sin(a.y),-.5*this.e))-f,!(Math.abs(h-a.y)<b));--j)a.y=h;return j?(a.x=c,a.y=h,a):null},c.names=["gauss"]},{"../common/srat":22}],47:[function(a,b,c){var d=a("../common/adjust_lon"),e=1e-10,f=a("../common/asinz");c.init=function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},c.forward=function(a){var b,c,f,g,h,i,j,k,l=a.x,m=a.y;return f=d(l-this.long0),b=Math.sin(m),c=Math.cos(m),g=Math.cos(f),i=this.sin_p14*b+this.cos_p14*c*g,h=1,i>0||Math.abs(i)<=e?(j=this.x0+this.a*h*c*Math.sin(f)/i,k=this.y0+this.a*h*(this.cos_p14*b-this.sin_p14*c*g)/i):(j=this.x0+this.infinity_dist*c*Math.sin(f),k=this.y0+this.infinity_dist*(this.cos_p14*b-this.sin_p14*c*g)),a.x=j,a.y=k,a},c.inverse=function(a){var b,c,e,g,h,i;return a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,(b=Math.sqrt(a.x*a.x+a.y*a.y))?(g=Math.atan2(b,this.rc),c=Math.sin(g),e=Math.cos(g),i=f(e*this.sin_p14+a.y*c*this.cos_p14/b),h=Math.atan2(a.x*c,b*this.cos_p14*e-a.y*this.sin_p14*c),h=d(this.long0+h)):(i=this.phic0,h=0),a.x=h,a.y=i,a},c.names=["gnom"]},{"../common/adjust_lon":5,"../common/asinz":6}],48:[function(a,b,c){var d=a("../common/adjust_lon");c.init=function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},c.forward=function(a){var b,c,e,f,g,h,i,j=a.x,k=a.y,l=d(j-this.long0);return b=Math.pow((1+this.e*Math.sin(k))/(1-this.e*Math.sin(k)),this.alfa*this.e/2),c=2*(Math.atan(this.k*Math.pow(Math.tan(k/2+this.s45),this.alfa)/b)-this.s45),e=-l*this.alfa,f=Math.asin(Math.cos(this.ad)*Math.sin(c)+Math.sin(this.ad)*Math.cos(c)*Math.cos(e)),g=Math.asin(Math.cos(c)*Math.sin(e)/Math.cos(f)),h=this.n*g,i=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(f/2+this.s45),this.n),a.y=i*Math.cos(h)/1,a.x=i*Math.sin(h)/1,this.czech||(a.y*=-1,a.x*=-1),a},c.inverse=function(a){var b,c,d,e,f,g,h,i,j=a.x;a.x=a.y,a.y=j,this.czech||(a.y*=-1,a.x*=-1),g=Math.sqrt(a.x*a.x+a.y*a.y),f=Math.atan2(a.y,a.x),e=f/Math.sin(this.s0),d=2*(Math.atan(Math.pow(this.ro0/g,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),b=Math.asin(Math.cos(this.ad)*Math.sin(d)-Math.sin(this.ad)*Math.cos(d)*Math.cos(e)),c=Math.asin(Math.cos(d)*Math.sin(e)/Math.cos(b)),a.x=this.long0-c/this.alfa,h=b,i=0;var k=0;do a.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(b/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.e/2))-this.s45),Math.abs(h-a.y)<1e-10&&(i=1),h=a.y,k+=1;while(0===i&&15>k);return k>=15?null:a},c.names=["Krovak","krovak"]},{"../common/adjust_lon":5}],49:[function(a,b,c){var d=Math.PI/2,e=Math.PI/4,f=1e-10,g=a("../common/qsfnz"),h=a("../common/adjust_lon");c.S_POLE=1,c.N_POLE=2,c.EQUIT=3,c.OBLIQ=4,c.init=function(){var a=Math.abs(this.lat0);if(Math.abs(a-d)<f?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(a)<f?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var b;switch(this.qp=g(this.e,1),this.mmf=.5/(1-this.es),this.apa=this.authset(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),b=Math.sin(this.lat0),this.sinb1=g(this.e,b)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*b*b)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},c.forward=function(a){var b,c,i,j,k,l,m,n,o,p,q=a.x,r=a.y;if(q=h(q-this.long0),this.sphere){if(k=Math.sin(r),p=Math.cos(r),i=Math.cos(q),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c=this.mode===this.EQUIT?1+p*i:1+this.sinph0*k+this.cosph0*p*i,f>=c)return null;c=Math.sqrt(2/c),b=c*p*Math.sin(q),c*=this.mode===this.EQUIT?k:this.cosph0*k-this.sinph0*p*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(r+this.phi0)<f)return null;c=e-.5*r,c=2*(this.mode===this.S_POLE?Math.cos(c):Math.sin(c)),b=c*Math.sin(q),c*=i}}else{switch(m=0,n=0,o=0,i=Math.cos(q),j=Math.sin(q),k=Math.sin(r),l=g(this.e,k),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=l/this.qp,n=Math.sqrt(1-m*m)),this.mode){case this.OBLIQ:o=1+this.sinb1*m+this.cosb1*n*i;break;case this.EQUIT:o=1+n*i;break;case this.N_POLE:o=d+r,l=this.qp-l;break;case this.S_POLE:o=r-d,l=this.qp+l}if(Math.abs(o)<f)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:o=Math.sqrt(2/o),c=this.mode===this.OBLIQ?this.ymf*o*(this.cosb1*m-this.sinb1*n*i):(o=Math.sqrt(2/(1+n*i)))*m*this.ymf,b=this.xmf*o*n*j;break;case this.N_POLE:case this.S_POLE:l>=0?(b=(o=Math.sqrt(l))*j,c=i*(this.mode===this.S_POLE?o:-o)):b=c=0}}return a.x=this.a*b+this.x0,a.y=this.a*c+this.y0,a},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b,c,e,g,i,j,k,l=a.x/this.a,m=a.y/this.a;if(this.sphere){var n,o=0,p=0;if(n=Math.sqrt(l*l+m*m),c=.5*n,c>1)return null;switch(c=2*Math.asin(c),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(p=Math.sin(c),o=Math.cos(c)),this.mode){case this.EQUIT:c=Math.abs(n)<=f?0:Math.asin(m*p/n),l*=p,m=o*n;break;case this.OBLIQ:c=Math.abs(n)<=f?this.phi0:Math.asin(o*this.sinph0+m*p*this.cosph0/n),l*=p*this.cosph0,m=(o-Math.sin(c)*this.sinph0)*n;break;case this.N_POLE:m=-m,c=d-c;break;case this.S_POLE:c-=d}b=0!==m||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,m):0}else{if(k=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,m*=this.dd,j=Math.sqrt(l*l+m*m),f>j)return a.x=0,a.y=this.phi0,a;g=2*Math.asin(.5*j/this.rq),e=Math.cos(g),l*=g=Math.sin(g),this.mode===this.OBLIQ?(k=e*this.sinb1+m*g*this.cosb1/j,i=this.qp*k,m=j*this.cosb1*e-m*this.sinb1*g):(k=m*g/j,i=this.qp*k,m=j*e)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(m=-m),i=l*l+m*m,!i)return a.x=0,a.y=this.phi0,a;k=1-i/this.qp,this.mode===this.S_POLE&&(k=-k)}b=Math.atan2(l,m),c=this.authlat(Math.asin(k),this.apa)}return a.x=h(this.long0+b),a.y=c,a},c.P00=.3333333333333333,c.P01=.17222222222222222,c.P02=.10257936507936508,c.P10=.06388888888888888,c.P11=.0664021164021164,c.P20=.016415012942191543,c.authset=function(a){var b,c=[];return c[0]=a*this.P00,b=a*a,c[0]+=b*this.P01,c[1]=b*this.P10,b*=a,c[0]+=b*this.P02,c[1]+=b*this.P11,c[2]=b*this.P20,c},c.authlat=function(a,b){var c=a+a;return a+b[0]*Math.sin(c)+b[1]*Math.sin(c+c)+b[2]*Math.sin(c+c+c)},c.names=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"]},{"../common/adjust_lon":5,"../common/qsfnz":20}],50:[function(a,b,c){var d=1e-10,e=a("../common/msfnz"),f=a("../common/tsfnz"),g=Math.PI/2,h=a("../common/sign"),i=a("../common/adjust_lon"),j=a("../common/phi2z");c.init=function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<d)){var a=this.b/this.a;this.e=Math.sqrt(1-a*a);var b=Math.sin(this.lat1),c=Math.cos(this.lat1),g=e(this.e,b,c),h=f(this.e,this.lat1,b),i=Math.sin(this.lat2),j=Math.cos(this.lat2),k=e(this.e,i,j),l=f(this.e,this.lat2,i),m=f(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>d?this.ns=Math.log(g/k)/Math.log(h/l):this.ns=b,isNaN(this.ns)&&(this.ns=b),this.f0=g/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(m,this.ns),this.title||(this.title="Lambert Conformal Conic")}},c.forward=function(a){var b=a.x,c=a.y;Math.abs(2*Math.abs(c)-Math.PI)<=d&&(c=h(c)*(g-2*d));var e,j,k=Math.abs(Math.abs(c)-g);if(k>d)e=f(this.e,c,Math.sin(c)),j=this.a*this.f0*Math.pow(e,this.ns);else{if(k=c*this.ns,0>=k)return null;j=0}var l=this.ns*i(b-this.long0);return a.x=this.k0*(j*Math.sin(l))+this.x0,a.y=this.k0*(this.rh-j*Math.cos(l))+this.y0,a},c.inverse=function(a){var b,c,d,e,f,h=(a.x-this.x0)/this.k0,k=this.rh-(a.y-this.y0)/this.k0;this.ns>0?(b=Math.sqrt(h*h+k*k),c=1):(b=-Math.sqrt(h*h+k*k),c=-1);var l=0;if(0!==b&&(l=Math.atan2(c*h,c*k)),0!==b||this.ns>0){if(c=1/this.ns,d=Math.pow(b/(this.a*this.f0),c),e=j(this.e,d),-9999===e)return null}else e=-g;return f=i(l/this.ns+this.long0),a.x=f,a.y=e,a},c.names=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],51:[function(a,b,c){function d(a){return a}c.init=function(){},c.forward=d,c.inverse=d,c.names=["longlat","identity"]},{}],52:[function(a,b,c){var d=a("../common/msfnz"),e=Math.PI/2,f=1e-10,g=57.29577951308232,h=a("../common/adjust_lon"),i=Math.PI/4,j=a("../common/tsfnz"),k=a("../common/phi2z");c.init=function(){var a=this.b/this.a;this.es=1-a*a,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=d(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},c.forward=function(a){var b=a.x,c=a.y;if(c*g>90&&-90>c*g&&b*g>180&&-180>b*g)return null;var d,k;if(Math.abs(Math.abs(c)-e)<=f)return null;if(this.sphere)d=this.x0+this.a*this.k0*h(b-this.long0),k=this.y0+this.a*this.k0*Math.log(Math.tan(i+.5*c));else{var l=Math.sin(c),m=j(this.e,c,l);d=this.x0+this.a*this.k0*h(b-this.long0),k=this.y0-this.a*this.k0*Math.log(m)}return a.x=d,a.y=k,a},c.inverse=function(a){var b,c,d=a.x-this.x0,f=a.y-this.y0;if(this.sphere)c=e-2*Math.atan(Math.exp(-f/(this.a*this.k0)));else{var g=Math.exp(-f/(this.a*this.k0));if(c=k(this.e,g),-9999===c)return null}return b=h(this.long0+d/(this.a*this.k0)),a.x=b,a.y=c,a},c.names=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/tsfnz":24}],53:[function(a,b,c){var d=a("../common/adjust_lon");c.init=function(){},c.forward=function(a){var b=a.x,c=a.y,e=d(b-this.long0),f=this.x0+this.a*e,g=this.y0+this.a*Math.log(Math.tan(Math.PI/4+c/2.5))*1.25;return a.x=f,a.y=g,a},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b=d(this.long0+a.x/this.a),c=2.5*(Math.atan(Math.exp(.8*a.y/this.a))-Math.PI/4);return a.x=b,a.y=c,a},c.names=["Miller_Cylindrical","mill"]},{"../common/adjust_lon":5}],54:[function(a,b,c){var d=a("../common/adjust_lon"),e=1e-10;c.init=function(){},c.forward=function(a){for(var b=a.x,c=a.y,f=d(b-this.long0),g=c,h=Math.PI*Math.sin(c),i=0;!0;i++){var j=-(g+Math.sin(g)-h)/(1+Math.cos(g));if(g+=j,Math.abs(j)<e)break}g/=2,Math.PI/2-Math.abs(c)<e&&(f=0);var k=.900316316158*this.a*f*Math.cos(g)+this.x0,l=1.4142135623731*this.a*Math.sin(g)+this.y0;return a.x=k,a.y=l,a},c.inverse=function(a){var b,c;a.x-=this.x0,a.y-=this.y0,c=a.y/(1.4142135623731*this.a),Math.abs(c)>.999999999999&&(c=.999999999999),b=Math.asin(c);var e=d(this.long0+a.x/(.900316316158*this.a*Math.cos(b)));e<-Math.PI&&(e=-Math.PI),e>Math.PI&&(e=Math.PI),c=(2*b+Math.sin(2*b))/Math.PI,Math.abs(c)>1&&(c=1);var f=Math.asin(c);return a.x=e,a.y=f,a},c.names=["Mollweide","moll"]},{"../common/adjust_lon":5}],55:[function(a,b,c){var d=484813681109536e-20;c.iterations=1,c.init=function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},c.forward=function(a){var b,c=a.x,e=a.y,f=e-this.lat0,g=c-this.long0,h=f/d*1e-5,i=g,j=1,k=0;for(b=1;10>=b;b++)j*=h,k+=this.A[b]*j;var l,m,n=k,o=i,p=1,q=0,r=0,s=0;for(b=1;6>=b;b++)l=p*n-q*o,m=q*n+p*o,p=l,q=m,r=r+this.B_re[b]*p-this.B_im[b]*q,s=s+this.B_im[b]*p+this.B_re[b]*q;return a.x=s*this.a+this.x0,a.y=r*this.a+this.y0,a},c.inverse=function(a){var b,c,e,f=a.x,g=a.y,h=f-this.x0,i=g-this.y0,j=i/this.a,k=h/this.a,l=1,m=0,n=0,o=0;for(b=1;6>=b;b++)c=l*j-m*k,e=m*j+l*k,l=c,m=e,n=n+this.C_re[b]*l-this.C_im[b]*m,o=o+this.C_im[b]*l+this.C_re[b]*m;for(var p=0;p<this.iterations;p++){var q,r,s=n,t=o,u=j,v=k;for(b=2;6>=b;b++)q=s*n-t*o,r=t*n+s*o,s=q,t=r,u+=(b-1)*(this.B_re[b]*s-this.B_im[b]*t),v+=(b-1)*(this.B_im[b]*s+this.B_re[b]*t);s=1,t=0;var w=this.B_re[1],x=this.B_im[1];for(b=2;6>=b;b++)q=s*n-t*o,r=t*n+s*o,s=q,t=r,w+=b*(this.B_re[b]*s-this.B_im[b]*t),x+=b*(this.B_im[b]*s+this.B_re[b]*t);var y=w*w+x*x;n=(u*w+v*x)/y,o=(v*w-u*x)/y}var z=n,A=o,B=1,C=0;for(b=1;9>=b;b++)B*=z,C+=this.D[b]*B;var D=this.lat0+C*d*1e5,E=this.long0+A;return a.x=E,a.y=D,a},c.names=["New_Zealand_Map_Grid","nzmg"]},{}],56:[function(a,b,c){var d=a("../common/tsfnz"),e=a("../common/adjust_lon"),f=a("../common/phi2z"),g=Math.PI/2,h=Math.PI/4,i=1e-10;c.init=function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var a=Math.sin(this.lat0),b=Math.cos(this.lat0),c=this.e*a;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(b,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-c*c);var f=d(this.e,this.lat0,a),g=this.bl/b*Math.sqrt((1-this.es)/(1-c*c));1>g*g&&(g=1);var h,i;if(isNaN(this.longc)){var j=d(this.e,this.lat1,Math.sin(this.lat1)),k=d(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(g+Math.sqrt(g*g-1))*Math.pow(f,this.bl):this.el=(g-Math.sqrt(g*g-1))*Math.pow(f,this.bl);var l=Math.pow(j,this.bl),m=Math.pow(k,this.bl);h=this.el/l,i=.5*(h-1/h);var n=(this.el*this.el-m*l)/(this.el*this.el+m*l),o=(m-l)/(m+l),p=e(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(n*Math.tan(.5*this.bl*p)/o)/this.bl,this.long0=e(this.long0);var q=e(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*q)/i),this.alpha=Math.asin(g*Math.sin(this.gamma0))}else h=this.lat0>=0?g+Math.sqrt(g*g-1):g-Math.sqrt(g*g-1),this.el=h*Math.pow(f,this.bl),i=.5*(h-1/h),this.gamma0=Math.asin(Math.sin(this.alpha)/g),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(g*g-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(g*g-1),Math.cos(this.alpha))},c.forward=function(a){var b,c,f,j=a.x,k=a.y,l=e(j-this.long0);if(Math.abs(Math.abs(k)-g)<=i)f=k>0?-1:1,c=this.al/this.bl*Math.log(Math.tan(h+f*this.gamma0*.5)),b=-1*f*g*this.al/this.bl;else{var m=d(this.e,k,Math.sin(k)),n=this.el/Math.pow(m,this.bl),o=.5*(n-1/n),p=.5*(n+1/n),q=Math.sin(this.bl*l),r=(o*Math.sin(this.gamma0)-q*Math.cos(this.gamma0))/p;c=Math.abs(Math.abs(r)-1)<=i?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-r)/(1+r))/this.bl,b=Math.abs(Math.cos(this.bl*l))<=i?this.al*this.bl*l:this.al*Math.atan2(o*Math.cos(this.gamma0)+q*Math.sin(this.gamma0),Math.cos(this.bl*l))/this.bl}return this.no_rot?(a.x=this.x0+b,a.y=this.y0+c):(b-=this.uc,a.x=this.x0+c*Math.cos(this.alpha)+b*Math.sin(this.alpha),a.y=this.y0+b*Math.cos(this.alpha)-c*Math.sin(this.alpha)),a},c.inverse=function(a){var b,c;this.no_rot?(c=a.y-this.y0,b=a.x-this.x0):(c=(a.x-this.x0)*Math.cos(this.alpha)-(a.y-this.y0)*Math.sin(this.alpha),b=(a.y-this.y0)*Math.cos(this.alpha)+(a.x-this.x0)*Math.sin(this.alpha),b+=this.uc);var d=Math.exp(-1*this.bl*c/this.al),h=.5*(d-1/d),j=.5*(d+1/d),k=Math.sin(this.bl*b/this.al),l=(k*Math.cos(this.gamma0)+h*Math.sin(this.gamma0))/j,m=Math.pow(this.el/Math.sqrt((1+l)/(1-l)),1/this.bl);return Math.abs(l-1)<i?(a.x=this.long0,a.y=g):Math.abs(l+1)<i?(a.x=this.long0,a.y=-1*g):(a.y=f(this.e,m),a.x=e(this.long0-Math.atan2(h*Math.cos(this.gamma0)-k*Math.sin(this.gamma0),Math.cos(this.bl*b/this.al))/this.bl)),a},c.names=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]},{"../common/adjust_lon":5,"../common/phi2z":16,"../common/tsfnz":24}],57:[function(a,b,c){var d=a("../common/adjust_lon"),e=1e-10,f=a("../common/asinz"),g=Math.PI/2;c.init=function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},c.forward=function(a){var b,c,f,g,h,i,j,k,l=a.x,m=a.y;return f=d(l-this.long0),b=Math.sin(m),c=Math.cos(m),g=Math.cos(f),i=this.sin_p14*b+this.cos_p14*c*g,h=1,(i>0||Math.abs(i)<=e)&&(j=this.a*h*c*Math.sin(f),k=this.y0+this.a*h*(this.cos_p14*b-this.sin_p14*c*g)),a.x=j,a.y=k,a},c.inverse=function(a){var b,c,h,i,j,k,l;return a.x-=this.x0,a.y-=this.y0,b=Math.sqrt(a.x*a.x+a.y*a.y),c=f(b/this.a),h=Math.sin(c),i=Math.cos(c),k=this.long0,Math.abs(b)<=e?(l=this.lat0,a.x=k,a.y=l,a):(l=f(i*this.sin_p14+a.y*h*this.cos_p14/b),j=Math.abs(this.lat0)-g,Math.abs(j)<=e?(k=d(this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y)),a.x=k,a.y=l,a):(k=d(this.long0+Math.atan2(a.x*h,b*this.cos_p14*i-a.y*this.sin_p14*h)),a.x=k,a.y=l,a))},c.names=["ortho"]},{"../common/adjust_lon":5,"../common/asinz":6}],58:[function(a,b,c){var d=a("../common/e0fn"),e=a("../common/e1fn"),f=a("../common/e2fn"),g=a("../common/e3fn"),h=a("../common/adjust_lon"),i=a("../common/adjust_lat"),j=a("../common/mlfn"),k=1e-10,l=a("../common/gN"),m=20;c.init=function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=d(this.es),this.e1=e(this.es),this.e2=f(this.es),this.e3=g(this.es),this.ml0=this.a*j(this.e0,this.e1,this.e2,this.e3,this.lat0)},c.forward=function(a){var b,c,d,e=a.x,f=a.y,g=h(e-this.long0);if(d=g*Math.sin(f),this.sphere)Math.abs(f)<=k?(b=this.a*g,c=-1*this.a*this.lat0):(b=this.a*Math.sin(d)/Math.tan(f),c=this.a*(i(f-this.lat0)+(1-Math.cos(d))/Math.tan(f)));else if(Math.abs(f)<=k)b=this.a*g,c=-1*this.ml0;else{var m=l(this.a,this.e,Math.sin(f))/Math.tan(f);b=m*Math.sin(d),c=this.a*j(this.e0,this.e1,this.e2,this.e3,f)-this.ml0+m*(1-Math.cos(d))}return a.x=b+this.x0,a.y=c+this.y0,a},c.inverse=function(a){var b,c,d,e,f,g,i,l,n;if(d=a.x-this.x0,e=a.y-this.y0,this.sphere)if(Math.abs(e+this.a*this.lat0)<=k)b=h(d/this.a+this.long0),c=0;else{g=this.lat0+e/this.a,i=d*d/this.a/this.a+g*g,l=g;var o;for(f=m;f;--f)if(o=Math.tan(l),n=-1*(g*(l*o+1)-l-.5*(l*l+i)*o)/((l-g)/o-1),l+=n,Math.abs(n)<=k){c=l;break}b=h(this.long0+Math.asin(d*Math.tan(l)/this.a)/Math.sin(c))}else if(Math.abs(e+this.ml0)<=k)c=0,b=h(this.long0+d/this.a);else{g=(this.ml0+e)/this.a,i=d*d/this.a/this.a+g*g,l=g;var p,q,r,s,t;for(f=m;f;--f)if(t=this.e*Math.sin(l),p=Math.sqrt(1-t*t)*Math.tan(l),q=this.a*j(this.e0,this.e1,this.e2,this.e3,l),r=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),s=q/this.a,n=(g*(p*s+1)-s-.5*p*(s*s+i))/(this.es*Math.sin(2*l)*(s*s+i-2*g*s)/(4*p)+(g-s)*(p*r-2/Math.sin(2*l))-r),l-=n,Math.abs(n)<=k){c=l;break}p=Math.sqrt(1-this.es*Math.pow(Math.sin(c),2))*Math.tan(c),b=h(this.long0+Math.asin(d*p/this.a)/Math.sin(c))}return a.x=b,a.y=c,a},c.names=["Polyconic","poly"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/mlfn":14}],59:[function(a,b,c){var d=a("../common/adjust_lon"),e=a("../common/adjust_lat"),f=a("../common/pj_enfn"),g=20,h=a("../common/pj_mlfn"),i=a("../common/pj_inv_mlfn"),j=Math.PI/2,k=1e-10,l=a("../common/asinz");c.init=function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=f(this.es)},c.forward=function(a){var b,c,e=a.x,f=a.y;if(e=d(e-this.long0),this.sphere){if(this.m)for(var i=this.n*Math.sin(f),j=g;j;--j){var l=(this.m*f+Math.sin(f)-i)/(this.m+Math.cos(f));if(f-=l,Math.abs(l)<k)break}else f=1!==this.n?Math.asin(this.n*Math.sin(f)):f;b=this.a*this.C_x*e*(this.m+Math.cos(f)),c=this.a*this.C_y*f}else{var m=Math.sin(f),n=Math.cos(f);c=this.a*h(f,m,n,this.en),b=this.a*e*n/Math.sqrt(1-this.es*m*m)}return a.x=b,a.y=c,a},c.inverse=function(a){var b,c,f,g;return a.x-=this.x0,f=a.x/this.a,a.y-=this.y0,b=a.y/this.a,this.sphere?(b/=this.C_y,f/=this.C_x*(this.m+Math.cos(b)),this.m?b=l((this.m*b+Math.sin(b))/this.n):1!==this.n&&(b=l(Math.sin(b)/this.n)),f=d(f+this.long0),b=e(b)):(b=i(a.y/this.a,this.es,this.en),g=Math.abs(b),j>g?(g=Math.sin(b),c=this.long0+a.x*Math.sqrt(1-this.es*g*g)/(this.a*Math.cos(b)),f=d(c)):j>g-k&&(f=this.long0)),a.x=f,a.y=b,a},c.names=["Sinusoidal","sinu"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/asinz":6,"../common/pj_enfn":17,"../common/pj_inv_mlfn":18,"../common/pj_mlfn":19}],60:[function(a,b,c){c.init=function(){var a=this.lat0;this.lambda0=this.long0;var b=Math.sin(a),c=this.a,d=this.rf,e=1/d,f=2*e-Math.pow(e,2),g=this.e=Math.sqrt(f);this.R=this.k0*c*Math.sqrt(1-f)/(1-f*Math.pow(b,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(a),4)),this.b0=Math.asin(b/this.alpha);var h=Math.log(Math.tan(Math.PI/4+this.b0/2)),i=Math.log(Math.tan(Math.PI/4+a/2)),j=Math.log((1+g*b)/(1-g*b));this.K=h-this.alpha*i+this.alpha*g/2*j},c.forward=function(a){var b=Math.log(Math.tan(Math.PI/4-a.y/2)),c=this.e/2*Math.log((1+this.e*Math.sin(a.y))/(1-this.e*Math.sin(a.y))),d=-this.alpha*(b+c)+this.K,e=2*(Math.atan(Math.exp(d))-Math.PI/4),f=this.alpha*(a.x-this.lambda0),g=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(e)+Math.cos(this.b0)*Math.cos(f))),h=Math.asin(Math.cos(this.b0)*Math.sin(e)-Math.sin(this.b0)*Math.cos(e)*Math.cos(f));return a.y=this.R/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))+this.y0,a.x=this.R*g+this.x0,a},c.inverse=function(a){for(var b=a.x-this.x0,c=a.y-this.y0,d=b/this.R,e=2*(Math.atan(Math.exp(c/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(e)+Math.sin(this.b0)*Math.cos(e)*Math.cos(d)),g=Math.atan(Math.sin(d)/(Math.cos(this.b0)*Math.cos(d)-Math.sin(this.b0)*Math.tan(e))),h=this.lambda0+g/this.alpha,i=0,j=f,k=-1e3,l=0;Math.abs(j-k)>1e-7;){if(++l>20)return;i=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(j))/2)),k=j,j=2*Math.atan(Math.exp(i))-Math.PI/2}return a.x=h,a.y=j,a},c.names=["somerc"]},{}],61:[function(a,b,c){var d=Math.PI/2,e=1e-10,f=a("../common/sign"),g=a("../common/msfnz"),h=a("../common/tsfnz"),i=a("../common/phi2z"),j=a("../common/adjust_lon");c.ssfn_=function(a,b,c){return b*=c,Math.tan(.5*(d+a))*Math.pow((1-b)/(1+b),.5*c)},c.init=function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=e&&(this.k0=.5*(1+f(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=e&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=e&&(this.k0=.5*this.cons*g(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/h(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=g(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-d,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},c.forward=function(a){var b,c,f,g,i,k,l=a.x,m=a.y,n=Math.sin(m),o=Math.cos(m),p=j(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=e&&Math.abs(m+this.lat0)<=e?(a.x=NaN,a.y=NaN,a):this.sphere?(b=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(p)),a.x=this.a*b*o*Math.sin(p)+this.x0,a.y=this.a*b*(this.coslat0*n-this.sinlat0*o*Math.cos(p))+this.y0,a):(c=2*Math.atan(this.ssfn_(m,n,this.e))-d,g=Math.cos(c),f=Math.sin(c),Math.abs(this.coslat0)<=e?(i=h(this.e,m*this.con,this.con*n),k=2*this.a*this.k0*i/this.cons,a.x=this.x0+k*Math.sin(l-this.long0),a.y=this.y0-this.con*k*Math.cos(l-this.long0),a):(Math.abs(this.sinlat0)<e?(b=2*this.a*this.k0/(1+g*Math.cos(p)),a.y=b*f):(b=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*f+this.cosX0*g*Math.cos(p))),a.y=b*(this.cosX0*f-this.sinX0*g*Math.cos(p))+this.y0),a.x=b*g*Math.sin(p)+this.x0,a))},c.inverse=function(a){a.x-=this.x0,a.y-=this.y0;var b,c,f,g,h,k=Math.sqrt(a.x*a.x+a.y*a.y);if(this.sphere){var l=2*Math.atan(k/(.5*this.a*this.k0));return b=this.long0,c=this.lat0,e>=k?(a.x=b,a.y=c,a):(c=Math.asin(Math.cos(l)*this.sinlat0+a.y*Math.sin(l)*this.coslat0/k),b=j(Math.abs(this.coslat0)<e?this.lat0>0?this.long0+Math.atan2(a.x,-1*a.y):this.long0+Math.atan2(a.x,a.y):this.long0+Math.atan2(a.x*Math.sin(l),k*this.coslat0*Math.cos(l)-a.y*this.sinlat0*Math.sin(l))),a.x=b,a.y=c,a)}if(Math.abs(this.coslat0)<=e){if(e>=k)return c=this.lat0,b=this.long0,a.x=b,a.y=c,a;a.x*=this.con,a.y*=this.con,f=k*this.cons/(2*this.a*this.k0),c=this.con*i(this.e,f),b=this.con*j(this.con*this.long0+Math.atan2(a.x,-1*a.y))}else g=2*Math.atan(k*this.cosX0/(2*this.a*this.k0*this.ms1)),b=this.long0,e>=k?h=this.X0:(h=Math.asin(Math.cos(g)*this.sinX0+a.y*Math.sin(g)*this.cosX0/k),b=j(this.long0+Math.atan2(a.x*Math.sin(g),k*this.cosX0*Math.cos(g)-a.y*this.sinX0*Math.sin(g)))),c=-1*i(this.e,Math.tan(.5*(d+h)));return a.x=b,a.y=c,a},c.names=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"]},{"../common/adjust_lon":5,"../common/msfnz":15,"../common/phi2z":16,"../common/sign":21,"../common/tsfnz":24}],62:[function(a,b,c){var d=a("./gauss"),e=a("../common/adjust_lon");c.init=function(){d.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},c.forward=function(a){var b,c,f,g;return a.x=e(a.x-this.long0),d.forward.apply(this,[a]),b=Math.sin(a.y),c=Math.cos(a.y),f=Math.cos(a.x),g=this.k0*this.R2/(1+this.sinc0*b+this.cosc0*c*f),a.x=g*c*Math.sin(a.x),a.y=g*(this.cosc0*b-this.sinc0*c*f),a.x=this.a*a.x+this.x0,a.y=this.a*a.y+this.y0,a},c.inverse=function(a){var b,c,f,g,h;if(a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,h=Math.sqrt(a.x*a.x+a.y*a.y)){var i=2*Math.atan2(h,this.R2);b=Math.sin(i),c=Math.cos(i),g=Math.asin(c*this.sinc0+a.y*b*this.cosc0/h),f=Math.atan2(a.x*b,h*this.cosc0*c-a.y*this.sinc0*b)}else g=this.phic0,f=0;return a.x=f,a.y=g,d.inverse.apply(this,[a]),a.x=e(a.x+this.long0),a},c.names=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"]},{"../common/adjust_lon":5,"./gauss":46}],63:[function(a,b,c){var d=a("../common/e0fn"),e=a("../common/e1fn"),f=a("../common/e2fn"),g=a("../common/e3fn"),h=a("../common/mlfn"),i=a("../common/adjust_lon"),j=Math.PI/2,k=1e-10,l=a("../common/sign"),m=a("../common/asinz");c.init=function(){this.e0=d(this.es),this.e1=e(this.es),this.e2=f(this.es),this.e3=g(this.es),this.ml0=this.a*h(this.e0,this.e1,this.e2,this.e3,this.lat0)},c.forward=function(a){var b,c,d,e=a.x,f=a.y,g=i(e-this.long0),j=Math.sin(f),k=Math.cos(f);if(this.sphere){var l=k*Math.sin(g);if(Math.abs(Math.abs(l)-1)<1e-10)return 93;c=.5*this.a*this.k0*Math.log((1+l)/(1-l)),b=Math.acos(k*Math.cos(g)/Math.sqrt(1-l*l)),0>f&&(b=-b),d=this.a*this.k0*(b-this.lat0)}else{var m=k*g,n=Math.pow(m,2),o=this.ep2*Math.pow(k,2),p=Math.tan(f),q=Math.pow(p,2);b=1-this.es*Math.pow(j,2);var r=this.a/Math.sqrt(b),s=this.a*h(this.e0,this.e1,this.e2,this.e3,f);c=this.k0*r*m*(1+n/6*(1-q+o+n/20*(5-18*q+Math.pow(q,2)+72*o-58*this.ep2)))+this.x0,d=this.k0*(s-this.ml0+r*p*(n*(.5+n/24*(5-q+9*o+4*Math.pow(o,2)+n/30*(61-58*q+Math.pow(q,2)+600*o-330*this.ep2)))))+this.y0}return a.x=c,a.y=d,a},c.inverse=function(a){var b,c,d,e,f,g,h=6;if(this.sphere){var n=Math.exp(a.x/(this.a*this.k0)),o=.5*(n-1/n),p=this.lat0+a.y/(this.a*this.k0),q=Math.cos(p);b=Math.sqrt((1-q*q)/(1+o*o)),f=m(b),0>p&&(f=-f),g=0===o&&0===q?this.long0:i(Math.atan2(o,q)+this.long0)}else{var r=a.x-this.x0,s=a.y-this.y0;for(b=(this.ml0+s/this.k0)/this.a,c=b,e=0;!0&&(d=(b+this.e1*Math.sin(2*c)-this.e2*Math.sin(4*c)+this.e3*Math.sin(6*c))/this.e0-c,c+=d,!(Math.abs(d)<=k));e++)if(e>=h)return 95;if(Math.abs(c)<j){var t=Math.sin(c),u=Math.cos(c),v=Math.tan(c),w=this.ep2*Math.pow(u,2),x=Math.pow(w,2),y=Math.pow(v,2),z=Math.pow(y,2);b=1-this.es*Math.pow(t,2);var A=this.a/Math.sqrt(b),B=A*(1-this.es)/b,C=r/(A*this.k0),D=Math.pow(C,2);f=c-A*v*D/B*(.5-D/24*(5+3*y+10*w-4*x-9*this.ep2-D/30*(61+90*y+298*w+45*z-252*this.ep2-3*x))),g=i(this.long0+C*(1-D/6*(1+2*y+w-D/20*(5-2*w+28*y-3*x+8*this.ep2+24*z)))/u)}else f=j*l(s),g=this.long0}return a.x=g,a.y=f,a},c.names=["Transverse_Mercator","Transverse Mercator","tmerc"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/mlfn":14,"../common/sign":21}],64:[function(a,b,c){var d=.017453292519943295,e=a("./tmerc");c.dependsOn="tmerc",c.init=function(){this.zone&&(this.lat0=0,this.long0=(6*Math.abs(this.zone)-183)*d,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,e.init.apply(this),this.forward=e.forward,this.inverse=e.inverse)},c.names=["Universal Transverse Mercator System","utm"]},{"./tmerc":63}],65:[function(a,b,c){var d=a("../common/adjust_lon"),e=Math.PI/2,f=1e-10,g=a("../common/asinz");c.init=function(){this.R=this.a},c.forward=function(a){var b,c,h=a.x,i=a.y,j=d(h-this.long0);Math.abs(i)<=f&&(b=this.x0+this.R*j,c=this.y0);var k=g(2*Math.abs(i/Math.PI));(Math.abs(j)<=f||Math.abs(Math.abs(i)-e)<=f)&&(b=this.x0,c=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*k):this.y0+Math.PI*this.R*-Math.tan(.5*k));var l=.5*Math.abs(Math.PI/j-j/Math.PI),m=l*l,n=Math.sin(k),o=Math.cos(k),p=o/(n+o-1),q=p*p,r=p*(2/n-1),s=r*r,t=Math.PI*this.R*(l*(p-s)+Math.sqrt(m*(p-s)*(p-s)-(s+m)*(q-s)))/(s+m);0>j&&(t=-t),b=this.x0+t;var u=m+p;return t=Math.PI*this.R*(r*u-l*Math.sqrt((s+m)*(m+1)-u*u))/(s+m),c=i>=0?this.y0+t:this.y0-t,a.x=b,a.y=c,a},c.inverse=function(a){var b,c,e,g,h,i,j,k,l,m,n,o,p;return a.x-=this.x0,a.y-=this.y0,n=Math.PI*this.R,e=a.x/n,g=a.y/n,h=e*e+g*g,i=-Math.abs(g)*(1+h),
j=i-2*g*g+e*e,k=-2*i+1+2*g*g+h*h,p=g*g/k+(2*j*j*j/k/k/k-9*i*j/k/k)/27,l=(i-j*j/3/k)/k,m=2*Math.sqrt(-l/3),n=3*p/l/m,Math.abs(n)>1&&(n=n>=0?1:-1),o=Math.acos(n)/3,c=a.y>=0?(-m*Math.cos(o+Math.PI/3)-j/3/k)*Math.PI:-(-m*Math.cos(o+Math.PI/3)-j/3/k)*Math.PI,b=Math.abs(e)<f?this.long0:d(this.long0+Math.PI*(h-1+Math.sqrt(1+2*(e*e-g*g)+h*h))/2/e),a.x=b,a.y=c,a},c.names=["Van_der_Grinten_I","VanDerGrinten","vandg"]},{"../common/adjust_lon":5,"../common/asinz":6}],66:[function(a,b,c){var d=.017453292519943295,e=57.29577951308232,f=1,g=2,h=a("./datum_transform"),i=a("./adjust_axis"),j=a("./Proj"),k=a("./common/toPoint");b.exports=function l(a,b,c){function m(a,b){return(a.datum.datum_type===f||a.datum.datum_type===g)&&"WGS84"!==b.datumCode}var n;return Array.isArray(c)&&(c=k(c)),a.datum&&b.datum&&(m(a,b)||m(b,a))&&(n=new j("WGS84"),l(a,n,c),a=n),"enu"!==a.axis&&i(a,!1,c),"longlat"===a.projName?(c.x*=d,c.y*=d):(a.to_meter&&(c.x*=a.to_meter,c.y*=a.to_meter),a.inverse(c)),a.from_greenwich&&(c.x+=a.from_greenwich),c=h(a.datum,b.datum,c),b.from_greenwich&&(c.x-=b.from_greenwich),"longlat"===b.projName?(c.x*=e,c.y*=e):(b.forward(c),b.to_meter&&(c.x/=b.to_meter,c.y/=b.to_meter)),"enu"!==b.axis&&i(b,!0,c),c}},{"./Proj":2,"./adjust_axis":3,"./common/toPoint":23,"./datum_transform":31}],67:[function(a,b,c){function d(a,b,c){a[b]=c.map(function(a){var b={};return e(a,b),b}).reduce(function(a,b){return j(a,b)},{})}function e(a,b){var c;return Array.isArray(a)?(c=a.shift(),"PARAMETER"===c&&(c=a.shift()),1===a.length?Array.isArray(a[0])?(b[c]={},e(a[0],b[c])):b[c]=a[0]:a.length?"TOWGS84"===c?b[c]=a:(b[c]={},["UNIT","PRIMEM","VERT_DATUM"].indexOf(c)>-1?(b[c]={name:a[0].toLowerCase(),convert:a[1]},3===a.length&&(b[c].auth=a[2])):"SPHEROID"===c?(b[c]={name:a[0],a:a[1],rf:a[2]},4===a.length&&(b[c].auth=a[3])):["GEOGCS","GEOCCS","DATUM","VERT_CS","COMPD_CS","LOCAL_CS","FITTED_CS","LOCAL_DATUM"].indexOf(c)>-1?(a[0]=["name",a[0]],d(b,c,a)):a.every(function(a){return Array.isArray(a)})?d(b,c,a):e(a,b[c])):b[c]=!0,void 0):void(b[a]=!0)}function f(a,b){var c=b[0],d=b[1];!(c in a)&&d in a&&(a[c]=a[d],3===b.length&&(a[c]=b[2](a[c])))}function g(a){return a*i}function h(a){function b(b){var c=a.to_meter||1;return parseFloat(b,10)*c}"GEOGCS"===a.type?a.projName="longlat":"LOCAL_CS"===a.type?(a.projName="identity",a.local=!0):"object"==typeof a.PROJECTION?a.projName=Object.keys(a.PROJECTION)[0]:a.projName=a.PROJECTION,a.UNIT&&(a.units=a.UNIT.name.toLowerCase(),"metre"===a.units&&(a.units="meter"),a.UNIT.convert&&("GEOGCS"===a.type?a.DATUM&&a.DATUM.SPHEROID&&(a.to_meter=parseFloat(a.UNIT.convert,10)*a.DATUM.SPHEROID.a):a.to_meter=parseFloat(a.UNIT.convert,10))),a.GEOGCS&&(a.GEOGCS.DATUM?a.datumCode=a.GEOGCS.DATUM.name.toLowerCase():a.datumCode=a.GEOGCS.name.toLowerCase(),"d_"===a.datumCode.slice(0,2)&&(a.datumCode=a.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==a.datumCode&&"new_zealand_1949"!==a.datumCode||(a.datumCode="nzgd49"),"wgs_1984"===a.datumCode&&("Mercator_Auxiliary_Sphere"===a.PROJECTION&&(a.sphere=!0),a.datumCode="wgs84"),"_ferro"===a.datumCode.slice(-6)&&(a.datumCode=a.datumCode.slice(0,-6)),"_jakarta"===a.datumCode.slice(-8)&&(a.datumCode=a.datumCode.slice(0,-8)),~a.datumCode.indexOf("belge")&&(a.datumCode="rnb72"),a.GEOGCS.DATUM&&a.GEOGCS.DATUM.SPHEROID&&(a.ellps=a.GEOGCS.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===a.ellps.toLowerCase().slice(0,13)&&(a.ellps="intl"),a.a=a.GEOGCS.DATUM.SPHEROID.a,a.rf=parseFloat(a.GEOGCS.DATUM.SPHEROID.rf,10)),~a.datumCode.indexOf("osgb_1936")&&(a.datumCode="osgb36")),a.b&&!isFinite(a.b)&&(a.b=a.a);var c=function(b){return f(a,b)},d=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",g],["longitude_of_center","Longitude_Of_Center"],["longc","longitude_of_center",g],["x0","false_easting",b],["y0","false_northing",b],["long0","central_meridian",g],["lat0","latitude_of_origin",g],["lat0","standard_parallel_1",g],["lat1","standard_parallel_1",g],["lat2","standard_parallel_2",g],["alpha","azimuth",g],["srsCode","name"]];d.forEach(c),a.long0||!a.longc||"Albers_Conic_Equal_Area"!==a.projName&&"Lambert_Azimuthal_Equal_Area"!==a.projName||(a.long0=a.longc),a.lat_ts||!a.lat1||"Stereographic_South_Pole"!==a.projName&&"Polar Stereographic (variant B)"!==a.projName||(a.lat0=g(a.lat1>0?90:-90),a.lat_ts=a.lat1)}var i=.017453292519943295,j=a("./extend");b.exports=function(a,b){var c=JSON.parse((","+a).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g,',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g,',"$1"]').replace(/,\["VERTCS".+/,"")),d=c.shift(),f=c.shift();c.unshift(["name",f]),c.unshift(["type",d]),c.unshift("output");var g={};return e(c,g),h(g.output),j(b,g.output)}},{"./extend":34}],68:[function(a,b,c){function d(a){return a*(Math.PI/180)}function e(a){return 180*(a/Math.PI)}function f(a){var b,c,e,f,g,i,j,k,l,m=a.lat,n=a.lon,o=6378137,p=.00669438,q=.9996,r=d(m),s=d(n);l=Math.floor((n+180)/6)+1,180===n&&(l=60),m>=56&&64>m&&n>=3&&12>n&&(l=32),m>=72&&84>m&&(n>=0&&9>n?l=31:n>=9&&21>n?l=33:n>=21&&33>n?l=35:n>=33&&42>n&&(l=37)),b=6*(l-1)-180+3,k=d(b),c=p/(1-p),e=o/Math.sqrt(1-p*Math.sin(r)*Math.sin(r)),f=Math.tan(r)*Math.tan(r),g=c*Math.cos(r)*Math.cos(r),i=Math.cos(r)*(s-k),j=o*((1-p/4-3*p*p/64-5*p*p*p/256)*r-(3*p/8+3*p*p/32+45*p*p*p/1024)*Math.sin(2*r)+(15*p*p/256+45*p*p*p/1024)*Math.sin(4*r)-35*p*p*p/3072*Math.sin(6*r));var t=q*e*(i+(1-f+g)*i*i*i/6+(5-18*f+f*f+72*g-58*c)*i*i*i*i*i/120)+5e5,u=q*(j+e*Math.tan(r)*(i*i/2+(5-f+9*g+4*g*g)*i*i*i*i/24+(61-58*f+f*f+600*g-330*c)*i*i*i*i*i*i/720));return 0>m&&(u+=1e7),{northing:Math.round(u),easting:Math.round(t),zoneNumber:l,zoneLetter:h(m)}}function g(a){var b=a.northing,c=a.easting,d=a.zoneLetter,f=a.zoneNumber;if(0>f||f>60)return null;var h,i,j,k,l,m,n,o,p,q,r=.9996,s=6378137,t=.00669438,u=(1-Math.sqrt(1-t))/(1+Math.sqrt(1-t)),v=c-5e5,w=b;"N">d&&(w-=1e7),o=6*(f-1)-180+3,h=t/(1-t),n=w/r,p=n/(s*(1-t/4-3*t*t/64-5*t*t*t/256)),q=p+(3*u/2-27*u*u*u/32)*Math.sin(2*p)+(21*u*u/16-55*u*u*u*u/32)*Math.sin(4*p)+151*u*u*u/96*Math.sin(6*p),i=s/Math.sqrt(1-t*Math.sin(q)*Math.sin(q)),j=Math.tan(q)*Math.tan(q),k=h*Math.cos(q)*Math.cos(q),l=s*(1-t)/Math.pow(1-t*Math.sin(q)*Math.sin(q),1.5),m=v/(i*r);var x=q-i*Math.tan(q)/l*(m*m/2-(5+3*j+10*k-4*k*k-9*h)*m*m*m*m/24+(61+90*j+298*k+45*j*j-252*h-3*k*k)*m*m*m*m*m*m/720);x=e(x);var y=(m-(1+2*j+k)*m*m*m/6+(5-2*k+28*j-3*k*k+8*h+24*j*j)*m*m*m*m*m/120)/Math.cos(q);y=o+e(y);var z;if(a.accuracy){var A=g({northing:a.northing+a.accuracy,easting:a.easting+a.accuracy,zoneLetter:a.zoneLetter,zoneNumber:a.zoneNumber});z={top:A.lat,right:A.lon,bottom:x,left:y}}else z={lat:x,lon:y};return z}function h(a){var b="Z";return 84>=a&&a>=72?b="X":72>a&&a>=64?b="W":64>a&&a>=56?b="V":56>a&&a>=48?b="U":48>a&&a>=40?b="T":40>a&&a>=32?b="S":32>a&&a>=24?b="R":24>a&&a>=16?b="Q":16>a&&a>=8?b="P":8>a&&a>=0?b="N":0>a&&a>=-8?b="M":-8>a&&a>=-16?b="L":-16>a&&a>=-24?b="K":-24>a&&a>=-32?b="J":-32>a&&a>=-40?b="H":-40>a&&a>=-48?b="G":-48>a&&a>=-56?b="F":-56>a&&a>=-64?b="E":-64>a&&a>=-72?b="D":-72>a&&a>=-80&&(b="C"),b}function i(a,b){var c="00000"+a.easting,d="00000"+a.northing;return a.zoneNumber+a.zoneLetter+j(a.easting,a.northing,a.zoneNumber)+c.substr(c.length-5,b)+d.substr(d.length-5,b)}function j(a,b,c){var d=k(c),e=Math.floor(a/1e5),f=Math.floor(b/1e5)%20;return l(e,f,d)}function k(a){var b=a%q;return 0===b&&(b=q),b}function l(a,b,c){var d=c-1,e=r.charCodeAt(d),f=s.charCodeAt(d),g=e+a-1,h=f+b,i=!1;g>x&&(g=g-x+t-1,i=!0),(g===u||u>e&&g>u||(g>u||u>e)&&i)&&g++,(g===v||v>e&&g>v||(g>v||v>e)&&i)&&(g++,g===u&&g++),g>x&&(g=g-x+t-1),h>w?(h=h-w+t-1,i=!0):i=!1,(h===u||u>f&&h>u||(h>u||u>f)&&i)&&h++,(h===v||v>f&&h>v||(h>v||v>f)&&i)&&(h++,h===u&&h++),h>w&&(h=h-w+t-1);var j=String.fromCharCode(g)+String.fromCharCode(h);return j}function m(a){if(a&&0===a.length)throw"MGRSPoint coverting from nothing";for(var b,c=a.length,d=null,e="",f=0;!/[A-Z]/.test(b=a.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+a;e+=b,f++}var g=parseInt(e,10);if(0===f||f+3>c)throw"MGRSPoint bad conversion from: "+a;var h=a.charAt(f++);if("A">=h||"B"===h||"Y"===h||h>="Z"||"I"===h||"O"===h)throw"MGRSPoint zone letter "+h+" not handled: "+a;d=a.substring(f,f+=2);for(var i=k(g),j=n(d.charAt(0),i),l=o(d.charAt(1),i);l<p(h);)l+=2e6;var m=c-f;if(m%2!==0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+a;var q,r,s,t,u,v=m/2,w=0,x=0;return v>0&&(q=1e5/Math.pow(10,v),r=a.substring(f,f+v),w=parseFloat(r)*q,s=a.substring(f+v),x=parseFloat(s)*q),t=w+j,u=x+l,{easting:t,northing:u,zoneLetter:h,zoneNumber:g,accuracy:q}}function n(a,b){for(var c=r.charCodeAt(b-1),d=1e5,e=!1;c!==a.charCodeAt(0);){if(c++,c===u&&c++,c===v&&c++,c>x){if(e)throw"Bad character: "+a;c=t,e=!0}d+=1e5}return d}function o(a,b){if(a>"V")throw"MGRSPoint given invalid Northing "+a;for(var c=s.charCodeAt(b-1),d=0,e=!1;c!==a.charCodeAt(0);){if(c++,c===u&&c++,c===v&&c++,c>w){if(e)throw"Bad character: "+a;c=t,e=!0}d+=1e5}return d}function p(a){var b;switch(a){case"C":b=11e5;break;case"D":b=2e6;break;case"E":b=28e5;break;case"F":b=37e5;break;case"G":b=46e5;break;case"H":b=55e5;break;case"J":b=64e5;break;case"K":b=73e5;break;case"L":b=82e5;break;case"M":b=91e5;break;case"N":b=0;break;case"P":b=8e5;break;case"Q":b=17e5;break;case"R":b=26e5;break;case"S":b=35e5;break;case"T":b=44e5;break;case"U":b=53e5;break;case"V":b=62e5;break;case"W":b=7e6;break;case"X":b=79e5;break;default:b=-1}if(b>=0)return b;throw"Invalid zone letter: "+a}var q=6,r="AJSAJS",s="AFAFAF",t=65,u=73,v=79,w=86,x=90;c.forward=function(a,b){return b=b||5,i(f({lat:a[1],lon:a[0]}),b)},c.inverse=function(a){var b=g(m(a.toUpperCase()));return b.lat&&b.lon?[b.lon,b.lat,b.lon,b.lat]:[b.left,b.bottom,b.right,b.top]},c.toPoint=function(a){var b=g(m(a.toUpperCase()));return b.lat&&b.lon?[b.lon,b.lat]:[(b.left+b.right)/2,(b.top+b.bottom)/2]}},{}],69:[function(a,b,c){b.exports={name:"proj4",version:"2.3.15",description:"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",main:"lib/index.js",directories:{test:"test",doc:"docs"},scripts:{test:"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},repository:{type:"git",url:"git://github.com/proj4js/proj4js.git"},author:"",license:"MIT",jam:{main:"dist/proj4.js",include:["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},devDependencies:{"grunt-cli":"~0.1.13",grunt:"~0.4.2","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0",chai:"~1.8.1",mocha:"~1.17.1","grunt-mocha-phantomjs":"~0.4.0",browserify:"~12.0.1","grunt-browserify":"~4.0.1","grunt-contrib-uglify":"~0.11.1",curl:"git://github.com/cujojs/curl.git",istanbul:"~0.2.4",tin:"~0.4.0"},dependencies:{mgrs:"~0.0.2"}}},{}]},{},[36])(36)});
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.reproject = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/**
* UTM zones are grouped, and assigned to one of a group of 6
* sets.
*
* {int} @private
*/
var NUM_100K_SETS = 6;
/**
* The column letters (for easting) of the lower left value, per
* set.
*
* {string} @private
*/
var SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS';
/**
* The row letters (for northing) of the lower left value, per
* set.
*
* {string} @private
*/
var SET_ORIGIN_ROW_LETTERS = 'AFAFAF';
var A = 65; // A
var I = 73; // I
var O = 79; // O
var V = 86; // V
var Z = 90; // Z
/**
* Conversion of lat/lon to MGRS.
*
* @param {object} ll Object literal with lat and lon properties on a
* WGS84 ellipsoid.
* @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for
* 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.
* @return {string} the MGRS string for the given location and accuracy.
*/
exports.forward = function(ll, accuracy) {
accuracy = accuracy || 5; // default accuracy 1m
return encode(LLtoUTM({
lat: ll[1],
lon: ll[0]
}), accuracy);
};
/**
* Conversion of MGRS to lat/lon.
*
* @param {string} mgrs MGRS string.
* @return {array} An array with left (longitude), bottom (latitude), right
* (longitude) and top (latitude) values in WGS84, representing the
* bounding box for the provided MGRS reference.
*/
exports.inverse = function(mgrs) {
var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
if (bbox.lat && bbox.lon) {
return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
}
return [bbox.left, bbox.bottom, bbox.right, bbox.top];
};
exports.toPoint = function(mgrs) {
var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
if (bbox.lat && bbox.lon) {
return [bbox.lon, bbox.lat];
}
return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];
};
/**
* Conversion from degrees to radians.
*
* @private
* @param {number} deg the angle in degrees.
* @return {number} the angle in radians.
*/
function degToRad(deg) {
return (deg * (Math.PI / 180.0));
}
/**
* Conversion from radians to degrees.
*
* @private
* @param {number} rad the angle in radians.
* @return {number} the angle in degrees.
*/
function radToDeg(rad) {
return (180.0 * (rad / Math.PI));
}
/**
* Converts a set of Longitude and Latitude co-ordinates to UTM
* using the WGS84 ellipsoid.
*
* @private
* @param {object} ll Object literal with lat and lon properties
* representing the WGS84 coordinate to be converted.
* @return {object} Object literal containing the UTM value with easting,
* northing, zoneNumber and zoneLetter properties, and an optional
* accuracy property in digits. Returns null if the conversion failed.
*/
function LLtoUTM(ll) {
var Lat = ll.lat;
var Long = ll.lon;
var a = 6378137.0; //ellip.radius;
var eccSquared = 0.00669438; //ellip.eccsq;
var k0 = 0.9996;
var LongOrigin;
var eccPrimeSquared;
var N, T, C, A, M;
var LatRad = degToRad(Lat);
var LongRad = degToRad(Long);
var LongOriginRad;
var ZoneNumber;
// (int)
ZoneNumber = Math.floor((Long + 180) / 6) + 1;
//Make sure the longitude 180.00 is in Zone 60
if (Long === 180) {
ZoneNumber = 60;
}
// Special zone for Norway
if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) {
ZoneNumber = 32;
}
// Special zones for Svalbard
if (Lat >= 72.0 && Lat < 84.0) {
if (Long >= 0.0 && Long < 9.0) {
ZoneNumber = 31;
}
else if (Long >= 9.0 && Long < 21.0) {
ZoneNumber = 33;
}
else if (Long >= 21.0 && Long < 33.0) {
ZoneNumber = 35;
}
else if (Long >= 33.0 && Long < 42.0) {
ZoneNumber = 37;
}
}
LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin
// in middle of
// zone
LongOriginRad = degToRad(LongOrigin);
eccPrimeSquared = (eccSquared) / (1 - eccSquared);
N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));
T = Math.tan(LatRad) * Math.tan(LatRad);
C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);
A = Math.cos(LatRad) * (LongRad - LongOriginRad);
M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad));
var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0);
var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0)));
if (Lat < 0.0) {
UTMNorthing += 10000000.0; //10000000 meter offset for
// southern hemisphere
}
return {
northing: Math.round(UTMNorthing),
easting: Math.round(UTMEasting),
zoneNumber: ZoneNumber,
zoneLetter: getLetterDesignator(Lat)
};
}
/**
* Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience
* class where the Zone can be specified as a single string eg."60N" which
* is then broken down into the ZoneNumber and ZoneLetter.
*
* @private
* @param {object} utm An object literal with northing, easting, zoneNumber
* and zoneLetter properties. If an optional accuracy property is
* provided (in meters), a bounding box will be returned instead of
* latitude and longitude.
* @return {object} An object literal containing either lat and lon values
* (if no accuracy was provided), or top, right, bottom and left values
* for the bounding box calculated according to the provided accuracy.
* Returns null if the conversion failed.
*/
function UTMtoLL(utm) {
var UTMNorthing = utm.northing;
var UTMEasting = utm.easting;
var zoneLetter = utm.zoneLetter;
var zoneNumber = utm.zoneNumber;
// check the ZoneNummber is valid
if (zoneNumber < 0 || zoneNumber > 60) {
return null;
}
var k0 = 0.9996;
var a = 6378137.0; //ellip.radius;
var eccSquared = 0.00669438; //ellip.eccsq;
var eccPrimeSquared;
var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));
var N1, T1, C1, R1, D, M;
var LongOrigin;
var mu, phi1Rad;
// remove 500,000 meter offset for longitude
var x = UTMEasting - 500000.0;
var y = UTMNorthing;
// We must know somehow if we are in the Northern or Southern
// hemisphere, this is the only time we use the letter So even
// if the Zone letter isn't exactly correct it should indicate
// the hemisphere correctly
if (zoneLetter < 'N') {
y -= 10000000.0; // remove 10,000,000 meter offset used
// for southern hemisphere
}
// There are 60 zones with zone 1 being at West -180 to -174
LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin
// in middle of
// zone
eccPrimeSquared = (eccSquared) / (1 - eccSquared);
M = y / k0;
mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));
phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu);
// double phi1 = ProjMath.radToDeg(phi1Rad);
N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));
T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);
C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);
R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);
D = x / (N1 * k0);
var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);
lat = radToDeg(lat);
var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);
lon = LongOrigin + radToDeg(lon);
var result;
if (utm.accuracy) {
var topRight = UTMtoLL({
northing: utm.northing + utm.accuracy,
easting: utm.easting + utm.accuracy,
zoneLetter: utm.zoneLetter,
zoneNumber: utm.zoneNumber
});
result = {
top: topRight.lat,
right: topRight.lon,
bottom: lat,
left: lon
};
}
else {
result = {
lat: lat,
lon: lon
};
}
return result;
}
/**
* Calculates the MGRS letter designator for the given latitude.
*
* @private
* @param {number} lat The latitude in WGS84 to get the letter designator
* for.
* @return {char} The letter designator.
*/
function getLetterDesignator(lat) {
//This is here as an error flag to show that the Latitude is
//outside MGRS limits
var LetterDesignator = 'Z';
if ((84 >= lat) && (lat >= 72)) {
LetterDesignator = 'X';
}
else if ((72 > lat) && (lat >= 64)) {
LetterDesignator = 'W';
}
else if ((64 > lat) && (lat >= 56)) {
LetterDesignator = 'V';
}
else if ((56 > lat) && (lat >= 48)) {
LetterDesignator = 'U';
}
else if ((48 > lat) && (lat >= 40)) {
LetterDesignator = 'T';
}
else if ((40 > lat) && (lat >= 32)) {
LetterDesignator = 'S';
}
else if ((32 > lat) && (lat >= 24)) {
LetterDesignator = 'R';
}
else if ((24 > lat) && (lat >= 16)) {
LetterDesignator = 'Q';
}
else if ((16 > lat) && (lat >= 8)) {
LetterDesignator = 'P';
}
else if ((8 > lat) && (lat >= 0)) {
LetterDesignator = 'N';
}
else if ((0 > lat) && (lat >= -8)) {
LetterDesignator = 'M';
}
else if ((-8 > lat) && (lat >= -16)) {
LetterDesignator = 'L';
}
else if ((-16 > lat) && (lat >= -24)) {
LetterDesignator = 'K';
}
else if ((-24 > lat) && (lat >= -32)) {
LetterDesignator = 'J';
}
else if ((-32 > lat) && (lat >= -40)) {
LetterDesignator = 'H';
}
else if ((-40 > lat) && (lat >= -48)) {
LetterDesignator = 'G';
}
else if ((-48 > lat) && (lat >= -56)) {
LetterDesignator = 'F';
}
else if ((-56 > lat) && (lat >= -64)) {
LetterDesignator = 'E';
}
else if ((-64 > lat) && (lat >= -72)) {
LetterDesignator = 'D';
}
else if ((-72 > lat) && (lat >= -80)) {
LetterDesignator = 'C';
}
return LetterDesignator;
}
/**
* Encodes a UTM location as MGRS string.
*
* @private
* @param {object} utm An object literal with easting, northing,
* zoneLetter, zoneNumber
* @param {number} accuracy Accuracy in digits (1-5).
* @return {string} MGRS string for the given UTM location.
*/
function encode(utm, accuracy) {
// prepend with leading zeroes
var seasting = "00000" + utm.easting,
snorthing = "00000" + utm.northing;
return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);
}
/**
* Get the two letter 100k designator for a given UTM easting,
* northing and zone number value.
*
* @private
* @param {number} easting
* @param {number} northing
* @param {number} zoneNumber
* @return the two letter 100k designator for the given UTM location.
*/
function get100kID(easting, northing, zoneNumber) {
var setParm = get100kSetForZone(zoneNumber);
var setColumn = Math.floor(easting / 100000);
var setRow = Math.floor(northing / 100000) % 20;
return getLetter100kID(setColumn, setRow, setParm);
}
/**
* Given a UTM zone number, figure out the MGRS 100K set it is in.
*
* @private
* @param {number} i An UTM zone number.
* @return {number} the 100k set the UTM zone is in.
*/
function get100kSetForZone(i) {
var setParm = i % NUM_100K_SETS;
if (setParm === 0) {
setParm = NUM_100K_SETS;
}
return setParm;
}
/**
* Get the two-letter MGRS 100k designator given information
* translated from the UTM northing, easting and zone number.
*
* @private
* @param {number} column the column index as it relates to the MGRS
* 100k set spreadsheet, created from the UTM easting.
* Values are 1-8.
* @param {number} row the row index as it relates to the MGRS 100k set
* spreadsheet, created from the UTM northing value. Values
* are from 0-19.
* @param {number} parm the set block, as it relates to the MGRS 100k set
* spreadsheet, created from the UTM zone. Values are from
* 1-60.
* @return two letter MGRS 100k code.
*/
function getLetter100kID(column, row, parm) {
// colOrigin and rowOrigin are the letters at the origin of the set
var index = parm - 1;
var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);
// colInt and rowInt are the letters to build to return
var colInt = colOrigin + column - 1;
var rowInt = rowOrigin + row;
var rollover = false;
if (colInt > Z) {
colInt = colInt - Z + A - 1;
rollover = true;
}
if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {
colInt++;
}
if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {
colInt++;
if (colInt === I) {
colInt++;
}
}
if (colInt > Z) {
colInt = colInt - Z + A - 1;
}
if (rowInt > V) {
rowInt = rowInt - V + A - 1;
rollover = true;
}
else {
rollover = false;
}
if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {
rowInt++;
}
if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {
rowInt++;
if (rowInt === I) {
rowInt++;
}
}
if (rowInt > V) {
rowInt = rowInt - V + A - 1;
}
var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
return twoLetter;
}
/**
* Decode the UTM parameters from a MGRS string.
*
* @private
* @param {string} mgrsString an UPPERCASE coordinate string is expected.
* @return {object} An object literal with easting, northing, zoneLetter,
* zoneNumber and accuracy (in meters) properties.
*/
function decode(mgrsString) {
if (mgrsString && mgrsString.length === 0) {
throw ("MGRSPoint coverting from nothing");
}
var length = mgrsString.length;
var hunK = null;
var sb = "";
var testChar;
var i = 0;
// get Zone number
while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {
if (i >= 2) {
throw ("MGRSPoint bad conversion from: " + mgrsString);
}
sb += testChar;
i++;
}
var zoneNumber = parseInt(sb, 10);
if (i === 0 || i + 3 > length) {
// A good MGRS string has to be 4-5 digits long,
// ##AAA/#AAA at least.
throw ("MGRSPoint bad conversion from: " + mgrsString);
}
var zoneLetter = mgrsString.charAt(i++);
// Should we check the zone letter here? Why not.
if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {
throw ("MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString);
}
hunK = mgrsString.substring(i, i += 2);
var set = get100kSetForZone(zoneNumber);
var east100k = getEastingFromChar(hunK.charAt(0), set);
var north100k = getNorthingFromChar(hunK.charAt(1), set);
// We have a bug where the northing may be 2000000 too low.
// How
// do we know when to roll over?
while (north100k < getMinNorthing(zoneLetter)) {
north100k += 2000000;
}
// calculate the char index for easting/northing separator
var remainder = length - i;
if (remainder % 2 !== 0) {
throw ("MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString);
}
var sep = remainder / 2;
var sepEasting = 0.0;
var sepNorthing = 0.0;
var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;
if (sep > 0) {
accuracyBonus = 100000.0 / Math.pow(10, sep);
sepEastingString = mgrsString.substring(i, i + sep);
sepEasting = parseFloat(sepEastingString) * accuracyBonus;
sepNorthingString = mgrsString.substring(i + sep);
sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;
}
easting = sepEasting + east100k;
northing = sepNorthing + north100k;
return {
easting: easting,
northing: northing,
zoneLetter: zoneLetter,
zoneNumber: zoneNumber,
accuracy: accuracyBonus
};
}
/**
* Given the first letter from a two-letter MGRS 100k zone, and given the
* MGRS table set for the zone number, figure out the easting value that
* should be added to the other, secondary easting value.
*
* @private
* @param {char} e The first letter from a two-letter MGRS 100´k zone.
* @param {number} set The MGRS table set for the zone number.
* @return {number} The easting value for the given letter and set.
*/
function getEastingFromChar(e, set) {
// colOrigin is the letter at the origin of the set for the
// column
var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);
var eastingValue = 100000.0;
var rewindMarker = false;
while (curCol !== e.charCodeAt(0)) {
curCol++;
if (curCol === I) {
curCol++;
}
if (curCol === O) {
curCol++;
}
if (curCol > Z) {
if (rewindMarker) {
throw ("Bad character: " + e);
}
curCol = A;
rewindMarker = true;
}
eastingValue += 100000.0;
}
return eastingValue;
}
/**
* Given the second letter from a two-letter MGRS 100k zone, and given the
* MGRS table set for the zone number, figure out the northing value that
* should be added to the other, secondary northing value. You have to
* remember that Northings are determined from the equator, and the vertical
* cycle of letters mean a 2000000 additional northing meters. This happens
* approx. every 18 degrees of latitude. This method does *NOT* count any
* additional northings. You have to figure out how many 2000000 meters need
* to be added for the zone letter of the MGRS coordinate.
*
* @private
* @param {char} n Second letter of the MGRS 100k zone
* @param {number} set The MGRS table set number, which is dependent on the
* UTM zone number.
* @return {number} The northing value for the given letter and set.
*/
function getNorthingFromChar(n, set) {
if (n > 'V') {
throw ("MGRSPoint given invalid Northing " + n);
}
// rowOrigin is the letter at the origin of the set for the
// column
var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);
var northingValue = 0.0;
var rewindMarker = false;
while (curRow !== n.charCodeAt(0)) {
curRow++;
if (curRow === I) {
curRow++;
}
if (curRow === O) {
curRow++;
}
// fixing a bug making whole application hang in this loop
// when 'n' is a wrong character
if (curRow > V) {
if (rewindMarker) { // making sure that this loop ends
throw ("Bad character: " + n);
}
curRow = A;
rewindMarker = true;
}
northingValue += 100000.0;
}
return northingValue;
}
/**
* The function getMinNorthing returns the minimum northing value of a MGRS
* zone.
*
* Ported from Geotrans' c Lattitude_Band_Value structure table.
*
* @private
* @param {char} zoneLetter The MGRS zone to get the min northing for.
* @return {number}
*/
function getMinNorthing(zoneLetter) {
var northing;
switch (zoneLetter) {
case 'C':
northing = 1100000.0;
break;
case 'D':
northing = 2000000.0;
break;
case 'E':
northing = 2800000.0;
break;
case 'F':
northing = 3700000.0;
break;
case 'G':
northing = 4600000.0;
break;
case 'H':
northing = 5500000.0;
break;
case 'J':
northing = 6400000.0;
break;
case 'K':
northing = 7300000.0;
break;
case 'L':
northing = 8200000.0;
break;
case 'M':
northing = 9100000.0;
break;
case 'N':
northing = 0.0;
break;
case 'P':
northing = 800000.0;
break;
case 'Q':
northing = 1700000.0;
break;
case 'R':
northing = 2600000.0;
break;
case 'S':
northing = 3500000.0;
break;
case 'T':
northing = 4400000.0;
break;
case 'U':
northing = 5300000.0;
break;
case 'V':
northing = 6200000.0;
break;
case 'W':
northing = 7000000.0;
break;
case 'X':
northing = 7900000.0;
break;
default:
northing = -1.0;
}
if (northing >= 0.0) {
return northing;
}
else {
throw ("Invalid zone letter: " + zoneLetter);
}
}
},{}],2:[function(require,module,exports){
var mgrs = require('mgrs');
function Point(x, y, z) {
if (!(this instanceof Point)) {
return new Point(x, y, z);
}
if (Array.isArray(x)) {
this.x = x[0];
this.y = x[1];
this.z = x[2] || 0.0;
} else if(typeof x === 'object') {
this.x = x.x;
this.y = x.y;
this.z = x.z || 0.0;
} else if (typeof x === 'string' && typeof y === 'undefined') {
var coords = x.split(',');
this.x = parseFloat(coords[0], 10);
this.y = parseFloat(coords[1], 10);
this.z = parseFloat(coords[2], 10) || 0.0;
} else {
this.x = x;
this.y = y;
this.z = z || 0.0;
}
console.warn('proj4.Point will be removed in version 3, use proj4.toPoint');
}
Point.fromMGRS = function(mgrsStr) {
return new Point(mgrs.toPoint(mgrsStr));
};
Point.prototype.toMGRS = function(accuracy) {
return mgrs.forward([this.x, this.y], accuracy);
};
module.exports = Point;
},{"mgrs":1}],3:[function(require,module,exports){
var parseCode = require("./parseCode");
var extend = require('./extend');
var projections = require('./projections');
var deriveConstants = require('./deriveConstants');
function Projection(srsCode,callback) {
if (!(this instanceof Projection)) {
return new Projection(srsCode);
}
callback = callback || function(error){
if(error){
throw error;
}
};
var json = parseCode(srsCode);
if(typeof json !== 'object'){
callback(srsCode);
return;
}
var modifiedJSON = deriveConstants(json);
var ourProj = Projection.projections.get(modifiedJSON.projName);
if(ourProj){
extend(this, modifiedJSON);
extend(this, ourProj);
this.init();
callback(null, this);
}else{
callback(srsCode);
}
}
Projection.projections = projections;
Projection.projections.start();
module.exports = Projection;
},{"./deriveConstants":34,"./extend":35,"./parseCode":39,"./projections":41}],4:[function(require,module,exports){
module.exports = function(crs, denorm, point) {
var xin = point.x,
yin = point.y,
zin = point.z || 0.0;
var v, t, i;
for (i = 0; i < 3; i++) {
if (denorm && i === 2 && point.z === undefined) {
continue;
}
if (i === 0) {
v = xin;
t = 'x';
}
else if (i === 1) {
v = yin;
t = 'y';
}
else {
v = zin;
t = 'z';
}
switch (crs.axis[i]) {
case 'e':
point[t] = v;
break;
case 'w':
point[t] = -v;
break;
case 'n':
point[t] = v;
break;
case 's':
point[t] = -v;
break;
case 'u':
if (point[t] !== undefined) {
point.z = v;
}
break;
case 'd':
if (point[t] !== undefined) {
point.z = -v;
}
break;
default:
//console.log("ERROR: unknow axis ("+crs.axis[i]+") - check definition of "+crs.projName);
return null;
}
}
return point;
};
},{}],5:[function(require,module,exports){
var HALF_PI = Math.PI/2;
var sign = require('./sign');
module.exports = function(x) {
return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));
};
},{"./sign":22}],6:[function(require,module,exports){
var TWO_PI = Math.PI * 2;
// SPI is slightly greater than Math.PI, so values that exceed the -180..180
// degree range by a tiny amount don't get wrapped. This prevents points that
// have drifted from their original location along the 180th meridian (due to
// floating point error) from changing their sign.
var SPI = 3.14159265359;
var sign = require('./sign');
module.exports = function(x) {
return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));
};
},{"./sign":22}],7:[function(require,module,exports){
module.exports = function(x) {
if (Math.abs(x) > 1) {
x = (x > 1) ? 1 : -1;
}
return Math.asin(x);
};
},{}],8:[function(require,module,exports){
module.exports = function(x) {
return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));
};
},{}],9:[function(require,module,exports){
module.exports = function(x) {
return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));
};
},{}],10:[function(require,module,exports){
module.exports = function(x) {
return (0.05859375 * x * x * (1 + 0.75 * x));
};
},{}],11:[function(require,module,exports){
module.exports = function(x) {
return (x * x * x * (35 / 3072));
};
},{}],12:[function(require,module,exports){
module.exports = function(a, e, sinphi) {
var temp = e * sinphi;
return a / Math.sqrt(1 - temp * temp);
};
},{}],13:[function(require,module,exports){
module.exports = function(ml, e0, e1, e2, e3) {
var phi;
var dphi;
phi = ml / e0;
for (var i = 0; i < 15; i++) {
dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi));
phi += dphi;
if (Math.abs(dphi) <= 0.0000000001) {
return phi;
}
}
//..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations");
return NaN;
};
},{}],14:[function(require,module,exports){
var HALF_PI = Math.PI/2;
module.exports = function(eccent, q) {
var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));
if (Math.abs(Math.abs(q) - temp) < 1.0E-6) {
if (q < 0) {
return (-1 * HALF_PI);
}
else {
return HALF_PI;
}
}
//var phi = 0.5* q/(1-eccent*eccent);
var phi = Math.asin(0.5 * q);
var dphi;
var sin_phi;
var cos_phi;
var con;
for (var i = 0; i < 30; i++) {
sin_phi = Math.sin(phi);
cos_phi = Math.cos(phi);
con = eccent * sin_phi;
dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
phi += dphi;
if (Math.abs(dphi) <= 0.0000000001) {
return phi;
}
}
//console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations");
return NaN;
};
},{}],15:[function(require,module,exports){
module.exports = function(e0, e1, e2, e3, phi) {
return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));
};
},{}],16:[function(require,module,exports){
module.exports = function(eccent, sinphi, cosphi) {
var con = eccent * sinphi;
return cosphi / (Math.sqrt(1 - con * con));
};
},{}],17:[function(require,module,exports){
var HALF_PI = Math.PI/2;
module.exports = function(eccent, ts) {
var eccnth = 0.5 * eccent;
var con, dphi;
var phi = HALF_PI - 2 * Math.atan(ts);
for (var i = 0; i <= 15; i++) {
con = eccent * Math.sin(phi);
dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi;
phi += dphi;
if (Math.abs(dphi) <= 0.0000000001) {
return phi;
}
}
//console.log("phi2z has NoConvergence");
return -9999;
};
},{}],18:[function(require,module,exports){
var C00 = 1;
var C02 = 0.25;
var C04 = 0.046875;
var C06 = 0.01953125;
var C08 = 0.01068115234375;
var C22 = 0.75;
var C44 = 0.46875;
var C46 = 0.01302083333333333333;
var C48 = 0.00712076822916666666;
var C66 = 0.36458333333333333333;
var C68 = 0.00569661458333333333;
var C88 = 0.3076171875;
module.exports = function(es) {
var en = [];
en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
var t = es * es;
en[2] = t * (C44 - es * (C46 + es * C48));
t *= es;
en[3] = t * (C66 - es * C68);
en[4] = t * es * C88;
return en;
};
},{}],19:[function(require,module,exports){
var pj_mlfn = require("./pj_mlfn");
var EPSLN = 1.0e-10;
var MAX_ITER = 20;
module.exports = function(arg, es, en) {
var k = 1 / (1 - es);
var phi = arg;
for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */
var s = Math.sin(phi);
var t = 1 - es * s * s;
//t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg;
//phi -= t * (t * Math.sqrt(t)) * k;
t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k;
phi -= t;
if (Math.abs(t) < EPSLN) {
return phi;
}
}
//..reportError("cass:pj_inv_mlfn: Convergence error");
return phi;
};
},{"./pj_mlfn":20}],20:[function(require,module,exports){
module.exports = function(phi, sphi, cphi, en) {
cphi *= sphi;
sphi *= sphi;
return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));
};
},{}],21:[function(require,module,exports){
module.exports = function(eccent, sinphi) {
var con;
if (eccent > 1.0e-7) {
con = eccent * sinphi;
return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con))));
}
else {
return (2 * sinphi);
}
};
},{}],22:[function(require,module,exports){
module.exports = function(x) {
return x<0 ? -1 : 1;
};
},{}],23:[function(require,module,exports){
module.exports = function(esinp, exp) {
return (Math.pow((1 - esinp) / (1 + esinp), exp));
};
},{}],24:[function(require,module,exports){
module.exports = function (array){
var out = {
x: array[0],
y: array[1]
};
if (array.length>2) {
out.z = array[2];
}
if (array.length>3) {
out.m = array[3];
}
return out;
};
},{}],25:[function(require,module,exports){
var HALF_PI = Math.PI/2;
module.exports = function(eccent, phi, sinphi) {
var con = eccent * sinphi;
var com = 0.5 * eccent;
con = Math.pow(((1 - con) / (1 + con)), com);
return (Math.tan(0.5 * (HALF_PI - phi)) / con);
};
},{}],26:[function(require,module,exports){
exports.wgs84 = {
towgs84: "0,0,0",
ellipse: "WGS84",
datumName: "WGS84"
};
exports.ch1903 = {
towgs84: "674.374,15.056,405.346",
ellipse: "bessel",
datumName: "swiss"
};
exports.ggrs87 = {
towgs84: "-199.87,74.79,246.62",
ellipse: "GRS80",
datumName: "Greek_Geodetic_Reference_System_1987"
};
exports.nad83 = {
towgs84: "0,0,0",
ellipse: "GRS80",
datumName: "North_American_Datum_1983"
};
exports.nad27 = {
nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
ellipse: "clrk66",
datumName: "North_American_Datum_1927"
};
exports.potsdam = {
towgs84: "606.0,23.0,413.0",
ellipse: "bessel",
datumName: "Potsdam Rauenberg 1950 DHDN"
};
exports.carthage = {
towgs84: "-263.0,6.0,431.0",
ellipse: "clark80",
datumName: "Carthage 1934 Tunisia"
};
exports.hermannskogel = {
towgs84: "653.0,-212.0,449.0",
ellipse: "bessel",
datumName: "Hermannskogel"
};
exports.ire65 = {
towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
ellipse: "mod_airy",
datumName: "Ireland 1965"
};
exports.rassadiran = {
towgs84: "-133.63,-157.5,-158.62",
ellipse: "intl",
datumName: "Rassadiran"
};
exports.nzgd49 = {
towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
ellipse: "intl",
datumName: "New Zealand Geodetic Datum 1949"
};
exports.osgb36 = {
towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
ellipse: "airy",
datumName: "Airy 1830"
};
exports.s_jtsk = {
towgs84: "589,76,480",
ellipse: 'bessel',
datumName: 'S-JTSK (Ferro)'
};
exports.beduaram = {
towgs84: '-106,-87,188',
ellipse: 'clrk80',
datumName: 'Beduaram'
};
exports.gunung_segara = {
towgs84: '-403,684,41',
ellipse: 'bessel',
datumName: 'Gunung Segara Jakarta'
};
exports.rnb72 = {
towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
ellipse: "intl",
datumName: "Reseau National Belge 1972"
};
},{}],27:[function(require,module,exports){
exports.MERIT = {
a: 6378137.0,
rf: 298.257,
ellipseName: "MERIT 1983"
};
exports.SGS85 = {
a: 6378136.0,
rf: 298.257,
ellipseName: "Soviet Geodetic System 85"
};
exports.GRS80 = {
a: 6378137.0,
rf: 298.257222101,
ellipseName: "GRS 1980(IUGG, 1980)"
};
exports.IAU76 = {
a: 6378140.0,
rf: 298.257,
ellipseName: "IAU 1976"
};
exports.airy = {
a: 6377563.396,
b: 6356256.910,
ellipseName: "Airy 1830"
};
exports.APL4 = {
a: 6378137,
rf: 298.25,
ellipseName: "Appl. Physics. 1965"
};
exports.NWL9D = {
a: 6378145.0,
rf: 298.25,
ellipseName: "Naval Weapons Lab., 1965"
};
exports.mod_airy = {
a: 6377340.189,
b: 6356034.446,
ellipseName: "Modified Airy"
};
exports.andrae = {
a: 6377104.43,
rf: 300.0,
ellipseName: "Andrae 1876 (Den., Iclnd.)"
};
exports.aust_SA = {
a: 6378160.0,
rf: 298.25,
ellipseName: "Australian Natl & S. Amer. 1969"
};
exports.GRS67 = {
a: 6378160.0,
rf: 298.2471674270,
ellipseName: "GRS 67(IUGG 1967)"
};
exports.bessel = {
a: 6377397.155,
rf: 299.1528128,
ellipseName: "Bessel 1841"
};
exports.bess_nam = {
a: 6377483.865,
rf: 299.1528128,
ellipseName: "Bessel 1841 (Namibia)"
};
exports.clrk66 = {
a: 6378206.4,
b: 6356583.8,
ellipseName: "Clarke 1866"
};
exports.clrk80 = {
a: 6378249.145,
rf: 293.4663,
ellipseName: "Clarke 1880 mod."
};
exports.clrk58 = {
a: 6378293.645208759,
rf: 294.2606763692654,
ellipseName: "Clarke 1858"
};
exports.CPM = {
a: 6375738.7,
rf: 334.29,
ellipseName: "Comm. des Poids et Mesures 1799"
};
exports.delmbr = {
a: 6376428.0,
rf: 311.5,
ellipseName: "Delambre 1810 (Belgium)"
};
exports.engelis = {
a: 6378136.05,
rf: 298.2566,
ellipseName: "Engelis 1985"
};
exports.evrst30 = {
a: 6377276.345,
rf: 300.8017,
ellipseName: "Everest 1830"
};
exports.evrst48 = {
a: 6377304.063,
rf: 300.8017,
ellipseName: "Everest 1948"
};
exports.evrst56 = {
a: 6377301.243,
rf: 300.8017,
ellipseName: "Everest 1956"
};
exports.evrst69 = {
a: 6377295.664,
rf: 300.8017,
ellipseName: "Everest 1969"
};
exports.evrstSS = {
a: 6377298.556,
rf: 300.8017,
ellipseName: "Everest (Sabah & Sarawak)"
};
exports.fschr60 = {
a: 6378166.0,
rf: 298.3,
ellipseName: "Fischer (Mercury Datum) 1960"
};
exports.fschr60m = {
a: 6378155.0,
rf: 298.3,
ellipseName: "Fischer 1960"
};
exports.fschr68 = {
a: 6378150.0,
rf: 298.3,
ellipseName: "Fischer 1968"
};
exports.helmert = {
a: 6378200.0,
rf: 298.3,
ellipseName: "Helmert 1906"
};
exports.hough = {
a: 6378270.0,
rf: 297.0,
ellipseName: "Hough"
};
exports.intl = {
a: 6378388.0,
rf: 297.0,
ellipseName: "International 1909 (Hayford)"
};
exports.kaula = {
a: 6378163.0,
rf: 298.24,
ellipseName: "Kaula 1961"
};
exports.lerch = {
a: 6378139.0,
rf: 298.257,
ellipseName: "Lerch 1979"
};
exports.mprts = {
a: 6397300.0,
rf: 191.0,
ellipseName: "Maupertius 1738"
};
exports.new_intl = {
a: 6378157.5,
b: 6356772.2,
ellipseName: "New International 1967"
};
exports.plessis = {
a: 6376523.0,
rf: 6355863.0,
ellipseName: "Plessis 1817 (France)"
};
exports.krass = {
a: 6378245.0,
rf: 298.3,
ellipseName: "Krassovsky, 1942"
};
exports.SEasia = {
a: 6378155.0,
b: 6356773.3205,
ellipseName: "Southeast Asia"
};
exports.walbeck = {
a: 6376896.0,
b: 6355834.8467,
ellipseName: "Walbeck"
};
exports.WGS60 = {
a: 6378165.0,
rf: 298.3,
ellipseName: "WGS 60"
};
exports.WGS66 = {
a: 6378145.0,
rf: 298.25,
ellipseName: "WGS 66"
};
exports.WGS7 = {
a: 6378135.0,
rf: 298.26,
ellipseName: "WGS 72"
};
exports.WGS84 = {
a: 6378137.0,
rf: 298.257223563,
ellipseName: "WGS 84"
};
exports.sphere = {
a: 6370997.0,
b: 6370997.0,
ellipseName: "Normal Sphere (r=6370997)"
};
},{}],28:[function(require,module,exports){
exports.greenwich = 0.0; //"0dE",
exports.lisbon = -9.131906111111; //"9d07'54.862\"W",
exports.paris = 2.337229166667; //"2d20'14.025\"E",
exports.bogota = -74.080916666667; //"74d04'51.3\"W",
exports.madrid = -3.687938888889; //"3d41'16.58\"W",
exports.rome = 12.452333333333; //"12d27'8.4\"E",
exports.bern = 7.439583333333; //"7d26'22.5\"E",
exports.jakarta = 106.807719444444; //"106d48'27.79\"E",
exports.ferro = -17.666666666667; //"17d40'W",
exports.brussels = 4.367975; //"4d22'4.71\"E",
exports.stockholm = 18.058277777778; //"18d3'29.8\"E",
exports.athens = 23.7163375; //"23d42'58.815\"E",
exports.oslo = 10.722916666667; //"10d43'22.5\"E"
},{}],29:[function(require,module,exports){
exports.ft = {to_meter: 0.3048};
exports['us-ft'] = {to_meter: 1200 / 3937};
},{}],30:[function(require,module,exports){
var proj = require('./Proj');
var transform = require('./transform');
var wgs84 = proj('WGS84');
function transformer(from, to, coords) {
var transformedArray;
if (Array.isArray(coords)) {
transformedArray = transform(from, to, coords);
if (coords.length === 3) {
return [transformedArray.x, transformedArray.y, transformedArray.z];
}
else {
return [transformedArray.x, transformedArray.y];
}
}
else {
return transform(from, to, coords);
}
}
function checkProj(item) {
if (item instanceof proj) {
return item;
}
if (item.oProj) {
return item.oProj;
}
return proj(item);
}
function proj4(fromProj, toProj, coord) {
fromProj = checkProj(fromProj);
var single = false;
var obj;
if (typeof toProj === 'undefined') {
toProj = fromProj;
fromProj = wgs84;
single = true;
}
else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) {
coord = toProj;
toProj = fromProj;
fromProj = wgs84;
single = true;
}
toProj = checkProj(toProj);
if (coord) {
return transformer(fromProj, toProj, coord);
}
else {
obj = {
forward: function(coords) {
return transformer(fromProj, toProj, coords);
},
inverse: function(coords) {
return transformer(toProj, fromProj, coords);
}
};
if (single) {
obj.oProj = toProj;
}
return obj;
}
}
module.exports = proj4;
},{"./Proj":3,"./transform":67}],31:[function(require,module,exports){
var HALF_PI = Math.PI/2;
var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var PJD_GRIDSHIFT = 3;
var PJD_WGS84 = 4; // WGS84 or equivalent
var PJD_NODATUM = 5; // WGS84 or equivalent
var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
var AD_C = 1.0026000;
var COS_67P5 = 0.38268343236508977;
var datum = function(proj) {
if (!(this instanceof datum)) {
return new datum(proj);
}
this.datum_type = PJD_WGS84; //default setting
if (!proj) {
return;
}
if (proj.datumCode && proj.datumCode === 'none') {
this.datum_type = PJD_NODATUM;
}
if (proj.datum_params) {
this.datum_params = proj.datum_params.map(parseFloat);
if (this.datum_params[0] !== 0 || this.datum_params[1] !== 0 || this.datum_params[2] !== 0) {
this.datum_type = PJD_3PARAM;
}
if (this.datum_params.length > 3) {
if (this.datum_params[3] !== 0 || this.datum_params[4] !== 0 || this.datum_params[5] !== 0 || this.datum_params[6] !== 0) {
this.datum_type = PJD_7PARAM;
this.datum_params[3] *= SEC_TO_RAD;
this.datum_params[4] *= SEC_TO_RAD;
this.datum_params[5] *= SEC_TO_RAD;
this.datum_params[6] = (this.datum_params[6] / 1000000.0) + 1.0;
}
}
}
// DGR 2011-03-21 : nadgrids support
this.datum_type = proj.grids ? PJD_GRIDSHIFT : this.datum_type;
this.a = proj.a; //datum object also uses these values
this.b = proj.b;
this.es = proj.es;
this.ep2 = proj.ep2;
if (this.datum_type === PJD_GRIDSHIFT) {
this.grids = proj.grids;
}
};
datum.prototype = {
/****************************************************************/
// cs_compare_datums()
// Returns TRUE if the two datums match, otherwise FALSE.
compare_datums: function(dest) {
if (this.datum_type !== dest.datum_type) {
return false; // false, datums are not equal
}
else if (this.a !== dest.a || Math.abs(this.es - dest.es) > 0.000000000050) {
// the tolerence for es is to ensure that GRS80 and WGS84
// are considered identical
return false;
}
else if (this.datum_type === PJD_3PARAM) {
return (this.datum_params[0] === dest.datum_params[0] && this.datum_params[1] === dest.datum_params[1] && this.datum_params[2] === dest.datum_params[2]);
}
else if (this.datum_type === PJD_7PARAM) {
return (this.datum_params[0] === dest.datum_params[0] && this.datum_params[1] === dest.datum_params[1] && this.datum_params[2] === dest.datum_params[2] && this.datum_params[3] === dest.datum_params[3] && this.datum_params[4] === dest.datum_params[4] && this.datum_params[5] === dest.datum_params[5] && this.datum_params[6] === dest.datum_params[6]);
}
else if (this.datum_type === PJD_GRIDSHIFT || dest.datum_type === PJD_GRIDSHIFT) {
//alert("ERROR: Grid shift transformations are not implemented.");
//return false
//DGR 2012-07-29 lazy ...
return this.nadgrids === dest.nadgrids;
}
else {
return true; // datums are equal
}
}, // cs_compare_datums()
/*
* The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
* (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
* according to the current ellipsoid parameters.
*
* Latitude : Geodetic latitude in radians (input)
* Longitude : Geodetic longitude in radians (input)
* Height : Geodetic height, in meters (input)
* X : Calculated Geocentric X coordinate, in meters (output)
* Y : Calculated Geocentric Y coordinate, in meters (output)
* Z : Calculated Geocentric Z coordinate, in meters (output)
*
*/
geodetic_to_geocentric: function(p) {
var Longitude = p.x;
var Latitude = p.y;
var Height = p.z ? p.z : 0; //Z value not always supplied
var X; // output
var Y;
var Z;
var Error_Code = 0; // GEOCENT_NO_ERROR;
var Rn; /* Earth radius at location */
var Sin_Lat; /* Math.sin(Latitude) */
var Sin2_Lat; /* Square of Math.sin(Latitude) */
var Cos_Lat; /* Math.cos(Latitude) */
/*
** Don't blow up if Latitude is just a little out of the value
** range as it may just be a rounding issue. Also removed longitude
** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001.
*/
if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) {
Latitude = -HALF_PI;
}
else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) {
Latitude = HALF_PI;
}
else if ((Latitude < -HALF_PI) || (Latitude > HALF_PI)) {
/* Latitude out of range */
//..reportError('geocent:lat out of range:' + Latitude);
return null;
}
if (Longitude > Math.PI) {
Longitude -= (2 * Math.PI);
}
Sin_Lat = Math.sin(Latitude);
Cos_Lat = Math.cos(Latitude);
Sin2_Lat = Sin_Lat * Sin_Lat;
Rn = this.a / (Math.sqrt(1.0e0 - this.es * Sin2_Lat));
X = (Rn + Height) * Cos_Lat * Math.cos(Longitude);
Y = (Rn + Height) * Cos_Lat * Math.sin(Longitude);
Z = ((Rn * (1 - this.es)) + Height) * Sin_Lat;
p.x = X;
p.y = Y;
p.z = Z;
return Error_Code;
}, // cs_geodetic_to_geocentric()
geocentric_to_geodetic: function(p) {
/* local defintions and variables */
/* end-criterium of loop, accuracy of sin(Latitude) */
var genau = 1e-12;
var genau2 = (genau * genau);
var maxiter = 30;
var P; /* distance between semi-minor axis and location */
var RR; /* distance between center and location */
var CT; /* sin of geocentric latitude */
var ST; /* cos of geocentric latitude */
var RX;
var RK;
var RN; /* Earth radius at location */
var CPHI0; /* cos of start or old geodetic latitude in iterations */
var SPHI0; /* sin of start or old geodetic latitude in iterations */
var CPHI; /* cos of searched geodetic latitude */
var SPHI; /* sin of searched geodetic latitude */
var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
var At_Pole; /* indicates location is in polar region */
var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */
var X = p.x;
var Y = p.y;
var Z = p.z ? p.z : 0.0; //Z value not always supplied
var Longitude;
var Latitude;
var Height;
At_Pole = false;
P = Math.sqrt(X * X + Y * Y);
RR = Math.sqrt(X * X + Y * Y + Z * Z);
/* special cases for latitude and longitude */
if (P / this.a < genau) {
/* special case, if P=0. (X=0., Y=0.) */
At_Pole = true;
Longitude = 0.0;
/* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis
* of ellipsoid (=center of mass), Latitude becomes PI/2 */
if (RR / this.a < genau) {
Latitude = HALF_PI;
Height = -this.b;
return;
}
}
else {
/* ellipsoidal (geodetic) longitude
* interval: -PI < Longitude <= +PI */
Longitude = Math.atan2(Y, X);
}
/* --------------------------------------------------------------
* Following iterative algorithm was developped by
* "Institut for Erdmessung", University of Hannover, July 1988.
* Internet: www.ife.uni-hannover.de
* Iterative computation of CPHI,SPHI and Height.
* Iteration of CPHI and SPHI to 10**-12 radian resp.
* 2*10**-7 arcsec.
* --------------------------------------------------------------
*/
CT = Z / RR;
ST = P / RR;
RX = 1.0 / Math.sqrt(1.0 - this.es * (2.0 - this.es) * ST * ST);
CPHI0 = ST * (1.0 - this.es) * RX;
SPHI0 = CT * RX;
iter = 0;
/* loop to find sin(Latitude) resp. Latitude
* until |sin(Latitude(iter)-Latitude(iter-1))| < genau */
do {
iter++;
RN = this.a / Math.sqrt(1.0 - this.es * SPHI0 * SPHI0);
/* ellipsoidal (geodetic) height */
Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - this.es * SPHI0 * SPHI0);
RK = this.es * RN / (RN + Height);
RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST);
CPHI = ST * (1.0 - RK) * RX;
SPHI = CT * RX;
SDPHI = SPHI * CPHI0 - CPHI * SPHI0;
CPHI0 = CPHI;
SPHI0 = SPHI;
}
while (SDPHI * SDPHI > genau2 && iter < maxiter);
/* ellipsoidal (geodetic) latitude */
Latitude = Math.atan(SPHI / Math.abs(CPHI));
p.x = Longitude;
p.y = Latitude;
p.z = Height;
return p;
}, // cs_geocentric_to_geodetic()
/** Convert_Geocentric_To_Geodetic
* The method used here is derived from 'An Improved Algorithm for
* Geocentric to Geodetic Coordinate Conversion', by Ralph Toms, Feb 1996
*/
geocentric_to_geodetic_noniter: function(p) {
var X = p.x;
var Y = p.y;
var Z = p.z ? p.z : 0; //Z value not always supplied
var Longitude;
var Latitude;
var Height;
var W; /* distance from Z axis */
var W2; /* square of distance from Z axis */
var T0; /* initial estimate of vertical component */
var T1; /* corrected estimate of vertical component */
var S0; /* initial estimate of horizontal component */
var S1; /* corrected estimate of horizontal component */
var Sin_B0; /* Math.sin(B0), B0 is estimate of Bowring aux variable */
var Sin3_B0; /* cube of Math.sin(B0) */
var Cos_B0; /* Math.cos(B0) */
var Sin_p1; /* Math.sin(phi1), phi1 is estimated latitude */
var Cos_p1; /* Math.cos(phi1) */
var Rn; /* Earth radius at location */
var Sum; /* numerator of Math.cos(phi1) */
var At_Pole; /* indicates location is in polar region */
X = parseFloat(X); // cast from string to float
Y = parseFloat(Y);
Z = parseFloat(Z);
At_Pole = false;
if (X !== 0.0) {
Longitude = Math.atan2(Y, X);
}
else {
if (Y > 0) {
Longitude = HALF_PI;
}
else if (Y < 0) {
Longitude = -HALF_PI;
}
else {
At_Pole = true;
Longitude = 0.0;
if (Z > 0.0) { /* north pole */
Latitude = HALF_PI;
}
else if (Z < 0.0) { /* south pole */
Latitude = -HALF_PI;
}
else { /* center of earth */
Latitude = HALF_PI;
Height = -this.b;
return;
}
}
}
W2 = X * X + Y * Y;
W = Math.sqrt(W2);
T0 = Z * AD_C;
S0 = Math.sqrt(T0 * T0 + W2);
Sin_B0 = T0 / S0;
Cos_B0 = W / S0;
Sin3_B0 = Sin_B0 * Sin_B0 * Sin_B0;
T1 = Z + this.b * this.ep2 * Sin3_B0;
Sum = W - this.a * this.es * Cos_B0 * Cos_B0 * Cos_B0;
S1 = Math.sqrt(T1 * T1 + Sum * Sum);
Sin_p1 = T1 / S1;
Cos_p1 = Sum / S1;
Rn = this.a / Math.sqrt(1.0 - this.es * Sin_p1 * Sin_p1);
if (Cos_p1 >= COS_67P5) {
Height = W / Cos_p1 - Rn;
}
else if (Cos_p1 <= -COS_67P5) {
Height = W / -Cos_p1 - Rn;
}
else {
Height = Z / Sin_p1 + Rn * (this.es - 1.0);
}
if (At_Pole === false) {
Latitude = Math.atan(Sin_p1 / Cos_p1);
}
p.x = Longitude;
p.y = Latitude;
p.z = Height;
return p;
}, // geocentric_to_geodetic_noniter()
/****************************************************************/
// pj_geocentic_to_wgs84( p )
// p = point to transform in geocentric coordinates (x,y,z)
geocentric_to_wgs84: function(p) {
if (this.datum_type === PJD_3PARAM) {
// if( x[io] === HUGE_VAL )
// continue;
p.x += this.datum_params[0];
p.y += this.datum_params[1];
p.z += this.datum_params[2];
}
else if (this.datum_type === PJD_7PARAM) {
var Dx_BF = this.datum_params[0];
var Dy_BF = this.datum_params[1];
var Dz_BF = this.datum_params[2];
var Rx_BF = this.datum_params[3];
var Ry_BF = this.datum_params[4];
var Rz_BF = this.datum_params[5];
var M_BF = this.datum_params[6];
// if( x[io] === HUGE_VAL )
// continue;
var x_out = M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF;
var y_out = M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF;
var z_out = M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF;
p.x = x_out;
p.y = y_out;
p.z = z_out;
}
}, // cs_geocentric_to_wgs84
/****************************************************************/
// pj_geocentic_from_wgs84()
// coordinate system definition,
// point to transform in geocentric coordinates (x,y,z)
geocentric_from_wgs84: function(p) {
if (this.datum_type === PJD_3PARAM) {
//if( x[io] === HUGE_VAL )
// continue;
p.x -= this.datum_params[0];
p.y -= this.datum_params[1];
p.z -= this.datum_params[2];
}
else if (this.datum_type === PJD_7PARAM) {
var Dx_BF = this.datum_params[0];
var Dy_BF = this.datum_params[1];
var Dz_BF = this.datum_params[2];
var Rx_BF = this.datum_params[3];
var Ry_BF = this.datum_params[4];
var Rz_BF = this.datum_params[5];
var M_BF = this.datum_params[6];
var x_tmp = (p.x - Dx_BF) / M_BF;
var y_tmp = (p.y - Dy_BF) / M_BF;
var z_tmp = (p.z - Dz_BF) / M_BF;
//if( x[io] === HUGE_VAL )
// continue;
p.x = x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp;
p.y = -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp;
p.z = Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp;
} //cs_geocentric_from_wgs84()
}
};
/** point object, nothing fancy, just allows values to be
passed back and forth by reference rather than by value.
Other point classes may be used as long as they have
x and y properties, which will get modified in the transform method.
*/
module.exports = datum;
},{}],32:[function(require,module,exports){
var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var PJD_GRIDSHIFT = 3;
var PJD_NODATUM = 5; // WGS84 or equivalent
var SRS_WGS84_SEMIMAJOR = 6378137; // only used in grid shift transforms
var SRS_WGS84_ESQUARED = 0.006694379990141316; //DGR: 2012-07-29
module.exports = function(source, dest, point) {
var wp, i, l;
function checkParams(fallback) {
return (fallback === PJD_3PARAM || fallback === PJD_7PARAM);
}
// Short cut if the datums are identical.
if (source.compare_datums(dest)) {
return point; // in this case, zero is sucess,
// whereas cs_compare_datums returns 1 to indicate TRUE
// confusing, should fix this
}
// Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest
if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) {
return point;
}
//DGR: 2012-07-29 : add nadgrids support (begin)
var src_a = source.a;
var src_es = source.es;
var dst_a = dest.a;
var dst_es = dest.es;
var fallback = source.datum_type;
// If this datum requires grid shifts, then apply it to geodetic coordinates.
if (fallback === PJD_GRIDSHIFT) {
if (this.apply_gridshift(source, 0, point) === 0) {
source.a = SRS_WGS84_SEMIMAJOR;
source.es = SRS_WGS84_ESQUARED;
}
else {
// try 3 or 7 params transformation or nothing ?
if (!source.datum_params) {
source.a = src_a;
source.es = source.es;
return point;
}
wp = 1;
for (i = 0, l = source.datum_params.length; i < l; i++) {
wp *= source.datum_params[i];
}
if (wp === 0) {
source.a = src_a;
source.es = source.es;
return point;
}
if (source.datum_params.length > 3) {
fallback = PJD_7PARAM;
}
else {
fallback = PJD_3PARAM;
}
}
}
if (dest.datum_type === PJD_GRIDSHIFT) {
dest.a = SRS_WGS84_SEMIMAJOR;
dest.es = SRS_WGS84_ESQUARED;
}
// Do we need to go through geocentric coordinates?
if (source.es !== dest.es || source.a !== dest.a || checkParams(fallback) || checkParams(dest.datum_type)) {
//DGR: 2012-07-29 : add nadgrids support (end)
// Convert to geocentric coordinates.
source.geodetic_to_geocentric(point);
// CHECK_RETURN;
// Convert between datums
if (checkParams(source.datum_type)) {
source.geocentric_to_wgs84(point);
// CHECK_RETURN;
}
if (checkParams(dest.datum_type)) {
dest.geocentric_from_wgs84(point);
// CHECK_RETURN;
}
// Convert back to geodetic coordinates
dest.geocentric_to_geodetic(point);
// CHECK_RETURN;
}
// Apply grid shift to destination if required
if (dest.datum_type === PJD_GRIDSHIFT) {
this.apply_gridshift(dest, 1, point);
// CHECK_RETURN;
}
source.a = src_a;
source.es = src_es;
dest.a = dst_a;
dest.es = dst_es;
return point;
};
},{}],33:[function(require,module,exports){
var globals = require('./global');
var parseProj = require('./projString');
var wkt = require('./wkt');
function defs(name) {
/*global console*/
var that = this;
if (arguments.length === 2) {
var def = arguments[1];
if (typeof def === 'string') {
if (def.charAt(0) === '+') {
defs[name] = parseProj(arguments[1]);
}
else {
defs[name] = wkt(arguments[1]);
}
} else {
defs[name] = def;
}
}
else if (arguments.length === 1) {
if (Array.isArray(name)) {
return name.map(function(v) {
if (Array.isArray(v)) {
defs.apply(that, v);
}
else {
defs(v);
}
});
}
else if (typeof name === 'string') {
if (name in defs) {
return defs[name];
}
}
else if ('EPSG' in name) {
defs['EPSG:' + name.EPSG] = name;
}
else if ('ESRI' in name) {
defs['ESRI:' + name.ESRI] = name;
}
else if ('IAU2000' in name) {
defs['IAU2000:' + name.IAU2000] = name;
}
else {
console.log(name);
}
return;
}
}
globals(defs);
module.exports = defs;
},{"./global":36,"./projString":40,"./wkt":68}],34:[function(require,module,exports){
var Datum = require('./constants/Datum');
var Ellipsoid = require('./constants/Ellipsoid');
var extend = require('./extend');
var datum = require('./datum');
var EPSLN = 1.0e-10;
// ellipoid pj_set_ell.c
var SIXTH = 0.1666666666666666667;
/* 1/6 */
var RA4 = 0.04722222222222222222;
/* 17/360 */
var RA6 = 0.02215608465608465608;
module.exports = function(json) {
// DGR 2011-03-20 : nagrids -> nadgrids
if (json.datumCode && json.datumCode !== 'none') {
var datumDef = Datum[json.datumCode];
if (datumDef) {
json.datum_params = datumDef.towgs84 ? datumDef.towgs84.split(',') : null;
json.ellps = datumDef.ellipse;
json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;
}
}
if (!json.a) { // do we have an ellipsoid?
var ellipse = Ellipsoid[json.ellps] ? Ellipsoid[json.ellps] : Ellipsoid.WGS84;
extend(json, ellipse);
}
if (json.rf && !json.b) {
json.b = (1.0 - 1.0 / json.rf) * json.a;
}
if (json.rf === 0 || Math.abs(json.a - json.b) < EPSLN) {
json.sphere = true;
json.b = json.a;
}
json.a2 = json.a * json.a; // used in geocentric
json.b2 = json.b * json.b; // used in geocentric
json.es = (json.a2 - json.b2) / json.a2; // e ^ 2
json.e = Math.sqrt(json.es); // eccentricity
if (json.R_A) {
json.a *= 1 - json.es * (SIXTH + json.es * (RA4 + json.es * RA6));
json.a2 = json.a * json.a;
json.b2 = json.b * json.b;
json.es = 0;
}
json.ep2 = (json.a2 - json.b2) / json.b2; // used in geocentric
if (!json.k0) {
json.k0 = 1.0; //default value
}
//DGR 2010-11-12: axis
if (!json.axis) {
json.axis = "enu";
}
if (!json.datum) {
json.datum = datum(json);
}
return json;
};
},{"./constants/Datum":26,"./constants/Ellipsoid":27,"./datum":31,"./extend":35}],35:[function(require,module,exports){
module.exports = function(destination, source) {
destination = destination || {};
var value, property;
if (!source) {
return destination;
}
for (property in source) {
value = source[property];
if (value !== undefined) {
destination[property] = value;
}
}
return destination;
};
},{}],36:[function(require,module,exports){
module.exports = function(defs) {
defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");
defs('EPSG:3857', "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
defs.WGS84 = defs['EPSG:4326'];
defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857
defs.GOOGLE = defs['EPSG:3857'];
defs['EPSG:900913'] = defs['EPSG:3857'];
defs['EPSG:102113'] = defs['EPSG:3857'];
};
},{}],37:[function(require,module,exports){
var projs = [
require('./projections/tmerc'),
require('./projections/utm'),
require('./projections/sterea'),
require('./projections/stere'),
require('./projections/somerc'),
require('./projections/omerc'),
require('./projections/lcc'),
require('./projections/krovak'),
require('./projections/cass'),
require('./projections/laea'),
require('./projections/aea'),
require('./projections/gnom'),
require('./projections/cea'),
require('./projections/eqc'),
require('./projections/poly'),
require('./projections/nzmg'),
require('./projections/mill'),
require('./projections/sinu'),
require('./projections/moll'),
require('./projections/eqdc'),
require('./projections/vandg'),
require('./projections/aeqd')
];
module.exports = function(proj4){
projs.forEach(function(proj){
proj4.Proj.projections.add(proj);
});
};
},{"./projections/aea":42,"./projections/aeqd":43,"./projections/cass":44,"./projections/cea":45,"./projections/eqc":46,"./projections/eqdc":47,"./projections/gnom":49,"./projections/krovak":50,"./projections/laea":51,"./projections/lcc":52,"./projections/mill":55,"./projections/moll":56,"./projections/nzmg":57,"./projections/omerc":58,"./projections/poly":59,"./projections/sinu":60,"./projections/somerc":61,"./projections/stere":62,"./projections/sterea":63,"./projections/tmerc":64,"./projections/utm":65,"./projections/vandg":66}],38:[function(require,module,exports){
var proj4 = require('./core');
proj4.defaultDatum = 'WGS84'; //default datum
proj4.Proj = require('./Proj');
proj4.WGS84 = new proj4.Proj('WGS84');
proj4.Point = require('./Point');
proj4.toPoint = require("./common/toPoint");
proj4.defs = require('./defs');
proj4.transform = require('./transform');
proj4.mgrs = require('mgrs');
proj4.version = require('../package.json').version;
require('./includedProjections')(proj4);
module.exports = proj4;
},{"../package.json":69,"./Point":2,"./Proj":3,"./common/toPoint":24,"./core":30,"./defs":33,"./includedProjections":37,"./transform":67,"mgrs":1}],39:[function(require,module,exports){
var defs = require('./defs');
var wkt = require('./wkt');
var projStr = require('./projString');
function testObj(code){
return typeof code === 'string';
}
function testDef(code){
return code in defs;
}
function testWKT(code){
var codeWords = ['GEOGCS','GEOCCS','PROJCS','LOCAL_CS'];
return codeWords.reduce(function(a,b){
return a+1+code.indexOf(b);
},0);
}
function testProj(code){
return code[0] === '+';
}
function parse(code){
if (testObj(code)) {
//check to see if this is a WKT string
if (testDef(code)) {
return defs[code];
}
else if (testWKT(code)) {
return wkt(code);
}
else if (testProj(code)) {
return projStr(code);
}
}else{
return code;
}
}
module.exports = parse;
},{"./defs":33,"./projString":40,"./wkt":68}],40:[function(require,module,exports){
var D2R = 0.01745329251994329577;
var PrimeMeridian = require('./constants/PrimeMeridian');
var units = require('./constants/units');
module.exports = function(defData) {
var self = {};
var paramObj = {};
defData.split("+").map(function(v) {
return v.trim();
}).filter(function(a) {
return a;
}).forEach(function(a) {
var split = a.split("=");
split.push(true);
paramObj[split[0].toLowerCase()] = split[1];
});
var paramName, paramVal, paramOutname;
var params = {
proj: 'projName',
datum: 'datumCode',
rf: function(v) {
self.rf = parseFloat(v);
},
lat_0: function(v) {
self.lat0 = v * D2R;
},
lat_1: function(v) {
self.lat1 = v * D2R;
},
lat_2: function(v) {
self.lat2 = v * D2R;
},
lat_ts: function(v) {
self.lat_ts = v * D2R;
},
lon_0: function(v) {
self.long0 = v * D2R;
},
lon_1: function(v) {
self.long1 = v * D2R;
},
lon_2: function(v) {
self.long2 = v * D2R;
},
alpha: function(v) {
self.alpha = parseFloat(v) * D2R;
},
lonc: function(v) {
self.longc = v * D2R;
},
x_0: function(v) {
self.x0 = parseFloat(v);
},
y_0: function(v) {
self.y0 = parseFloat(v);
},
k_0: function(v) {
self.k0 = parseFloat(v);
},
k: function(v) {
self.k0 = parseFloat(v);
},
a: function(v) {
self.a = parseFloat(v);
},
b: function(v) {
self.b = parseFloat(v);
},
r_a: function() {
self.R_A = true;
},
zone: function(v) {
self.zone = parseInt(v, 10);
},
south: function() {
self.utmSouth = true;
},
towgs84: function(v) {
self.datum_params = v.split(",").map(function(a) {
return parseFloat(a);
});
},
to_meter: function(v) {
self.to_meter = parseFloat(v);
},
units: function(v) {
self.units = v;
if (units[v]) {
self.to_meter = units[v].to_meter;
}
},
from_greenwich: function(v) {
self.from_greenwich = v * D2R;
},
pm: function(v) {
self.from_greenwich = (PrimeMeridian[v] ? PrimeMeridian[v] : parseFloat(v)) * D2R;
},
nadgrids: function(v) {
if (v === '@null') {
self.datumCode = 'none';
}
else {
self.nadgrids = v;
}
},
axis: function(v) {
var legalAxis = "ewnsud";
if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) {
self.axis = v;
}
}
};
for (paramName in paramObj) {
paramVal = paramObj[paramName];
if (paramName in params) {
paramOutname = params[paramName];
if (typeof paramOutname === 'function') {
paramOutname(paramVal);
}
else {
self[paramOutname] = paramVal;
}
}
else {
self[paramName] = paramVal;
}
}
if(typeof self.datumCode === 'string' && self.datumCode !== "WGS84"){
self.datumCode = self.datumCode.toLowerCase();
}
return self;
};
},{"./constants/PrimeMeridian":28,"./constants/units":29}],41:[function(require,module,exports){
var projs = [
require('./projections/merc'),
require('./projections/longlat')
];
var names = {};
var projStore = [];
function add(proj, i) {
var len = projStore.length;
if (!proj.names) {
console.log(i);
return true;
}
projStore[len] = proj;
proj.names.forEach(function(n) {
names[n.toLowerCase()] = len;
});
return this;
}
exports.add = add;
exports.get = function(name) {
if (!name) {
return false;
}
var n = name.toLowerCase();
if (typeof names[n] !== 'undefined' && projStore[names[n]]) {
return projStore[names[n]];
}
};
exports.start = function() {
projs.forEach(add);
};
},{"./projections/longlat":53,"./projections/merc":54}],42:[function(require,module,exports){
var EPSLN = 1.0e-10;
var msfnz = require('../common/msfnz');
var qsfnz = require('../common/qsfnz');
var adjust_lon = require('../common/adjust_lon');
var asinz = require('../common/asinz');
exports.init = function() {
if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
return;
}
this.temp = this.b / this.a;
this.es = 1 - Math.pow(this.temp, 2);
this.e3 = Math.sqrt(this.es);
this.sin_po = Math.sin(this.lat1);
this.cos_po = Math.cos(this.lat1);
this.t1 = this.sin_po;
this.con = this.sin_po;
this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po);
this.qs1 = qsfnz(this.e3, this.sin_po, this.cos_po);
this.sin_po = Math.sin(this.lat2);
this.cos_po = Math.cos(this.lat2);
this.t2 = this.sin_po;
this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po);
this.qs2 = qsfnz(this.e3, this.sin_po, this.cos_po);
this.sin_po = Math.sin(this.lat0);
this.cos_po = Math.cos(this.lat0);
this.t3 = this.sin_po;
this.qs0 = qsfnz(this.e3, this.sin_po, this.cos_po);
if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1);
}
else {
this.ns0 = this.con;
}
this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1;
this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0;
};
/* Albers Conical Equal Area forward equations--mapping lat,long to x,y
-------------------------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
this.sin_phi = Math.sin(lat);
this.cos_phi = Math.cos(lat);
var qs = qsfnz(this.e3, this.sin_phi, this.cos_phi);
var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;
var theta = this.ns0 * adjust_lon(lon - this.long0);
var x = rh1 * Math.sin(theta) + this.x0;
var y = this.rh - rh1 * Math.cos(theta) + this.y0;
p.x = x;
p.y = y;
return p;
};
exports.inverse = function(p) {
var rh1, qs, con, theta, lon, lat;
p.x -= this.x0;
p.y = this.rh - p.y + this.y0;
if (this.ns0 >= 0) {
rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
con = 1;
}
else {
rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
con = -1;
}
theta = 0;
if (rh1 !== 0) {
theta = Math.atan2(con * p.x, con * p.y);
}
con = rh1 * this.ns0 / this.a;
if (this.sphere) {
lat = Math.asin((this.c - con * con) / (2 * this.ns0));
}
else {
qs = (this.c - con * con) / this.ns0;
lat = this.phi1z(this.e3, qs);
}
lon = adjust_lon(theta / this.ns0 + this.long0);
p.x = lon;
p.y = lat;
return p;
};
/* Function to compute phi1, the latitude for the inverse of the
Albers Conical Equal-Area projection.
-------------------------------------------*/
exports.phi1z = function(eccent, qs) {
var sinphi, cosphi, con, com, dphi;
var phi = asinz(0.5 * qs);
if (eccent < EPSLN) {
return phi;
}
var eccnts = eccent * eccent;
for (var i = 1; i <= 25; i++) {
sinphi = Math.sin(phi);
cosphi = Math.cos(phi);
con = eccent * sinphi;
com = 1 - con * con;
dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
phi = phi + dphi;
if (Math.abs(dphi) <= 1e-7) {
return phi;
}
}
return null;
};
exports.names = ["Albers_Conic_Equal_Area", "Albers", "aea"];
},{"../common/adjust_lon":6,"../common/asinz":7,"../common/msfnz":16,"../common/qsfnz":21}],43:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var mlfn = require('../common/mlfn');
var e0fn = require('../common/e0fn');
var e1fn = require('../common/e1fn');
var e2fn = require('../common/e2fn');
var e3fn = require('../common/e3fn');
var gN = require('../common/gN');
var asinz = require('../common/asinz');
var imlfn = require('../common/imlfn');
exports.init = function() {
this.sin_p12 = Math.sin(this.lat0);
this.cos_p12 = Math.cos(this.lat0);
};
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var sinphi = Math.sin(p.y);
var cosphi = Math.cos(p.y);
var dlon = adjust_lon(lon - this.long0);
var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5;
if (this.sphere) {
if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
//North Pole case
p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon);
p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon);
return p;
}
else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
//South Pole case
p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon);
p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon);
return p;
}
else {
//default case
cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon);
c = Math.acos(cos_c);
kp = c / Math.sin(c);
p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon);
p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon));
return p;
}
}
else {
e0 = e0fn(this.es);
e1 = e1fn(this.es);
e2 = e2fn(this.es);
e3 = e3fn(this.es);
if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
//North Pole case
Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
Ml = this.a * mlfn(e0, e1, e2, e3, lat);
p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon);
p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon);
return p;
}
else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
//South Pole case
Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
Ml = this.a * mlfn(e0, e1, e2, e3, lat);
p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon);
p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon);
return p;
}
else {
//Default case
tanphi = sinphi / cosphi;
Nl1 = gN(this.a, this.e, this.sin_p12);
Nl = gN(this.a, this.e, sinphi);
psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi));
Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon));
if (Az === 0) {
s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
}
else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) {
s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
}
else {
s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az));
}
G = this.e * this.sin_p12 / Math.sqrt(1 - this.es);
H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es);
GH = G * H;
Hs = H * H;
s2 = s * s;
s3 = s2 * s;
s4 = s3 * s;
s5 = s4 * s;
c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH);
p.x = this.x0 + c * Math.sin(Az);
p.y = this.y0 + c * Math.cos(Az);
return p;
}
}
};
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F;
if (this.sphere) {
rh = Math.sqrt(p.x * p.x + p.y * p.y);
if (rh > (2 * HALF_PI * this.a)) {
return;
}
z = rh / this.a;
sinz = Math.sin(z);
cosz = Math.cos(z);
lon = this.long0;
if (Math.abs(rh) <= EPSLN) {
lat = this.lat0;
}
else {
lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh);
con = Math.abs(this.lat0) - HALF_PI;
if (Math.abs(con) <= EPSLN) {
if (this.lat0 >= 0) {
lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));
}
else {
lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
}
}
else {
/*con = cosz - this.sin_p12 * Math.sin(lat);
if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) {
//no-op, just keep the lon value as is
} else {
var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh));
lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh)));
}*/
lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));
}
}
p.x = lon;
p.y = lat;
return p;
}
else {
e0 = e0fn(this.es);
e1 = e1fn(this.es);
e2 = e2fn(this.es);
e3 = e3fn(this.es);
if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
//North pole case
Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
rh = Math.sqrt(p.x * p.x + p.y * p.y);
M = Mlp - rh;
lat = imlfn(M / this.a, e0, e1, e2, e3);
lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
p.x = lon;
p.y = lat;
return p;
}
else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
//South pole case
Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
rh = Math.sqrt(p.x * p.x + p.y * p.y);
M = rh - Mlp;
lat = imlfn(M / this.a, e0, e1, e2, e3);
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
p.x = lon;
p.y = lat;
return p;
}
else {
//default case
rh = Math.sqrt(p.x * p.x + p.y * p.y);
Az = Math.atan2(p.x, p.y);
N1 = gN(this.a, this.e, this.sin_p12);
cosAz = Math.cos(Az);
tmp = this.e * this.cos_p12 * cosAz;
A = -tmp * tmp / (1 - this.es);
B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es);
D = rh / N1;
Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24;
F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6;
psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz);
lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi)));
lat = Math.atan((1 - this.es * F * this.sin_p12 / Math.sin(psi)) * Math.tan(psi) / (1 - this.es));
p.x = lon;
p.y = lat;
return p;
}
}
};
exports.names = ["Azimuthal_Equidistant", "aeqd"];
},{"../common/adjust_lon":6,"../common/asinz":7,"../common/e0fn":8,"../common/e1fn":9,"../common/e2fn":10,"../common/e3fn":11,"../common/gN":12,"../common/imlfn":13,"../common/mlfn":15}],44:[function(require,module,exports){
var mlfn = require('../common/mlfn');
var e0fn = require('../common/e0fn');
var e1fn = require('../common/e1fn');
var e2fn = require('../common/e2fn');
var e3fn = require('../common/e3fn');
var gN = require('../common/gN');
var adjust_lon = require('../common/adjust_lon');
var adjust_lat = require('../common/adjust_lat');
var imlfn = require('../common/imlfn');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
exports.init = function() {
if (!this.sphere) {
this.e0 = e0fn(this.es);
this.e1 = e1fn(this.es);
this.e2 = e2fn(this.es);
this.e3 = e3fn(this.es);
this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
}
};
/* Cassini forward equations--mapping lat,long to x,y
-----------------------------------------------------------------------*/
exports.forward = function(p) {
/* Forward equations
-----------------*/
var x, y;
var lam = p.x;
var phi = p.y;
lam = adjust_lon(lam - this.long0);
if (this.sphere) {
x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));
y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0);
}
else {
//ellipsoid
var sinphi = Math.sin(phi);
var cosphi = Math.cos(phi);
var nl = gN(this.a, this.e, sinphi);
var tl = Math.tan(phi) * Math.tan(phi);
var al = lam * Math.cos(phi);
var asq = al * al;
var cl = this.es * cosphi * cosphi / (1 - this.es);
var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120));
y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24);
}
p.x = x + this.x0;
p.y = y + this.y0;
return p;
};
/* Inverse equations
-----------------*/
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var x = p.x / this.a;
var y = p.y / this.a;
var phi, lam;
if (this.sphere) {
var dd = y + this.lat0;
phi = Math.asin(Math.sin(dd) * Math.cos(x));
lam = Math.atan2(Math.tan(x), Math.cos(dd));
}
else {
/* ellipsoid */
var ml1 = this.ml0 / this.a + y;
var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3);
if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) {
p.x = this.long0;
p.y = HALF_PI;
if (y < 0) {
p.y *= -1;
}
return p;
}
var nl1 = gN(this.a, this.e, Math.sin(phi1));
var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);
var tl1 = Math.pow(Math.tan(phi1), 2);
var dl = x * this.a / nl1;
var dsq = dl * dl;
phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);
lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);
}
p.x = adjust_lon(lam + this.long0);
p.y = adjust_lat(phi);
return p;
};
exports.names = ["Cassini", "Cassini_Soldner", "cass"];
},{"../common/adjust_lat":5,"../common/adjust_lon":6,"../common/e0fn":8,"../common/e1fn":9,"../common/e2fn":10,"../common/e3fn":11,"../common/gN":12,"../common/imlfn":13,"../common/mlfn":15}],45:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var qsfnz = require('../common/qsfnz');
var msfnz = require('../common/msfnz');
var iqsfnz = require('../common/iqsfnz');
/*
reference:
"Cartographic Projection Procedures for the UNIX Environment-
A User's Manual" by Gerald I. Evenden,
USGS Open File Report 90-284and Release 4 Interim Reports (2003)
*/
exports.init = function() {
//no-op
if (!this.sphere) {
this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
}
};
/* Cylindrical Equal Area forward equations--mapping lat,long to x,y
------------------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var x, y;
/* Forward equations
-----------------*/
var dlon = adjust_lon(lon - this.long0);
if (this.sphere) {
x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);
y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);
}
else {
var qs = qsfnz(this.e, Math.sin(lat));
x = this.x0 + this.a * this.k0 * dlon;
y = this.y0 + this.a * qs * 0.5 / this.k0;
}
p.x = x;
p.y = y;
return p;
};
/* Cylindrical Equal Area inverse equations--mapping x,y to lat/long
------------------------------------------------------------*/
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var lon, lat;
if (this.sphere) {
lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));
lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));
}
else {
lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a);
lon = adjust_lon(this.long0 + p.x / (this.a * this.k0));
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["cea"];
},{"../common/adjust_lon":6,"../common/iqsfnz":14,"../common/msfnz":16,"../common/qsfnz":21}],46:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var adjust_lat = require('../common/adjust_lat');
exports.init = function() {
this.x0 = this.x0 || 0;
this.y0 = this.y0 || 0;
this.lat0 = this.lat0 || 0;
this.long0 = this.long0 || 0;
this.lat_ts = this.lat_ts || 0;
this.title = this.title || "Equidistant Cylindrical (Plate Carre)";
this.rc = Math.cos(this.lat_ts);
};
// forward equations--mapping lat,long to x,y
// -----------------------------------------------------------------
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var dlon = adjust_lon(lon - this.long0);
var dlat = adjust_lat(lat - this.lat0);
p.x = this.x0 + (this.a * dlon * this.rc);
p.y = this.y0 + (this.a * dlat);
return p;
};
// inverse equations--mapping x,y to lat/long
// -----------------------------------------------------------------
exports.inverse = function(p) {
var x = p.x;
var y = p.y;
p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)));
p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a)));
return p;
};
exports.names = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
},{"../common/adjust_lat":5,"../common/adjust_lon":6}],47:[function(require,module,exports){
var e0fn = require('../common/e0fn');
var e1fn = require('../common/e1fn');
var e2fn = require('../common/e2fn');
var e3fn = require('../common/e3fn');
var msfnz = require('../common/msfnz');
var mlfn = require('../common/mlfn');
var adjust_lon = require('../common/adjust_lon');
var adjust_lat = require('../common/adjust_lat');
var imlfn = require('../common/imlfn');
var EPSLN = 1.0e-10;
exports.init = function() {
/* Place parameters in static storage for common use
-------------------------------------------------*/
// Standard Parallels cannot be equal and on opposite sides of the equator
if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
return;
}
this.lat2 = this.lat2 || this.lat1;
this.temp = this.b / this.a;
this.es = 1 - Math.pow(this.temp, 2);
this.e = Math.sqrt(this.es);
this.e0 = e0fn(this.es);
this.e1 = e1fn(this.es);
this.e2 = e2fn(this.es);
this.e3 = e3fn(this.es);
this.sinphi = Math.sin(this.lat1);
this.cosphi = Math.cos(this.lat1);
this.ms1 = msfnz(this.e, this.sinphi, this.cosphi);
this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1);
if (Math.abs(this.lat1 - this.lat2) < EPSLN) {
this.ns = this.sinphi;
}
else {
this.sinphi = Math.sin(this.lat2);
this.cosphi = Math.cos(this.lat2);
this.ms2 = msfnz(this.e, this.sinphi, this.cosphi);
this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2);
this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1);
}
this.g = this.ml1 + this.ms1 / this.ns;
this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
this.rh = this.a * (this.g - this.ml0);
};
/* Equidistant Conic forward equations--mapping lat,long to x,y
-----------------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var rh1;
/* Forward equations
-----------------*/
if (this.sphere) {
rh1 = this.a * (this.g - lat);
}
else {
var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat);
rh1 = this.a * (this.g - ml);
}
var theta = this.ns * adjust_lon(lon - this.long0);
var x = this.x0 + rh1 * Math.sin(theta);
var y = this.y0 + this.rh - rh1 * Math.cos(theta);
p.x = x;
p.y = y;
return p;
};
/* Inverse equations
-----------------*/
exports.inverse = function(p) {
p.x -= this.x0;
p.y = this.rh - p.y + this.y0;
var con, rh1, lat, lon;
if (this.ns >= 0) {
rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
con = 1;
}
else {
rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
con = -1;
}
var theta = 0;
if (rh1 !== 0) {
theta = Math.atan2(con * p.x, con * p.y);
}
if (this.sphere) {
lon = adjust_lon(this.long0 + theta / this.ns);
lat = adjust_lat(this.g - rh1 / this.a);
p.x = lon;
p.y = lat;
return p;
}
else {
var ml = this.g - rh1 / this.a;
lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3);
lon = adjust_lon(this.long0 + theta / this.ns);
p.x = lon;
p.y = lat;
return p;
}
};
exports.names = ["Equidistant_Conic", "eqdc"];
},{"../common/adjust_lat":5,"../common/adjust_lon":6,"../common/e0fn":8,"../common/e1fn":9,"../common/e2fn":10,"../common/e3fn":11,"../common/imlfn":13,"../common/mlfn":15,"../common/msfnz":16}],48:[function(require,module,exports){
var FORTPI = Math.PI/4;
var srat = require('../common/srat');
var HALF_PI = Math.PI/2;
var MAX_ITER = 20;
exports.init = function() {
var sphi = Math.sin(this.lat0);
var cphi = Math.cos(this.lat0);
cphi *= cphi;
this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi);
this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es));
this.phic0 = Math.asin(sphi / this.C);
this.ratexp = 0.5 * this.C * this.e;
this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp));
};
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI;
p.x = this.C * lon;
return p;
};
exports.inverse = function(p) {
var DEL_TOL = 1e-14;
var lon = p.x / this.C;
var lat = p.y;
var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C);
for (var i = MAX_ITER; i > 0; --i) {
lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI;
if (Math.abs(lat - p.y) < DEL_TOL) {
break;
}
p.y = lat;
}
/* convergence failed */
if (!i) {
return null;
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["gauss"];
},{"../common/srat":23}],49:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var EPSLN = 1.0e-10;
var asinz = require('../common/asinz');
/*
reference:
Wolfram Mathworld "Gnomonic Projection"
http://mathworld.wolfram.com/GnomonicProjection.html
Accessed: 12th November 2009
*/
exports.init = function() {
/* Place parameters in static storage for common use
-------------------------------------------------*/
this.sin_p14 = Math.sin(this.lat0);
this.cos_p14 = Math.cos(this.lat0);
// Approximation for projecting points to the horizon (infinity)
this.infinity_dist = 1000 * this.a;
this.rc = 1;
};
/* Gnomonic forward equations--mapping lat,long to x,y
---------------------------------------------------*/
exports.forward = function(p) {
var sinphi, cosphi; /* sin and cos value */
var dlon; /* delta longitude value */
var coslon; /* cos of longitude */
var ksp; /* scale factor */
var g;
var x, y;
var lon = p.x;
var lat = p.y;
/* Forward equations
-----------------*/
dlon = adjust_lon(lon - this.long0);
sinphi = Math.sin(lat);
cosphi = Math.cos(lat);
coslon = Math.cos(dlon);
g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;
ksp = 1;
if ((g > 0) || (Math.abs(g) <= EPSLN)) {
x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g;
y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g;
}
else {
// Point is in the opposing hemisphere and is unprojectable
// We still need to return a reasonable point, so we project
// to infinity, on a bearing
// equivalent to the northern hemisphere equivalent
// This is a reasonable approximation for short shapes and lines that
// straddle the horizon.
x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon);
y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
}
p.x = x;
p.y = y;
return p;
};
exports.inverse = function(p) {
var rh; /* Rho */
var sinc, cosc;
var c;
var lon, lat;
/* Inverse equations
-----------------*/
p.x = (p.x - this.x0) / this.a;
p.y = (p.y - this.y0) / this.a;
p.x /= this.k0;
p.y /= this.k0;
if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) {
c = Math.atan2(rh, this.rc);
sinc = Math.sin(c);
cosc = Math.cos(c);
lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);
lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);
lon = adjust_lon(this.long0 + lon);
}
else {
lat = this.phic0;
lon = 0;
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["gnom"];
},{"../common/adjust_lon":6,"../common/asinz":7}],50:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
exports.init = function() {
this.a = 6377397.155;
this.es = 0.006674372230614;
this.e = Math.sqrt(this.es);
if (!this.lat0) {
this.lat0 = 0.863937979737193;
}
if (!this.long0) {
this.long0 = 0.7417649320975901 - 0.308341501185665;
}
/* if scale not set default to 0.9999 */
if (!this.k0) {
this.k0 = 0.9999;
}
this.s45 = 0.785398163397448; /* 45 */
this.s90 = 2 * this.s45;
this.fi0 = this.lat0;
this.e2 = this.es;
this.e = Math.sqrt(this.e2);
this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2));
this.uq = 1.04216856380474;
this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa);
this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2);
this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g;
this.k1 = this.k0;
this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2));
this.s0 = 1.37008346281555;
this.n = Math.sin(this.s0);
this.ro0 = this.k1 * this.n0 / Math.tan(this.s0);
this.ad = this.s90 - this.uq;
};
/* ellipsoid */
/* calculate xy from lat/lon */
/* Constants, identical to inverse transform function */
exports.forward = function(p) {
var gfi, u, deltav, s, d, eps, ro;
var lon = p.x;
var lat = p.y;
var delta_lon = adjust_lon(lon - this.long0);
/* Transformation */
gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));
u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);
deltav = -delta_lon * this.alfa;
s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));
d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));
eps = this.n * d;
ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);
p.y = ro * Math.cos(eps) / 1;
p.x = ro * Math.sin(eps) / 1;
if (!this.czech) {
p.y *= -1;
p.x *= -1;
}
return (p);
};
/* calculate lat/lon from xy */
exports.inverse = function(p) {
var u, deltav, s, d, eps, ro, fi1;
var ok;
/* Transformation */
/* revert y, x*/
var tmp = p.x;
p.x = p.y;
p.y = tmp;
if (!this.czech) {
p.y *= -1;
p.x *= -1;
}
ro = Math.sqrt(p.x * p.x + p.y * p.y);
eps = Math.atan2(p.y, p.x);
d = eps / Math.sin(this.s0);
s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);
u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));
deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));
p.x = this.long0 - deltav / this.alfa;
fi1 = u;
ok = 0;
var iter = 0;
do {
p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);
if (Math.abs(fi1 - p.y) < 0.0000000001) {
ok = 1;
}
fi1 = p.y;
iter += 1;
} while (ok === 0 && iter < 15);
if (iter >= 15) {
return null;
}
return (p);
};
exports.names = ["Krovak", "krovak"];
},{"../common/adjust_lon":6}],51:[function(require,module,exports){
var HALF_PI = Math.PI/2;
var FORTPI = Math.PI/4;
var EPSLN = 1.0e-10;
var qsfnz = require('../common/qsfnz');
var adjust_lon = require('../common/adjust_lon');
/*
reference
"New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
*/
exports.S_POLE = 1;
exports.N_POLE = 2;
exports.EQUIT = 3;
exports.OBLIQ = 4;
/* Initialize the Lambert Azimuthal Equal Area projection
------------------------------------------------------*/
exports.init = function() {
var t = Math.abs(this.lat0);
if (Math.abs(t - HALF_PI) < EPSLN) {
this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE;
}
else if (Math.abs(t) < EPSLN) {
this.mode = this.EQUIT;
}
else {
this.mode = this.OBLIQ;
}
if (this.es > 0) {
var sinphi;
this.qp = qsfnz(this.e, 1);
this.mmf = 0.5 / (1 - this.es);
this.apa = this.authset(this.es);
switch (this.mode) {
case this.N_POLE:
this.dd = 1;
break;
case this.S_POLE:
this.dd = 1;
break;
case this.EQUIT:
this.rq = Math.sqrt(0.5 * this.qp);
this.dd = 1 / this.rq;
this.xmf = 1;
this.ymf = 0.5 * this.qp;
break;
case this.OBLIQ:
this.rq = Math.sqrt(0.5 * this.qp);
sinphi = Math.sin(this.lat0);
this.sinb1 = qsfnz(this.e, sinphi) / this.qp;
this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1);
this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1);
this.ymf = (this.xmf = this.rq) / this.dd;
this.xmf *= this.dd;
break;
}
}
else {
if (this.mode === this.OBLIQ) {
this.sinph0 = Math.sin(this.lat0);
this.cosph0 = Math.cos(this.lat0);
}
}
};
/* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y
-----------------------------------------------------------------------*/
exports.forward = function(p) {
/* Forward equations
-----------------*/
var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi;
var lam = p.x;
var phi = p.y;
lam = adjust_lon(lam - this.long0);
if (this.sphere) {
sinphi = Math.sin(phi);
cosphi = Math.cos(phi);
coslam = Math.cos(lam);
if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;
if (y <= EPSLN) {
return null;
}
y = Math.sqrt(2 / y);
x = y * cosphi * Math.sin(lam);
y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;
}
else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
if (this.mode === this.N_POLE) {
coslam = -coslam;
}
if (Math.abs(phi + this.phi0) < EPSLN) {
return null;
}
y = FORTPI - phi * 0.5;
y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y));
x = y * Math.sin(lam);
y *= coslam;
}
}
else {
sinb = 0;
cosb = 0;
b = 0;
coslam = Math.cos(lam);
sinlam = Math.sin(lam);
sinphi = Math.sin(phi);
q = qsfnz(this.e, sinphi);
if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
sinb = q / this.qp;
cosb = Math.sqrt(1 - sinb * sinb);
}
switch (this.mode) {
case this.OBLIQ:
b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam;
break;
case this.EQUIT:
b = 1 + cosb * coslam;
break;
case this.N_POLE:
b = HALF_PI + phi;
q = this.qp - q;
break;
case this.S_POLE:
b = phi - HALF_PI;
q = this.qp + q;
break;
}
if (Math.abs(b) < EPSLN) {
return null;
}
switch (this.mode) {
case this.OBLIQ:
case this.EQUIT:
b = Math.sqrt(2 / b);
if (this.mode === this.OBLIQ) {
y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam);
}
else {
y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf;
}
x = this.xmf * b * cosb * sinlam;
break;
case this.N_POLE:
case this.S_POLE:
if (q >= 0) {
x = (b = Math.sqrt(q)) * sinlam;
y = coslam * ((this.mode === this.S_POLE) ? b : -b);
}
else {
x = y = 0;
}
break;
}
}
p.x = this.a * x + this.x0;
p.y = this.a * y + this.y0;
return p;
};
/* Inverse equations
-----------------*/
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var x = p.x / this.a;
var y = p.y / this.a;
var lam, phi, cCe, sCe, q, rho, ab;
if (this.sphere) {
var cosz = 0,
rh, sinz = 0;
rh = Math.sqrt(x * x + y * y);
phi = rh * 0.5;
if (phi > 1) {
return null;
}
phi = 2 * Math.asin(phi);
if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
sinz = Math.sin(phi);
cosz = Math.cos(phi);
}
switch (this.mode) {
case this.EQUIT:
phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh);
x *= sinz;
y = cosz * rh;
break;
case this.OBLIQ:
phi = (Math.abs(rh) <= EPSLN) ? this.phi0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh);
x *= sinz * this.cosph0;
y = (cosz - Math.sin(phi) * this.sinph0) * rh;
break;
case this.N_POLE:
y = -y;
phi = HALF_PI - phi;
break;
case this.S_POLE:
phi -= HALF_PI;
break;
}
lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y);
}
else {
ab = 0;
if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
x /= this.dd;
y *= this.dd;
rho = Math.sqrt(x * x + y * y);
if (rho < EPSLN) {
p.x = 0;
p.y = this.phi0;
return p;
}
sCe = 2 * Math.asin(0.5 * rho / this.rq);
cCe = Math.cos(sCe);
x *= (sCe = Math.sin(sCe));
if (this.mode === this.OBLIQ) {
ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho;
q = this.qp * ab;
y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe;
}
else {
ab = y * sCe / rho;
q = this.qp * ab;
y = rho * cCe;
}
}
else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
if (this.mode === this.N_POLE) {
y = -y;
}
q = (x * x + y * y);
if (!q) {
p.x = 0;
p.y = this.phi0;
return p;
}
ab = 1 - q / this.qp;
if (this.mode === this.S_POLE) {
ab = -ab;
}
}
lam = Math.atan2(x, y);
phi = this.authlat(Math.asin(ab), this.apa);
}
p.x = adjust_lon(this.long0 + lam);
p.y = phi;
return p;
};
/* determine latitude from authalic latitude */
exports.P00 = 0.33333333333333333333;
exports.P01 = 0.17222222222222222222;
exports.P02 = 0.10257936507936507936;
exports.P10 = 0.06388888888888888888;
exports.P11 = 0.06640211640211640211;
exports.P20 = 0.01641501294219154443;
exports.authset = function(es) {
var t;
var APA = [];
APA[0] = es * this.P00;
t = es * es;
APA[0] += t * this.P01;
APA[1] = t * this.P10;
t *= es;
APA[0] += t * this.P02;
APA[1] += t * this.P11;
APA[2] = t * this.P20;
return APA;
};
exports.authlat = function(beta, APA) {
var t = beta + beta;
return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t));
};
exports.names = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
},{"../common/adjust_lon":6,"../common/qsfnz":21}],52:[function(require,module,exports){
var EPSLN = 1.0e-10;
var msfnz = require('../common/msfnz');
var tsfnz = require('../common/tsfnz');
var HALF_PI = Math.PI/2;
var sign = require('../common/sign');
var adjust_lon = require('../common/adjust_lon');
var phi2z = require('../common/phi2z');
exports.init = function() {
// array of: r_maj,r_min,lat1,lat2,c_lon,c_lat,false_east,false_north
//double c_lat; /* center latitude */
//double c_lon; /* center longitude */
//double lat1; /* first standard parallel */
//double lat2; /* second standard parallel */
//double r_maj; /* major axis */
//double r_min; /* minor axis */
//double false_east; /* x offset in meters */
//double false_north; /* y offset in meters */
if (!this.lat2) {
this.lat2 = this.lat1;
} //if lat2 is not defined
if (!this.k0) {
this.k0 = 1;
}
this.x0 = this.x0 || 0;
this.y0 = this.y0 || 0;
// Standard Parallels cannot be equal and on opposite sides of the equator
if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
return;
}
var temp = this.b / this.a;
this.e = Math.sqrt(1 - temp * temp);
var sin1 = Math.sin(this.lat1);
var cos1 = Math.cos(this.lat1);
var ms1 = msfnz(this.e, sin1, cos1);
var ts1 = tsfnz(this.e, this.lat1, sin1);
var sin2 = Math.sin(this.lat2);
var cos2 = Math.cos(this.lat2);
var ms2 = msfnz(this.e, sin2, cos2);
var ts2 = tsfnz(this.e, this.lat2, sin2);
var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0));
if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);
}
else {
this.ns = sin1;
}
if (isNaN(this.ns)) {
this.ns = sin1;
}
this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));
this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);
if (!this.title) {
this.title = "Lambert Conformal Conic";
}
};
// Lambert Conformal conic forward equations--mapping lat,long to x,y
// -----------------------------------------------------------------
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
// singular cases :
if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) {
lat = sign(lat) * (HALF_PI - 2 * EPSLN);
}
var con = Math.abs(Math.abs(lat) - HALF_PI);
var ts, rh1;
if (con > EPSLN) {
ts = tsfnz(this.e, lat, Math.sin(lat));
rh1 = this.a * this.f0 * Math.pow(ts, this.ns);
}
else {
con = lat * this.ns;
if (con <= 0) {
return null;
}
rh1 = 0;
}
var theta = this.ns * adjust_lon(lon - this.long0);
p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;
p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;
return p;
};
// Lambert Conformal Conic inverse equations--mapping x,y to lat/long
// -----------------------------------------------------------------
exports.inverse = function(p) {
var rh1, con, ts;
var lat, lon;
var x = (p.x - this.x0) / this.k0;
var y = (this.rh - (p.y - this.y0) / this.k0);
if (this.ns > 0) {
rh1 = Math.sqrt(x * x + y * y);
con = 1;
}
else {
rh1 = -Math.sqrt(x * x + y * y);
con = -1;
}
var theta = 0;
if (rh1 !== 0) {
theta = Math.atan2((con * x), (con * y));
}
if ((rh1 !== 0) || (this.ns > 0)) {
con = 1 / this.ns;
ts = Math.pow((rh1 / (this.a * this.f0)), con);
lat = phi2z(this.e, ts);
if (lat === -9999) {
return null;
}
}
else {
lat = -HALF_PI;
}
lon = adjust_lon(theta / this.ns + this.long0);
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
},{"../common/adjust_lon":6,"../common/msfnz":16,"../common/phi2z":17,"../common/sign":22,"../common/tsfnz":25}],53:[function(require,module,exports){
exports.init = function() {
//no-op for longlat
};
function identity(pt) {
return pt;
}
exports.forward = identity;
exports.inverse = identity;
exports.names = ["longlat", "identity"];
},{}],54:[function(require,module,exports){
var msfnz = require('../common/msfnz');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var R2D = 57.29577951308232088;
var adjust_lon = require('../common/adjust_lon');
var FORTPI = Math.PI/4;
var tsfnz = require('../common/tsfnz');
var phi2z = require('../common/phi2z');
exports.init = function() {
var con = this.b / this.a;
this.es = 1 - con * con;
if(!('x0' in this)){
this.x0 = 0;
}
if(!('y0' in this)){
this.y0 = 0;
}
this.e = Math.sqrt(this.es);
if (this.lat_ts) {
if (this.sphere) {
this.k0 = Math.cos(this.lat_ts);
}
else {
this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
}
}
else {
if (!this.k0) {
if (this.k) {
this.k0 = this.k;
}
else {
this.k0 = 1;
}
}
}
};
/* Mercator forward equations--mapping lat,long to x,y
--------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
// convert to radians
if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) {
return null;
}
var x, y;
if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
return null;
}
else {
if (this.sphere) {
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat));
}
else {
var sinphi = Math.sin(lat);
var ts = tsfnz(this.e, lat, sinphi);
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
y = this.y0 - this.a * this.k0 * Math.log(ts);
}
p.x = x;
p.y = y;
return p;
}
};
/* Mercator inverse equations--mapping x,y to lat/long
--------------------------------------------------*/
exports.inverse = function(p) {
var x = p.x - this.x0;
var y = p.y - this.y0;
var lon, lat;
if (this.sphere) {
lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0)));
}
else {
var ts = Math.exp(-y / (this.a * this.k0));
lat = phi2z(this.e, ts);
if (lat === -9999) {
return null;
}
}
lon = adjust_lon(this.long0 + x / (this.a * this.k0));
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
},{"../common/adjust_lon":6,"../common/msfnz":16,"../common/phi2z":17,"../common/tsfnz":25}],55:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
/*
reference
"New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
*/
/* Initialize the Miller Cylindrical projection
-------------------------------------------*/
exports.init = function() {
//no-op
};
/* Miller Cylindrical forward equations--mapping lat,long to x,y
------------------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
/* Forward equations
-----------------*/
var dlon = adjust_lon(lon - this.long0);
var x = this.x0 + this.a * dlon;
var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;
p.x = x;
p.y = y;
return p;
};
/* Miller Cylindrical inverse equations--mapping x,y to lat/long
------------------------------------------------------------*/
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var lon = adjust_lon(this.long0 + p.x / this.a);
var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Miller_Cylindrical", "mill"];
},{"../common/adjust_lon":6}],56:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var EPSLN = 1.0e-10;
exports.init = function() {};
/* Mollweide forward equations--mapping lat,long to x,y
----------------------------------------------------*/
exports.forward = function(p) {
/* Forward equations
-----------------*/
var lon = p.x;
var lat = p.y;
var delta_lon = adjust_lon(lon - this.long0);
var theta = lat;
var con = Math.PI * Math.sin(lat);
/* Iterate using the Newton-Raphson method to find theta
-----------------------------------------------------*/
for (var i = 0; true; i++) {
var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta));
theta += delta_theta;
if (Math.abs(delta_theta) < EPSLN) {
break;
}
}
theta /= 2;
/* If the latitude is 90 deg, force the x coordinate to be "0 + false easting"
this is done here because of precision problems with "cos(theta)"
--------------------------------------------------------------------------*/
if (Math.PI / 2 - Math.abs(lat) < EPSLN) {
delta_lon = 0;
}
var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0;
var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0;
p.x = x;
p.y = y;
return p;
};
exports.inverse = function(p) {
var theta;
var arg;
/* Inverse equations
-----------------*/
p.x -= this.x0;
p.y -= this.y0;
arg = p.y / (1.4142135623731 * this.a);
/* Because of division by zero problems, 'arg' can not be 1. Therefore
a number very close to one is used instead.
-------------------------------------------------------------------*/
if (Math.abs(arg) > 0.999999999999) {
arg = 0.999999999999;
}
theta = Math.asin(arg);
var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));
if (lon < (-Math.PI)) {
lon = -Math.PI;
}
if (lon > Math.PI) {
lon = Math.PI;
}
arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;
if (Math.abs(arg) > 1) {
arg = 1;
}
var lat = Math.asin(arg);
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Mollweide", "moll"];
},{"../common/adjust_lon":6}],57:[function(require,module,exports){
var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
/*
reference
Department of Land and Survey Technical Circular 1973/32
http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf
OSG Technical Report 4.1
http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf
*/
/**
* iterations: Number of iterations to refine inverse transform.
* 0 -> km accuracy
* 1 -> m accuracy -- suitable for most mapping applications
* 2 -> mm accuracy
*/
exports.iterations = 1;
exports.init = function() {
this.A = [];
this.A[1] = 0.6399175073;
this.A[2] = -0.1358797613;
this.A[3] = 0.063294409;
this.A[4] = -0.02526853;
this.A[5] = 0.0117879;
this.A[6] = -0.0055161;
this.A[7] = 0.0026906;
this.A[8] = -0.001333;
this.A[9] = 0.00067;
this.A[10] = -0.00034;
this.B_re = [];
this.B_im = [];
this.B_re[1] = 0.7557853228;
this.B_im[1] = 0;
this.B_re[2] = 0.249204646;
this.B_im[2] = 0.003371507;
this.B_re[3] = -0.001541739;
this.B_im[3] = 0.041058560;
this.B_re[4] = -0.10162907;
this.B_im[4] = 0.01727609;
this.B_re[5] = -0.26623489;
this.B_im[5] = -0.36249218;
this.B_re[6] = -0.6870983;
this.B_im[6] = -1.1651967;
this.C_re = [];
this.C_im = [];
this.C_re[1] = 1.3231270439;
this.C_im[1] = 0;
this.C_re[2] = -0.577245789;
this.C_im[2] = -0.007809598;
this.C_re[3] = 0.508307513;
this.C_im[3] = -0.112208952;
this.C_re[4] = -0.15094762;
this.C_im[4] = 0.18200602;
this.C_re[5] = 1.01418179;
this.C_im[5] = 1.64497696;
this.C_re[6] = 1.9660549;
this.C_im[6] = 2.5127645;
this.D = [];
this.D[1] = 1.5627014243;
this.D[2] = 0.5185406398;
this.D[3] = -0.03333098;
this.D[4] = -0.1052906;
this.D[5] = -0.0368594;
this.D[6] = 0.007317;
this.D[7] = 0.01220;
this.D[8] = 0.00394;
this.D[9] = -0.0013;
};
/**
New Zealand Map Grid Forward - long/lat to x/y
long/lat in radians
*/
exports.forward = function(p) {
var n;
var lon = p.x;
var lat = p.y;
var delta_lat = lat - this.lat0;
var delta_lon = lon - this.long0;
// 1. Calculate d_phi and d_psi ... // and d_lambda
// For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.
var d_phi = delta_lat / SEC_TO_RAD * 1E-5;
var d_lambda = delta_lon;
var d_phi_n = 1; // d_phi^0
var d_psi = 0;
for (n = 1; n <= 10; n++) {
d_phi_n = d_phi_n * d_phi;
d_psi = d_psi + this.A[n] * d_phi_n;
}
// 2. Calculate theta
var th_re = d_psi;
var th_im = d_lambda;
// 3. Calculate z
var th_n_re = 1;
var th_n_im = 0; // theta^0
var th_n_re1;
var th_n_im1;
var z_re = 0;
var z_im = 0;
for (n = 1; n <= 6; n++) {
th_n_re1 = th_n_re * th_re - th_n_im * th_im;
th_n_im1 = th_n_im * th_re + th_n_re * th_im;
th_n_re = th_n_re1;
th_n_im = th_n_im1;
z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im;
z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im;
}
// 4. Calculate easting and northing
p.x = (z_im * this.a) + this.x0;
p.y = (z_re * this.a) + this.y0;
return p;
};
/**
New Zealand Map Grid Inverse - x/y to long/lat
*/
exports.inverse = function(p) {
var n;
var x = p.x;
var y = p.y;
var delta_x = x - this.x0;
var delta_y = y - this.y0;
// 1. Calculate z
var z_re = delta_y / this.a;
var z_im = delta_x / this.a;
// 2a. Calculate theta - first approximation gives km accuracy
var z_n_re = 1;
var z_n_im = 0; // z^0
var z_n_re1;
var z_n_im1;
var th_re = 0;
var th_im = 0;
for (n = 1; n <= 6; n++) {
z_n_re1 = z_n_re * z_re - z_n_im * z_im;
z_n_im1 = z_n_im * z_re + z_n_re * z_im;
z_n_re = z_n_re1;
z_n_im = z_n_im1;
th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im;
th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im;
}
// 2b. Iterate to refine the accuracy of the calculation
// 0 iterations gives km accuracy
// 1 iteration gives m accuracy -- good enough for most mapping applications
// 2 iterations bives mm accuracy
for (var i = 0; i < this.iterations; i++) {
var th_n_re = th_re;
var th_n_im = th_im;
var th_n_re1;
var th_n_im1;
var num_re = z_re;
var num_im = z_im;
for (n = 2; n <= 6; n++) {
th_n_re1 = th_n_re * th_re - th_n_im * th_im;
th_n_im1 = th_n_im * th_re + th_n_re * th_im;
th_n_re = th_n_re1;
th_n_im = th_n_im1;
num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
}
th_n_re = 1;
th_n_im = 0;
var den_re = this.B_re[1];
var den_im = this.B_im[1];
for (n = 2; n <= 6; n++) {
th_n_re1 = th_n_re * th_re - th_n_im * th_im;
th_n_im1 = th_n_im * th_re + th_n_re * th_im;
th_n_re = th_n_re1;
th_n_im = th_n_im1;
den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
}
// Complex division
var den2 = den_re * den_re + den_im * den_im;
th_re = (num_re * den_re + num_im * den_im) / den2;
th_im = (num_im * den_re - num_re * den_im) / den2;
}
// 3. Calculate d_phi ... // and d_lambda
var d_psi = th_re;
var d_lambda = th_im;
var d_psi_n = 1; // d_psi^0
var d_phi = 0;
for (n = 1; n <= 9; n++) {
d_psi_n = d_psi_n * d_psi;
d_phi = d_phi + this.D[n] * d_psi_n;
}
// 4. Calculate latitude and longitude
// d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians.
var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5);
var lon = this.long0 + d_lambda;
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["New_Zealand_Map_Grid", "nzmg"];
},{}],58:[function(require,module,exports){
var tsfnz = require('../common/tsfnz');
var adjust_lon = require('../common/adjust_lon');
var phi2z = require('../common/phi2z');
var HALF_PI = Math.PI/2;
var FORTPI = Math.PI/4;
var EPSLN = 1.0e-10;
/* Initialize the Oblique Mercator projection
------------------------------------------*/
exports.init = function() {
this.no_off = this.no_off || false;
this.no_rot = this.no_rot || false;
if (isNaN(this.k0)) {
this.k0 = 1;
}
var sinlat = Math.sin(this.lat0);
var coslat = Math.cos(this.lat0);
var con = this.e * sinlat;
this.bl = Math.sqrt(1 + this.es / (1 - this.es) * Math.pow(coslat, 4));
this.al = this.a * this.bl * this.k0 * Math.sqrt(1 - this.es) / (1 - con * con);
var t0 = tsfnz(this.e, this.lat0, sinlat);
var dl = this.bl / coslat * Math.sqrt((1 - this.es) / (1 - con * con));
if (dl * dl < 1) {
dl = 1;
}
var fl;
var gl;
if (!isNaN(this.longc)) {
//Central point and azimuth method
if (this.lat0 >= 0) {
fl = dl + Math.sqrt(dl * dl - 1);
}
else {
fl = dl - Math.sqrt(dl * dl - 1);
}
this.el = fl * Math.pow(t0, this.bl);
gl = 0.5 * (fl - 1 / fl);
this.gamma0 = Math.asin(Math.sin(this.alpha) / dl);
this.long0 = this.longc - Math.asin(gl * Math.tan(this.gamma0)) / this.bl;
}
else {
//2 points method
var t1 = tsfnz(this.e, this.lat1, Math.sin(this.lat1));
var t2 = tsfnz(this.e, this.lat2, Math.sin(this.lat2));
if (this.lat0 >= 0) {
this.el = (dl + Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
}
else {
this.el = (dl - Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
}
var hl = Math.pow(t1, this.bl);
var ll = Math.pow(t2, this.bl);
fl = this.el / hl;
gl = 0.5 * (fl - 1 / fl);
var jl = (this.el * this.el - ll * hl) / (this.el * this.el + ll * hl);
var pl = (ll - hl) / (ll + hl);
var dlon12 = adjust_lon(this.long1 - this.long2);
this.long0 = 0.5 * (this.long1 + this.long2) - Math.atan(jl * Math.tan(0.5 * this.bl * (dlon12)) / pl) / this.bl;
this.long0 = adjust_lon(this.long0);
var dlon10 = adjust_lon(this.long1 - this.long0);
this.gamma0 = Math.atan(Math.sin(this.bl * (dlon10)) / gl);
this.alpha = Math.asin(dl * Math.sin(this.gamma0));
}
if (this.no_off) {
this.uc = 0;
}
else {
if (this.lat0 >= 0) {
this.uc = this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
}
else {
this.uc = -1 * this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
}
}
};
/* Oblique Mercator forward equations--mapping lat,long to x,y
----------------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var dlon = adjust_lon(lon - this.long0);
var us, vs;
var con;
if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
if (lat > 0) {
con = -1;
}
else {
con = 1;
}
vs = this.al / this.bl * Math.log(Math.tan(FORTPI + con * this.gamma0 * 0.5));
us = -1 * con * HALF_PI * this.al / this.bl;
}
else {
var t = tsfnz(this.e, lat, Math.sin(lat));
var ql = this.el / Math.pow(t, this.bl);
var sl = 0.5 * (ql - 1 / ql);
var tl = 0.5 * (ql + 1 / ql);
var vl = Math.sin(this.bl * (dlon));
var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;
if (Math.abs(Math.abs(ul) - 1) <= EPSLN) {
vs = Number.POSITIVE_INFINITY;
}
else {
vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;
}
if (Math.abs(Math.cos(this.bl * (dlon))) <= EPSLN) {
us = this.al * this.bl * (dlon);
}
else {
us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;
}
}
if (this.no_rot) {
p.x = this.x0 + us;
p.y = this.y0 + vs;
}
else {
us -= this.uc;
p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);
p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);
}
return p;
};
exports.inverse = function(p) {
var us, vs;
if (this.no_rot) {
vs = p.y - this.y0;
us = p.x - this.x0;
}
else {
vs = (p.x - this.x0) * Math.cos(this.alpha) - (p.y - this.y0) * Math.sin(this.alpha);
us = (p.y - this.y0) * Math.cos(this.alpha) + (p.x - this.x0) * Math.sin(this.alpha);
us += this.uc;
}
var qp = Math.exp(-1 * this.bl * vs / this.al);
var sp = 0.5 * (qp - 1 / qp);
var tp = 0.5 * (qp + 1 / qp);
var vp = Math.sin(this.bl * us / this.al);
var up = (vp * Math.cos(this.gamma0) + sp * Math.sin(this.gamma0)) / tp;
var ts = Math.pow(this.el / Math.sqrt((1 + up) / (1 - up)), 1 / this.bl);
if (Math.abs(up - 1) < EPSLN) {
p.x = this.long0;
p.y = HALF_PI;
}
else if (Math.abs(up + 1) < EPSLN) {
p.x = this.long0;
p.y = -1 * HALF_PI;
}
else {
p.y = phi2z(this.e, ts);
p.x = adjust_lon(this.long0 - Math.atan2(sp * Math.cos(this.gamma0) - vp * Math.sin(this.gamma0), Math.cos(this.bl * us / this.al)) / this.bl);
}
return p;
};
exports.names = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
},{"../common/adjust_lon":6,"../common/phi2z":17,"../common/tsfnz":25}],59:[function(require,module,exports){
var e0fn = require('../common/e0fn');
var e1fn = require('../common/e1fn');
var e2fn = require('../common/e2fn');
var e3fn = require('../common/e3fn');
var adjust_lon = require('../common/adjust_lon');
var adjust_lat = require('../common/adjust_lat');
var mlfn = require('../common/mlfn');
var EPSLN = 1.0e-10;
var gN = require('../common/gN');
var MAX_ITER = 20;
exports.init = function() {
/* Place parameters in static storage for common use
-------------------------------------------------*/
this.temp = this.b / this.a;
this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles
this.e = Math.sqrt(this.es);
this.e0 = e0fn(this.es);
this.e1 = e1fn(this.es);
this.e2 = e2fn(this.es);
this.e3 = e3fn(this.es);
this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas
};
/* Polyconic forward equations--mapping lat,long to x,y
---------------------------------------------------*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var x, y, el;
var dlon = adjust_lon(lon - this.long0);
el = dlon * Math.sin(lat);
if (this.sphere) {
if (Math.abs(lat) <= EPSLN) {
x = this.a * dlon;
y = -1 * this.a * this.lat0;
}
else {
x = this.a * Math.sin(el) / Math.tan(lat);
y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat));
}
}
else {
if (Math.abs(lat) <= EPSLN) {
x = this.a * dlon;
y = -1 * this.ml0;
}
else {
var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat);
x = nl * Math.sin(el);
y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el));
}
}
p.x = x + this.x0;
p.y = y + this.y0;
return p;
};
/* Inverse equations
-----------------*/
exports.inverse = function(p) {
var lon, lat, x, y, i;
var al, bl;
var phi, dphi;
x = p.x - this.x0;
y = p.y - this.y0;
if (this.sphere) {
if (Math.abs(y + this.a * this.lat0) <= EPSLN) {
lon = adjust_lon(x / this.a + this.long0);
lat = 0;
}
else {
al = this.lat0 + y / this.a;
bl = x * x / this.a / this.a + al * al;
phi = al;
var tanphi;
for (i = MAX_ITER; i; --i) {
tanphi = Math.tan(phi);
dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);
phi += dphi;
if (Math.abs(dphi) <= EPSLN) {
lat = phi;
break;
}
}
lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));
}
}
else {
if (Math.abs(y + this.ml0) <= EPSLN) {
lat = 0;
lon = adjust_lon(this.long0 + x / this.a);
}
else {
al = (this.ml0 + y) / this.a;
bl = x * x / this.a / this.a + al * al;
phi = al;
var cl, mln, mlnp, ma;
var con;
for (i = MAX_ITER; i; --i) {
con = this.e * Math.sin(phi);
cl = Math.sqrt(1 - con * con) * Math.tan(phi);
mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi);
ma = mln / this.a;
dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);
phi -= dphi;
if (Math.abs(dphi) <= EPSLN) {
lat = phi;
break;
}
}
//lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);
cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);
lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));
}
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Polyconic", "poly"];
},{"../common/adjust_lat":5,"../common/adjust_lon":6,"../common/e0fn":8,"../common/e1fn":9,"../common/e2fn":10,"../common/e3fn":11,"../common/gN":12,"../common/mlfn":15}],60:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var adjust_lat = require('../common/adjust_lat');
var pj_enfn = require('../common/pj_enfn');
var MAX_ITER = 20;
var pj_mlfn = require('../common/pj_mlfn');
var pj_inv_mlfn = require('../common/pj_inv_mlfn');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var asinz = require('../common/asinz');
exports.init = function() {
/* Place parameters in static storage for common use
-------------------------------------------------*/
if (!this.sphere) {
this.en = pj_enfn(this.es);
}
else {
this.n = 1;
this.m = 0;
this.es = 0;
this.C_y = Math.sqrt((this.m + 1) / this.n);
this.C_x = this.C_y / (this.m + 1);
}
};
/* Sinusoidal forward equations--mapping lat,long to x,y
-----------------------------------------------------*/
exports.forward = function(p) {
var x, y;
var lon = p.x;
var lat = p.y;
/* Forward equations
-----------------*/
lon = adjust_lon(lon - this.long0);
if (this.sphere) {
if (!this.m) {
lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat;
}
else {
var k = this.n * Math.sin(lat);
for (var i = MAX_ITER; i; --i) {
var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat));
lat -= V;
if (Math.abs(V) < EPSLN) {
break;
}
}
}
x = this.a * this.C_x * lon * (this.m + Math.cos(lat));
y = this.a * this.C_y * lat;
}
else {
var s = Math.sin(lat);
var c = Math.cos(lat);
y = this.a * pj_mlfn(lat, s, c, this.en);
x = this.a * lon * c / Math.sqrt(1 - this.es * s * s);
}
p.x = x;
p.y = y;
return p;
};
exports.inverse = function(p) {
var lat, temp, lon, s;
p.x -= this.x0;
lon = p.x / this.a;
p.y -= this.y0;
lat = p.y / this.a;
if (this.sphere) {
lat /= this.C_y;
lon = lon / (this.C_x * (this.m + Math.cos(lat)));
if (this.m) {
lat = asinz((this.m * lat + Math.sin(lat)) / this.n);
}
else if (this.n !== 1) {
lat = asinz(Math.sin(lat) / this.n);
}
lon = adjust_lon(lon + this.long0);
lat = adjust_lat(lat);
}
else {
lat = pj_inv_mlfn(p.y / this.a, this.es, this.en);
s = Math.abs(lat);
if (s < HALF_PI) {
s = Math.sin(lat);
temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));
//temp = this.long0 + p.x / (this.a * Math.cos(lat));
lon = adjust_lon(temp);
}
else if ((s - EPSLN) < HALF_PI) {
lon = this.long0;
}
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Sinusoidal", "sinu"];
},{"../common/adjust_lat":5,"../common/adjust_lon":6,"../common/asinz":7,"../common/pj_enfn":18,"../common/pj_inv_mlfn":19,"../common/pj_mlfn":20}],61:[function(require,module,exports){
/*
references:
Formules et constantes pour le Calcul pour la
projection cylindrique conforme à axe oblique et pour la transformation entre
des systèmes de référence.
http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf
*/
exports.init = function() {
var phy0 = this.lat0;
this.lambda0 = this.long0;
var sinPhy0 = Math.sin(phy0);
var semiMajorAxis = this.a;
var invF = this.rf;
var flattening = 1 / invF;
var e2 = 2 * flattening - Math.pow(flattening, 2);
var e = this.e = Math.sqrt(e2);
this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2));
this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4));
this.b0 = Math.asin(sinPhy0 / this.alpha);
var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2));
var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2));
var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0));
this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3;
};
exports.forward = function(p) {
var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2));
var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y)));
var S = -this.alpha * (Sa1 + Sa2) + this.K;
// spheric latitude
var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4);
// spheric longitude
var I = this.alpha * (p.x - this.lambda0);
// psoeudo equatorial rotation
var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I)));
var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I));
p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0;
p.x = this.R * rotI + this.x0;
return p;
};
exports.inverse = function(p) {
var Y = p.x - this.x0;
var X = p.y - this.y0;
var rotI = Y / this.R;
var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4);
var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI));
var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB)));
var lambda = this.lambda0 + I / this.alpha;
var S = 0;
var phy = b;
var prevPhy = -1000;
var iteration = 0;
while (Math.abs(phy - prevPhy) > 0.0000001) {
if (++iteration > 20) {
//...reportError("omercFwdInfinity");
return;
}
//S = Math.log(Math.tan(Math.PI / 4 + phy / 2));
S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2));
prevPhy = phy;
phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;
}
p.x = lambda;
p.y = phy;
return p;
};
exports.names = ["somerc"];
},{}],62:[function(require,module,exports){
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var sign = require('../common/sign');
var msfnz = require('../common/msfnz');
var tsfnz = require('../common/tsfnz');
var phi2z = require('../common/phi2z');
var adjust_lon = require('../common/adjust_lon');
exports.ssfn_ = function(phit, sinphi, eccen) {
sinphi *= eccen;
return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen));
};
exports.init = function() {
this.coslat0 = Math.cos(this.lat0);
this.sinlat0 = Math.sin(this.lat0);
if (this.sphere) {
if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts));
}
}
else {
if (Math.abs(this.coslat0) <= EPSLN) {
if (this.lat0 > 0) {
//North pole
//trace('stere:north pole');
this.con = 1;
}
else {
//South pole
//trace('stere:south pole');
this.con = -1;
}
}
this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));
if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));
}
this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0);
this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI;
this.cosX0 = Math.cos(this.X0);
this.sinX0 = Math.sin(this.X0);
}
};
// Stereographic forward equations--mapping lat,long to x,y
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var sinlat = Math.sin(lat);
var coslat = Math.cos(lat);
var A, X, sinX, cosX, ts, rh;
var dlon = adjust_lon(lon - this.long0);
if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) {
//case of the origine point
//trace('stere:this is the origin point');
p.x = NaN;
p.y = NaN;
return p;
}
if (this.sphere) {
//trace('stere:sphere case');
A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon));
p.x = this.a * A * coslat * Math.sin(dlon) + this.x0;
p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0;
return p;
}
else {
X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI;
cosX = Math.cos(X);
sinX = Math.sin(X);
if (Math.abs(this.coslat0) <= EPSLN) {
ts = tsfnz(this.e, lat * this.con, this.con * sinlat);
rh = 2 * this.a * this.k0 * ts / this.cons;
p.x = this.x0 + rh * Math.sin(lon - this.long0);
p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0);
//trace(p.toString());
return p;
}
else if (Math.abs(this.sinlat0) < EPSLN) {
//Eq
//trace('stere:equateur');
A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon));
p.y = A * sinX;
}
else {
//other case
//trace('stere:normal case');
A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon)));
p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0;
}
p.x = A * cosX * Math.sin(dlon) + this.x0;
}
//trace(p.toString());
return p;
};
//* Stereographic inverse equations--mapping x,y to lat/long
exports.inverse = function(p) {
p.x -= this.x0;
p.y -= this.y0;
var lon, lat, ts, ce, Chi;
var rh = Math.sqrt(p.x * p.x + p.y * p.y);
if (this.sphere) {
var c = 2 * Math.atan(rh / (0.5 * this.a * this.k0));
lon = this.long0;
lat = this.lat0;
if (rh <= EPSLN) {
p.x = lon;
p.y = lat;
return p;
}
lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);
if (Math.abs(this.coslat0) < EPSLN) {
if (this.lat0 > 0) {
lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
}
else {
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
}
}
else {
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));
}
p.x = lon;
p.y = lat;
return p;
}
else {
if (Math.abs(this.coslat0) <= EPSLN) {
if (rh <= EPSLN) {
lat = this.lat0;
lon = this.long0;
p.x = lon;
p.y = lat;
//trace(p.toString());
return p;
}
p.x *= this.con;
p.y *= this.con;
ts = rh * this.cons / (2 * this.a * this.k0);
lat = this.con * phi2z(this.e, ts);
lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));
}
else {
ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));
lon = this.long0;
if (rh <= EPSLN) {
Chi = this.X0;
}
else {
Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));
}
lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));
}
}
p.x = lon;
p.y = lat;
//trace(p.toString());
return p;
};
exports.names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
},{"../common/adjust_lon":6,"../common/msfnz":16,"../common/phi2z":17,"../common/sign":22,"../common/tsfnz":25}],63:[function(require,module,exports){
var gauss = require('./gauss');
var adjust_lon = require('../common/adjust_lon');
exports.init = function() {
gauss.init.apply(this);
if (!this.rc) {
return;
}
this.sinc0 = Math.sin(this.phic0);
this.cosc0 = Math.cos(this.phic0);
this.R2 = 2 * this.rc;
if (!this.title) {
this.title = "Oblique Stereographic Alternative";
}
};
exports.forward = function(p) {
var sinc, cosc, cosl, k;
p.x = adjust_lon(p.x - this.long0);
gauss.forward.apply(this, [p]);
sinc = Math.sin(p.y);
cosc = Math.cos(p.y);
cosl = Math.cos(p.x);
k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl);
p.x = k * cosc * Math.sin(p.x);
p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl);
p.x = this.a * p.x + this.x0;
p.y = this.a * p.y + this.y0;
return p;
};
exports.inverse = function(p) {
var sinc, cosc, lon, lat, rho;
p.x = (p.x - this.x0) / this.a;
p.y = (p.y - this.y0) / this.a;
p.x /= this.k0;
p.y /= this.k0;
if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) {
var c = 2 * Math.atan2(rho, this.R2);
sinc = Math.sin(c);
cosc = Math.cos(c);
lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho);
lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc);
}
else {
lat = this.phic0;
lon = 0;
}
p.x = lon;
p.y = lat;
gauss.inverse.apply(this, [p]);
p.x = adjust_lon(p.x + this.long0);
return p;
};
exports.names = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea","Oblique Stereographic Alternative"];
},{"../common/adjust_lon":6,"./gauss":48}],64:[function(require,module,exports){
var e0fn = require('../common/e0fn');
var e1fn = require('../common/e1fn');
var e2fn = require('../common/e2fn');
var e3fn = require('../common/e3fn');
var mlfn = require('../common/mlfn');
var adjust_lon = require('../common/adjust_lon');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var sign = require('../common/sign');
var asinz = require('../common/asinz');
exports.init = function() {
this.e0 = e0fn(this.es);
this.e1 = e1fn(this.es);
this.e2 = e2fn(this.es);
this.e3 = e3fn(this.es);
this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
};
/**
Transverse Mercator Forward - long/lat to x/y
long/lat in radians
*/
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
var delta_lon = adjust_lon(lon - this.long0);
var con;
var x, y;
var sin_phi = Math.sin(lat);
var cos_phi = Math.cos(lat);
if (this.sphere) {
var b = cos_phi * Math.sin(delta_lon);
if ((Math.abs(Math.abs(b) - 1)) < 0.0000000001) {
return (93);
}
else {
x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b));
con = Math.acos(cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - b * b));
if (lat < 0) {
con = -con;
}
y = this.a * this.k0 * (con - this.lat0);
}
}
else {
var al = cos_phi * delta_lon;
var als = Math.pow(al, 2);
var c = this.ep2 * Math.pow(cos_phi, 2);
var tq = Math.tan(lat);
var t = Math.pow(tq, 2);
con = 1 - this.es * Math.pow(sin_phi, 2);
var n = this.a / Math.sqrt(con);
var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat);
x = this.k0 * n * al * (1 + als / 6 * (1 - t + c + als / 20 * (5 - 18 * t + Math.pow(t, 2) + 72 * c - 58 * this.ep2))) + this.x0;
y = this.k0 * (ml - this.ml0 + n * tq * (als * (0.5 + als / 24 * (5 - t + 9 * c + 4 * Math.pow(c, 2) + als / 30 * (61 - 58 * t + Math.pow(t, 2) + 600 * c - 330 * this.ep2))))) + this.y0;
}
p.x = x;
p.y = y;
return p;
};
/**
Transverse Mercator Inverse - x/y to long/lat
*/
exports.inverse = function(p) {
var con, phi;
var delta_phi;
var i;
var max_iter = 6;
var lat, lon;
if (this.sphere) {
var f = Math.exp(p.x / (this.a * this.k0));
var g = 0.5 * (f - 1 / f);
var temp = this.lat0 + p.y / (this.a * this.k0);
var h = Math.cos(temp);
con = Math.sqrt((1 - h * h) / (1 + g * g));
lat = asinz(con);
if (temp < 0) {
lat = -lat;
}
if ((g === 0) && (h === 0)) {
lon = this.long0;
}
else {
lon = adjust_lon(Math.atan2(g, h) + this.long0);
}
}
else { // ellipsoidal form
var x = p.x - this.x0;
var y = p.y - this.y0;
con = (this.ml0 + y / this.k0) / this.a;
phi = con;
for (i = 0; true; i++) {
delta_phi = ((con + this.e1 * Math.sin(2 * phi) - this.e2 * Math.sin(4 * phi) + this.e3 * Math.sin(6 * phi)) / this.e0) - phi;
phi += delta_phi;
if (Math.abs(delta_phi) <= EPSLN) {
break;
}
if (i >= max_iter) {
return (95);
}
} // for()
if (Math.abs(phi) < HALF_PI) {
var sin_phi = Math.sin(phi);
var cos_phi = Math.cos(phi);
var tan_phi = Math.tan(phi);
var c = this.ep2 * Math.pow(cos_phi, 2);
var cs = Math.pow(c, 2);
var t = Math.pow(tan_phi, 2);
var ts = Math.pow(t, 2);
con = 1 - this.es * Math.pow(sin_phi, 2);
var n = this.a / Math.sqrt(con);
var r = n * (1 - this.es) / con;
var d = x / (n * this.k0);
var ds = Math.pow(d, 2);
lat = phi - (n * tan_phi * ds / r) * (0.5 - ds / 24 * (5 + 3 * t + 10 * c - 4 * cs - 9 * this.ep2 - ds / 30 * (61 + 90 * t + 298 * c + 45 * ts - 252 * this.ep2 - 3 * cs)));
lon = adjust_lon(this.long0 + (d * (1 - ds / 6 * (1 + 2 * t + c - ds / 20 * (5 - 2 * c + 28 * t - 3 * cs + 8 * this.ep2 + 24 * ts))) / cos_phi));
}
else {
lat = HALF_PI * sign(y);
lon = this.long0;
}
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
},{"../common/adjust_lon":6,"../common/asinz":7,"../common/e0fn":8,"../common/e1fn":9,"../common/e2fn":10,"../common/e3fn":11,"../common/mlfn":15,"../common/sign":22}],65:[function(require,module,exports){
var D2R = 0.01745329251994329577;
var tmerc = require('./tmerc');
exports.dependsOn = 'tmerc';
exports.init = function() {
if (!this.zone) {
return;
}
this.lat0 = 0;
this.long0 = ((6 * Math.abs(this.zone)) - 183) * D2R;
this.x0 = 500000;
this.y0 = this.utmSouth ? 10000000 : 0;
this.k0 = 0.9996;
tmerc.init.apply(this);
this.forward = tmerc.forward;
this.inverse = tmerc.inverse;
};
exports.names = ["Universal Transverse Mercator System", "utm"];
},{"./tmerc":64}],66:[function(require,module,exports){
var adjust_lon = require('../common/adjust_lon');
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var asinz = require('../common/asinz');
/* Initialize the Van Der Grinten projection
----------------------------------------*/
exports.init = function() {
//this.R = 6370997; //Radius of earth
this.R = this.a;
};
exports.forward = function(p) {
var lon = p.x;
var lat = p.y;
/* Forward equations
-----------------*/
var dlon = adjust_lon(lon - this.long0);
var x, y;
if (Math.abs(lat) <= EPSLN) {
x = this.x0 + this.R * dlon;
y = this.y0;
}
var theta = asinz(2 * Math.abs(lat / Math.PI));
if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) {
x = this.x0;
if (lat >= 0) {
y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta);
}
else {
y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);
}
// return(OK);
}
var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI));
var asq = al * al;
var sinth = Math.sin(theta);
var costh = Math.cos(theta);
var g = costh / (sinth + costh - 1);
var gsq = g * g;
var m = g * (2 / sinth - 1);
var msq = m * m;
var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq);
if (dlon < 0) {
con = -con;
}
x = this.x0 + con;
//con = Math.abs(con / (Math.PI * this.R));
var q = asq + g;
con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq);
if (lat >= 0) {
//y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
y = this.y0 + con;
}
else {
//y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
y = this.y0 - con;
}
p.x = x;
p.y = y;
return p;
};
/* Van Der Grinten inverse equations--mapping x,y to lat/long
---------------------------------------------------------*/
exports.inverse = function(p) {
var lon, lat;
var xx, yy, xys, c1, c2, c3;
var a1;
var m1;
var con;
var th1;
var d;
/* inverse equations
-----------------*/
p.x -= this.x0;
p.y -= this.y0;
con = Math.PI * this.R;
xx = p.x / con;
yy = p.y / con;
xys = xx * xx + yy * yy;
c1 = -Math.abs(yy) * (1 + xys);
c2 = c1 - 2 * yy * yy + xx * xx;
c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys;
d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27;
a1 = (c1 - c2 * c2 / 3 / c3) / c3;
m1 = 2 * Math.sqrt(-a1 / 3);
con = ((3 * d) / a1) / m1;
if (Math.abs(con) > 1) {
if (con >= 0) {
con = 1;
}
else {
con = -1;
}
}
th1 = Math.acos(con) / 3;
if (p.y >= 0) {
lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
}
else {
lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
}
if (Math.abs(xx) < EPSLN) {
lon = this.long0;
}
else {
lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);
}
p.x = lon;
p.y = lat;
return p;
};
exports.names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
},{"../common/adjust_lon":6,"../common/asinz":7}],67:[function(require,module,exports){
var D2R = 0.01745329251994329577;
var R2D = 57.29577951308232088;
var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var datum_transform = require('./datum_transform');
var adjust_axis = require('./adjust_axis');
var proj = require('./Proj');
var toPoint = require('./common/toPoint');
module.exports = function transform(source, dest, point) {
var wgs84;
if (Array.isArray(point)) {
point = toPoint(point);
}
function checkNotWGS(source, dest) {
return ((source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== "WGS84");
}
// Workaround for datum shifts towgs84, if either source or destination projection is not wgs84
if (source.datum && dest.datum && (checkNotWGS(source, dest) || checkNotWGS(dest, source))) {
wgs84 = new proj('WGS84');
transform(source, wgs84, point);
source = wgs84;
}
// DGR, 2010/11/12
if (source.axis !== "enu") {
adjust_axis(source, false, point);
}
// Transform source points to long/lat, if they aren't already.
if (source.projName === "longlat") {
point.x *= D2R; // convert degrees to radians
point.y *= D2R;
}
else {
if (source.to_meter) {
point.x *= source.to_meter;
point.y *= source.to_meter;
}
source.inverse(point); // Convert Cartesian to longlat
}
// Adjust for the prime meridian if necessary
if (source.from_greenwich) {
point.x += source.from_greenwich;
}
// Convert datums if needed, and if possible.
point = datum_transform(source.datum, dest.datum, point);
// Adjust for the prime meridian if necessary
if (dest.from_greenwich) {
point.x -= dest.from_greenwich;
}
if (dest.projName === "longlat") {
// convert radians to decimal degrees
point.x *= R2D;
point.y *= R2D;
}
else { // else project
dest.forward(point);
if (dest.to_meter) {
point.x /= dest.to_meter;
point.y /= dest.to_meter;
}
}
// DGR, 2010/11/12
if (dest.axis !== "enu") {
adjust_axis(dest, true, point);
}
return point;
};
},{"./Proj":3,"./adjust_axis":4,"./common/toPoint":24,"./datum_transform":32}],68:[function(require,module,exports){
var D2R = 0.01745329251994329577;
var extend = require('./extend');
function mapit(obj, key, v) {
obj[key] = v.map(function(aa) {
var o = {};
sExpr(aa, o);
return o;
}).reduce(function(a, b) {
return extend(a, b);
}, {});
}
function sExpr(v, obj) {
var key;
if (!Array.isArray(v)) {
obj[v] = true;
return;
}
else {
key = v.shift();
if (key === 'PARAMETER') {
key = v.shift();
}
if (v.length === 1) {
if (Array.isArray(v[0])) {
obj[key] = {};
sExpr(v[0], obj[key]);
}
else {
obj[key] = v[0];
}
}
else if (!v.length) {
obj[key] = true;
}
else if (key === 'TOWGS84') {
obj[key] = v;
}
else {
obj[key] = {};
if (['UNIT', 'PRIMEM', 'VERT_DATUM'].indexOf(key) > -1) {
obj[key] = {
name: v[0].toLowerCase(),
convert: v[1]
};
if (v.length === 3) {
obj[key].auth = v[2];
}
}
else if (key === 'SPHEROID') {
obj[key] = {
name: v[0],
a: v[1],
rf: v[2]
};
if (v.length === 4) {
obj[key].auth = v[3];
}
}
else if (['GEOGCS', 'GEOCCS', 'DATUM', 'VERT_CS', 'COMPD_CS', 'LOCAL_CS', 'FITTED_CS', 'LOCAL_DATUM'].indexOf(key) > -1) {
v[0] = ['name', v[0]];
mapit(obj, key, v);
}
else if (v.every(function(aa) {
return Array.isArray(aa);
})) {
mapit(obj, key, v);
}
else {
sExpr(v, obj[key]);
}
}
}
}
function rename(obj, params) {
var outName = params[0];
var inName = params[1];
if (!(outName in obj) && (inName in obj)) {
obj[outName] = obj[inName];
if (params.length === 3) {
obj[outName] = params[2](obj[outName]);
}
}
}
function d2r(input) {
return input * D2R;
}
function cleanWKT(wkt) {
if (wkt.type === 'GEOGCS') {
wkt.projName = 'longlat';
}
else if (wkt.type === 'LOCAL_CS') {
wkt.projName = 'identity';
wkt.local = true;
}
else {
if (typeof wkt.PROJECTION === "object") {
wkt.projName = Object.keys(wkt.PROJECTION)[0];
}
else {
wkt.projName = wkt.PROJECTION;
}
}
if (wkt.UNIT) {
wkt.units = wkt.UNIT.name.toLowerCase();
if (wkt.units === 'metre') {
wkt.units = 'meter';
}
if (wkt.UNIT.convert) {
if (wkt.type === 'GEOGCS') {
if (wkt.DATUM && wkt.DATUM.SPHEROID) {
wkt.to_meter = parseFloat(wkt.UNIT.convert, 10)*wkt.DATUM.SPHEROID.a;
}
} else {
wkt.to_meter = parseFloat(wkt.UNIT.convert, 10);
}
}
}
if (wkt.GEOGCS) {
//if(wkt.GEOGCS.PRIMEM&&wkt.GEOGCS.PRIMEM.convert){
// wkt.from_greenwich=wkt.GEOGCS.PRIMEM.convert*D2R;
//}
if (wkt.GEOGCS.DATUM) {
wkt.datumCode = wkt.GEOGCS.DATUM.name.toLowerCase();
}
else {
wkt.datumCode = wkt.GEOGCS.name.toLowerCase();
}
if (wkt.datumCode.slice(0, 2) === 'd_') {
wkt.datumCode = wkt.datumCode.slice(2);
}
if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') {
wkt.datumCode = 'nzgd49';
}
if (wkt.datumCode === "wgs_1984") {
if (wkt.PROJECTION === 'Mercator_Auxiliary_Sphere') {
wkt.sphere = true;
}
wkt.datumCode = 'wgs84';
}
if (wkt.datumCode.slice(-6) === '_ferro') {
wkt.datumCode = wkt.datumCode.slice(0, - 6);
}
if (wkt.datumCode.slice(-8) === '_jakarta') {
wkt.datumCode = wkt.datumCode.slice(0, - 8);
}
if (~wkt.datumCode.indexOf('belge')) {
wkt.datumCode = "rnb72";
}
if (wkt.GEOGCS.DATUM && wkt.GEOGCS.DATUM.SPHEROID) {
wkt.ellps = wkt.GEOGCS.DATUM.SPHEROID.name.replace('_19', '').replace(/[Cc]larke\_18/, 'clrk');
if (wkt.ellps.toLowerCase().slice(0, 13) === "international") {
wkt.ellps = 'intl';
}
wkt.a = wkt.GEOGCS.DATUM.SPHEROID.a;
wkt.rf = parseFloat(wkt.GEOGCS.DATUM.SPHEROID.rf, 10);
}
if (~wkt.datumCode.indexOf('osgb_1936')) {
wkt.datumCode = "osgb36";
}
}
if (wkt.b && !isFinite(wkt.b)) {
wkt.b = wkt.a;
}
function toMeter(input) {
var ratio = wkt.to_meter || 1;
return parseFloat(input, 10) * ratio;
}
var renamer = function(a) {
return rename(wkt, a);
};
var list = [
['standard_parallel_1', 'Standard_Parallel_1'],
['standard_parallel_2', 'Standard_Parallel_2'],
['false_easting', 'False_Easting'],
['false_northing', 'False_Northing'],
['central_meridian', 'Central_Meridian'],
['latitude_of_origin', 'Latitude_Of_Origin'],
['latitude_of_origin', 'Central_Parallel'],
['scale_factor', 'Scale_Factor'],
['k0', 'scale_factor'],
['latitude_of_center', 'Latitude_of_center'],
['lat0', 'latitude_of_center', d2r],
['longitude_of_center', 'Longitude_Of_Center'],
['longc', 'longitude_of_center', d2r],
['x0', 'false_easting', toMeter],
['y0', 'false_northing', toMeter],
['long0', 'central_meridian', d2r],
['lat0', 'latitude_of_origin', d2r],
['lat0', 'standard_parallel_1', d2r],
['lat1', 'standard_parallel_1', d2r],
['lat2', 'standard_parallel_2', d2r],
['alpha', 'azimuth', d2r],
['srsCode', 'name']
];
list.forEach(renamer);
if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === "Lambert_Azimuthal_Equal_Area")) {
wkt.long0 = wkt.longc;
}
if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {
wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
wkt.lat_ts = wkt.lat1;
}
}
module.exports = function(wkt, self) {
var lisp = JSON.parse(("," + wkt).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g, ',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g, ',"$1"]').replace(/,\["VERTCS".+/,''));
var type = lisp.shift();
var name = lisp.shift();
lisp.unshift(['name', name]);
lisp.unshift(['type', type]);
lisp.unshift('output');
var obj = {};
sExpr(lisp, obj);
cleanWKT(obj.output);
return extend(self, obj.output);
};
},{"./extend":35}],69:[function(require,module,exports){
module.exports={
"_args": [
[
{
"raw": "proj4@^2.3.12",
"scope": null,
"escapedName": "proj4",
"name": "proj4",
"rawSpec": "^2.3.12",
"spec": ">=2.3.12 <3.0.0",
"type": "range"
},
"/var/www/html/gist/length/barbs/node_modules/reproject"
]
],
"_from": "proj4@>=2.3.12 <3.0.0",
"_id": "proj4@2.3.15",
"_inCache": true,
"_location": "/proj4",
"_nodeVersion": "6.1.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/proj4-2.3.15.tgz_1471808262546_0.6752060337457806"
},
"_npmUser": {
"name": "ahocevar",
"email": "andreas.hocevar@gmail.com"
},
"_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"raw": "proj4@^2.3.12",
"scope": null,
"escapedName": "proj4",
"name": "proj4",
"rawSpec": "^2.3.12",
"spec": ">=2.3.12 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/reproject"
],
"_resolved": "https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz",
"_shasum": "5ad06e8bca30be0ffa389a49e4565f51f06d089e",
"_shrinkwrap": null,
"_spec": "proj4@^2.3.12",
"_where": "/var/www/html/gist/length/barbs/node_modules/reproject",
"author": "",
"bugs": {
"url": "https://github.com/proj4js/proj4js/issues"
},
"contributors": [
{
"name": "Mike Adair",
"email": "madair@dmsolutions.ca"
},
{
"name": "Richard Greenwood",
"email": "rich@greenwoodmap.com"
},
{
"name": "Calvin Metcalf",
"email": "calvin.metcalf@gmail.com"
},
{
"name": "Richard Marsden",
"url": "http://www.winwaed.com"
},
{
"name": "T. Mittan"
},
{
"name": "D. Steinwand"
},
{
"name": "S. Nelson"
}
],
"dependencies": {
"mgrs": "~0.0.2"
},
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
"devDependencies": {
"browserify": "~12.0.1",
"chai": "~1.8.1",
"curl": "git://github.com/cujojs/curl.git",
"grunt": "~0.4.2",
"grunt-browserify": "~4.0.1",
"grunt-cli": "~0.1.13",
"grunt-contrib-connect": "~0.6.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-uglify": "~0.11.1",
"grunt-mocha-phantomjs": "~0.4.0",
"istanbul": "~0.2.4",
"mocha": "~1.17.1",
"tin": "~0.4.0"
},
"directories": {
"test": "test",
"doc": "docs"
},
"dist": {
"shasum": "5ad06e8bca30be0ffa389a49e4565f51f06d089e",
"tarball": "https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz"
},
"gitHead": "9fa5249c1f4183d5ddee3c4793dfd7b9f29f1886",
"homepage": "https://github.com/proj4js/proj4js#readme",
"jam": {
"main": "dist/proj4.js",
"include": [
"dist/proj4.js",
"README.md",
"AUTHORS",
"LICENSE.md"
]
},
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
"name": "cwmma",
"email": "calvin.metcalf@gmail.com"
},
{
"name": "ahocevar",
"email": "andreas.hocevar@gmail.com"
}
],
"name": "proj4",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/proj4js/proj4js.git"
},
"scripts": {
"test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"
},
"version": "2.3.15"
}
},{}],70:[function(require,module,exports){
'use strict';
var proj4 = require('proj4');
// Checks if `list` looks like a `[x, y]`.
function isXY(list) {
return list.length >= 2 &&
typeof list[0] === 'number' &&
typeof list[1] === 'number';
}
function traverseCoords(coordinates, callback) {
if (isXY(coordinates)) return callback(coordinates);
return coordinates.map(function(coord){return traverseCoords(coord, callback);});
}
// Simplistic shallow clone that will work for a normal GeoJSON object.
function clone(obj) {
if (null == obj || 'object' !== typeof obj) return obj;
var copy = obj.constructor();
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
}
return copy;
}
function traverseGeoJson(geojson, leafCallback, nodeCallback) {
if (geojson == null) return geojson;
var r = clone(geojson);
if (geojson.type === 'Feature') {
r.geometry = traverseGeoJson(geojson.geometry, leafCallback, nodeCallback);
} else if (geojson.type === 'FeatureCollection') {
r.features = r.features.map(function(gj) { return traverseGeoJson(gj, leafCallback, nodeCallback); });
} else if (geojson.type === 'GeometryCollection') {
r.geometries = r.geometries.map(function(gj) { return traverseGeoJson(gj, leafCallback, nodeCallback); });
} else {
if (leafCallback) leafCallback(r);
}
if (nodeCallback) nodeCallback(r);
return r;
}
function detectCrs(geojson, projs) {
var crsInfo = geojson.crs,
crs;
if (crsInfo === undefined) {
throw new Error('Unable to detect CRS, GeoJSON has no "crs" property.');
}
if (crsInfo.type === 'name') {
crs = projs[crsInfo.properties.name];
} else if (crsInfo.type === 'EPSG') {
crs = projs['EPSG:' + crsInfo.properties.code];
}
if (!crs) {
throw new Error('CRS defined in crs section could not be identified: ' + JSON.stringify(crsInfo));
}
return crs;
}
function determineCrs(crs, projs) {
if (typeof crs === 'string' || crs instanceof String) {
return projs[crs] || proj4.Proj(crs);
}
return crs;
}
function reproject(geojson, from, to, projs) {
projs = projs || {};
if (!from) {
from = detectCrs(geojson, projs);
} else {
from = determineCrs(from, projs);
}
to = determineCrs(to, projs);
var transform = proj4(from, to);
return traverseGeoJson(geojson, function(gj) {
// No easy way to put correct CRS info into the GeoJSON,
// and definitely wrong to keep the old, so delete it.
if (gj.crs) {
delete gj.crs;
}
gj.coordinates = traverseCoords(gj.coordinates, function(xy) {
return transform.forward(xy);
});
}, function(gj) {
if (gj.bbox) {
// A bbox can't easily be reprojected, just reprojecting
// the min/max coords definitely will not work since
// the transform is not linear (in the general case).
// Workaround is to just re-compute the bbox after the
// transform.
gj.bbox = (function() {
var min = [Number.MAX_VALUE, Number.MAX_VALUE],
max = [-Number.MAX_VALUE, -Number.MAX_VALUE];
traverseGeoJson(gj, function(_gj) {
traverseCoords(_gj.coordinates, function(xy) {
min[0] = Math.min(min[0], xy[0]);
min[1] = Math.min(min[1], xy[1]);
max[0] = Math.max(max[0], xy[0]);
max[1] = Math.max(max[1], xy[1]);
});
});
return [min[0], min[1], max[0], max[1]];
})();
}
});
}
module.exports = {
detectCrs: detectCrs,
reproject: reproject,
reverse: function(geojson) {
return traverseGeoJson(geojson, function(gj) {
gj.coordinates = traverseCoords(gj.coordinates, function(xy) {
return [ xy[1], xy[0] ];
});
});
},
toWgs84: function(geojson, from, projs) {
return reproject(geojson, from, proj4.WGS84, projs);
}
};
},{"proj4":38}]},{},[70])(70)
});
Display the source blob
Display the rendered blob
Raw
{"type":"Topology","objects":{"countries":{"type":"GeometryCollection","bbox":[-179.99999999999997,-90.00000000000003,180.00000000000014,83.64513000000001],"geometries":[{"type":"Polygon","id":4,"arcs":[[0,1,2,3,4,5]]},{"type":"MultiPolygon","id":24,"arcs":[[[6,7,8,9]],[[10,11,12]]]},{"type":"Polygon","id":8,"arcs":[[13,14,15,16,17]]},{"type":"Polygon","id":784,"arcs":[[18,19,20,21,22]]},{"type":"MultiPolygon","id":32,"arcs":[[[23,24]],[[25,26,27,28,29,30]]]},{"type":"Polygon","id":51,"arcs":[[31,32,33,34,35]]},{"type":"MultiPolygon","id":10,"arcs":[[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]]]},{"type":"Polygon","id":260,"arcs":[[44]]},{"type":"MultiPolygon","id":36,"arcs":[[[45]],[[46]]]},{"type":"Polygon","id":40,"arcs":[[47,48,49,50,51,52,53]]},{"type":"MultiPolygon","id":31,"arcs":[[[54,-35]],[[55,56,-33,57,58]]]},{"type":"Polygon","id":108,"arcs":[[59,60,61]]},{"type":"Polygon","id":56,"arcs":[[62,63,64,65,66]]},{"type":"Polygon","id":204,"arcs":[[67,68,69,70,71]]},{"type":"Polygon","id":854,"arcs":[[72,73,74,-70,75,76]]},{"type":"Polygon","id":50,"arcs":[[77,78,79]]},{"type":"Polygon","id":100,"arcs":[[80,81,82,83,84,85]]},{"type":"MultiPolygon","id":44,"arcs":[[[86]],[[87]],[[88]]]},{"type":"Polygon","id":70,"arcs":[[89,90,91]]},{"type":"Polygon","id":112,"arcs":[[92,93,94,95,96]]},{"type":"Polygon","id":84,"arcs":[[97,98,99]]},{"type":"Polygon","id":68,"arcs":[[100,101,102,103,-31]]},{"type":"Polygon","id":76,"arcs":[[-27,104,-103,105,106,107,108,109,110,111,112]]},{"type":"Polygon","id":96,"arcs":[[113,114]]},{"type":"Polygon","id":64,"arcs":[[115,116]]},{"type":"Polygon","id":72,"arcs":[[117,118,119,120]]},{"type":"Polygon","id":140,"arcs":[[121,122,123,124,125,126,127]]},{"type":"MultiPolygon","id":124,"arcs":[[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138,139,140,141]],[[142]],[[143]],[[144]],[[145]],[[146]],[[147]],[[148]],[[149]],[[150]],[[151]],[[152]],[[153]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]]]},{"type":"Polygon","id":756,"arcs":[[-51,161,162,163]]},{"type":"MultiPolygon","id":152,"arcs":[[[-24,164]],[[-30,165,166,-101]]]},{"type":"MultiPolygon","id":156,"arcs":[[[167]],[[168,169,170,171,172,173,-117,174,175,176,177,-4,178,179,180,181,182,183]]]},{"type":"Polygon","id":384,"arcs":[[184,185,186,187,-73,188]]},{"type":"Polygon","id":120,"arcs":[[189,190,191,192,193,194,-128,195]]},{"type":"Polygon","id":180,"arcs":[[196,197,-60,198,199,-10,200,-13,201,-126,202]]},{"type":"Polygon","id":178,"arcs":[[-12,203,204,-196,-127,-202]]},{"type":"Polygon","id":170,"arcs":[[205,206,207,208,209,-107,210]]},{"type":"Polygon","id":188,"arcs":[[211,212,213,214]]},{"type":"Polygon","id":192,"arcs":[[215]]},{"type":"Polygon","id":-99,"arcs":[[216,217]]},{"type":"Polygon","id":196,"arcs":[[218,-218]]},{"type":"Polygon","id":203,"arcs":[[-53,219,220,221]]},{"type":"Polygon","id":276,"arcs":[[222,223,-220,-52,-164,224,225,-64,226,227,228]]},{"type":"Polygon","id":262,"arcs":[[229,230,231,232]]},{"type":"MultiPolygon","id":208,"arcs":[[[233]],[[-229,234]]]},{"type":"Polygon","id":214,"arcs":[[235,236]]},{"type":"Polygon","id":12,"arcs":[[237,238,239,240,241,242,243,244]]},{"type":"Polygon","id":218,"arcs":[[245,-206,246]]},{"type":"Polygon","id":818,"arcs":[[247,248,249,250,251]]},{"type":"Polygon","id":232,"arcs":[[252,253,254,-233]]},{"type":"Polygon","id":724,"arcs":[[255,256,257,258]]},{"type":"Polygon","id":233,"arcs":[[259,260,261]]},{"type":"Polygon","id":231,"arcs":[[-232,262,263,264,265,266,267,-253]]},{"type":"Polygon","id":246,"arcs":[[268,269,270,271]]},{"type":"MultiPolygon","id":242,"arcs":[[[272]],[[273]]]},{"type":"Polygon","id":238,"arcs":[[274]]},{"type":"MultiPolygon","id":250,"arcs":[[[275,276,277,-111]],[[278]],[[279,-225,-163,280,281,-257,282,-66]]]},{"type":"Polygon","id":266,"arcs":[[283,284,-190,-205]]},{"type":"MultiPolygon","id":826,"arcs":[[[285,286]],[[287]]]},{"type":"Polygon","id":268,"arcs":[[288,289,-58,-32,290]]},{"type":"Polygon","id":288,"arcs":[[291,-189,-77,292]]},{"type":"Polygon","id":324,"arcs":[[293,294,295,296,297,298,-187]]},{"type":"Polygon","id":270,"arcs":[[299,300]]},{"type":"Polygon","id":624,"arcs":[[301,302,-297]]},{"type":"Polygon","id":226,"arcs":[[303,-191,-285]]},{"type":"MultiPolygon","id":300,"arcs":[[[304]],[[305,-15,306,-84,307]]]},{"type":"Polygon","id":304,"arcs":[[308]]},{"type":"Polygon","id":320,"arcs":[[309,310,-100,311,312,313]]},{"type":"Polygon","id":328,"arcs":[[314,315,-109,316]]},{"type":"Polygon","id":340,"arcs":[[317,318,-313,319,320]]},{"type":"Polygon","id":191,"arcs":[[321,-92,322,323,324,325]]},{"type":"Polygon","id":332,"arcs":[[-237,326]]},{"type":"Polygon","id":348,"arcs":[[-48,327,328,329,330,-326,331]]},{"type":"MultiPolygon","id":360,"arcs":[[[332]],[[333,334]],[[335]],[[336]],[[337]],[[338]],[[339]],[[340]],[[341,342]],[[343]],[[344]],[[345,346]],[[347]]]},{"type":"Polygon","id":356,"arcs":[[-177,348,-175,-116,-174,349,-80,350,351]]},{"type":"Polygon","id":372,"arcs":[[352,-286]]},{"type":"Polygon","id":364,"arcs":[[353,-6,354,355,356,357,-55,-34,-57,358]]},{"type":"Polygon","id":368,"arcs":[[359,360,361,362,363,364,-357]]},{"type":"Polygon","id":352,"arcs":[[365]]},{"type":"Polygon","id":376,"arcs":[[366,367,368,-252,369,370,371]]},{"type":"MultiPolygon","id":380,"arcs":[[[372]],[[373]],[[374,375,-281,-162,-50]]]},{"type":"Polygon","id":388,"arcs":[[376]]},{"type":"Polygon","id":400,"arcs":[[-367,377,-363,378,379,-369,380]]},{"type":"MultiPolygon","id":392,"arcs":[[[381]],[[382]],[[383]]]},{"type":"Polygon","id":398,"arcs":[[384,385,386,387,-181,388]]},{"type":"Polygon","id":404,"arcs":[[389,390,391,392,-265,393]]},{"type":"Polygon","id":417,"arcs":[[-389,-180,394,395]]},{"type":"Polygon","id":116,"arcs":[[396,397,398,399]]},{"type":"Polygon","id":410,"arcs":[[400,401]]},{"type":"Polygon","id":-99,"arcs":[[-18,402,403,404]]},{"type":"Polygon","id":414,"arcs":[[405,406,-361]]},{"type":"Polygon","id":418,"arcs":[[407,408,-172,409,-398]]},{"type":"Polygon","id":422,"arcs":[[-371,410,411]]},{"type":"Polygon","id":430,"arcs":[[412,413,-294,-186]]},{"type":"Polygon","id":434,"arcs":[[414,-245,415,416,-250,417,418]]},{"type":"Polygon","id":144,"arcs":[[419]]},{"type":"Polygon","id":426,"arcs":[[420]]},{"type":"Polygon","id":440,"arcs":[[421,422,423,-93,424]]},{"type":"Polygon","id":442,"arcs":[[-226,-280,-65]]},{"type":"Polygon","id":428,"arcs":[[425,-262,426,-94,-424]]},{"type":"Polygon","id":504,"arcs":[[-242,427,428]]},{"type":"Polygon","id":498,"arcs":[[429,430]]},{"type":"Polygon","id":450,"arcs":[[431]]},{"type":"Polygon","id":484,"arcs":[[432,-98,-311,433,434]]},{"type":"Polygon","id":807,"arcs":[[-405,435,-85,-307,-14]]},{"type":"Polygon","id":466,"arcs":[[436,-239,437,-74,-188,-299,438]]},{"type":"Polygon","id":104,"arcs":[[439,-78,-350,-173,-409,440]]},{"type":"Polygon","id":499,"arcs":[[441,-323,-91,442,-403,-17]]},{"type":"Polygon","id":496,"arcs":[[443,-183]]},{"type":"Polygon","id":508,"arcs":[[444,445,446,447,448,449,450,451]]},{"type":"Polygon","id":478,"arcs":[[452,453,454,-240,-437]]},{"type":"Polygon","id":454,"arcs":[[-452,455,456]]},{"type":"MultiPolygon","id":458,"arcs":[[[457,458]],[[-346,459,-115,460]]]},{"type":"Polygon","id":516,"arcs":[[461,-8,462,-119,463]]},{"type":"Polygon","id":540,"arcs":[[464]]},{"type":"Polygon","id":562,"arcs":[[-75,-438,-238,-415,465,-194,466,-71]]},{"type":"Polygon","id":566,"arcs":[[467,-72,-467,-193]]},{"type":"Polygon","id":558,"arcs":[[468,-321,469,-213]]},{"type":"Polygon","id":528,"arcs":[[-227,-63,470]]},{"type":"MultiPolygon","id":578,"arcs":[[[471,-272,472,473]],[[474]],[[475]],[[476]]]},{"type":"Polygon","id":524,"arcs":[[-349,-176]]},{"type":"MultiPolygon","id":554,"arcs":[[[477]],[[478]]]},{"type":"MultiPolygon","id":512,"arcs":[[[479,480,-22,481]],[[-20,482]]]},{"type":"Polygon","id":586,"arcs":[[-178,-352,483,-355,-5]]},{"type":"Polygon","id":591,"arcs":[[484,-215,485,-208]]},{"type":"Polygon","id":604,"arcs":[[-167,486,-247,-211,-106,-102]]},{"type":"MultiPolygon","id":608,"arcs":[[[487]],[[488]],[[489]],[[490]],[[491]],[[492]],[[493]]]},{"type":"MultiPolygon","id":598,"arcs":[[[494]],[[495]],[[-342,496]],[[497]]]},{"type":"Polygon","id":616,"arcs":[[-224,498,499,-425,-97,500,501,-221]]},{"type":"Polygon","id":630,"arcs":[[502]]},{"type":"Polygon","id":408,"arcs":[[503,504,-402,505,-169]]},{"type":"Polygon","id":620,"arcs":[[-259,506]]},{"type":"Polygon","id":600,"arcs":[[-104,-105,-26]]},{"type":"Polygon","id":275,"arcs":[[-381,-368]]},{"type":"Polygon","id":634,"arcs":[[507,508]]},{"type":"Polygon","id":642,"arcs":[[509,-431,510,511,-81,512,-330]]},{"type":"MultiPolygon","id":643,"arcs":[[[513]],[[-500,514,-422]],[[515]],[[516]],[[517]],[[518]],[[519]],[[-504,-184,-444,-182,-388,520,-59,-290,521,522,-95,-427,-261,523,-269,-472,524]],[[525]],[[526]],[[527]]]},{"type":"Polygon","id":646,"arcs":[[528,-61,-198,529]]},{"type":"Polygon","id":732,"arcs":[[-241,-455,530,-428]]},{"type":"Polygon","id":682,"arcs":[[531,-379,-362,-407,532,-509,533,-23,-481,534]]},{"type":"Polygon","id":729,"arcs":[[535,536,-123,537,-418,-249,538,-254,-268,539]]},{"type":"Polygon","id":728,"arcs":[[540,-266,-393,541,-203,-125,542,-536]]},{"type":"Polygon","id":686,"arcs":[[543,-453,-439,-298,-303,544,-301]]},{"type":"MultiPolygon","id":90,"arcs":[[[545]],[[546]],[[547]],[[548]],[[549]]]},{"type":"Polygon","id":694,"arcs":[[550,-295,-414]]},{"type":"Polygon","id":222,"arcs":[[551,-314,-319]]},{"type":"Polygon","id":-99,"arcs":[[-263,-231,552,553]]},{"type":"Polygon","id":706,"arcs":[[-394,-264,-554,554]]},{"type":"Polygon","id":688,"arcs":[[-86,-436,-404,-443,-90,-322,-331,-513]]},{"type":"Polygon","id":740,"arcs":[[555,-277,556,-110,-316]]},{"type":"Polygon","id":703,"arcs":[[-502,557,-328,-54,-222]]},{"type":"Polygon","id":705,"arcs":[[-49,-332,-325,558,-375]]},{"type":"Polygon","id":752,"arcs":[[-473,-271,559]]},{"type":"Polygon","id":748,"arcs":[[560,-448]]},{"type":"Polygon","id":760,"arcs":[[-378,-372,-412,561,562,-364]]},{"type":"Polygon","id":148,"arcs":[[-466,-419,-538,-122,-195]]},{"type":"Polygon","id":768,"arcs":[[563,-293,-76,-69]]},{"type":"Polygon","id":764,"arcs":[[564,-459,565,-441,-408,-397]]},{"type":"Polygon","id":762,"arcs":[[-395,-179,-3,566]]},{"type":"Polygon","id":795,"arcs":[[-354,567,-386,568,-1]]},{"type":"Polygon","id":626,"arcs":[[569,-334]]},{"type":"Polygon","id":780,"arcs":[[570]]},{"type":"Polygon","id":788,"arcs":[[-244,571,-416]]},{"type":"MultiPolygon","id":792,"arcs":[[[-291,-36,-358,-365,-563,572]],[[-308,-83,573]]]},{"type":"Polygon","id":158,"arcs":[[574]]},{"type":"Polygon","id":834,"arcs":[[-391,575,-445,-457,576,-199,-62,-529,577]]},{"type":"Polygon","id":800,"arcs":[[-530,-197,-542,-392,-578]]},{"type":"Polygon","id":804,"arcs":[[-523,578,-511,-430,-510,-329,-558,-501,-96]]},{"type":"Polygon","id":858,"arcs":[[-113,579,-28]]},{"type":"MultiPolygon","id":840,"arcs":[[[580]],[[581]],[[582]],[[583]],[[584]],[[585,-435,586,-139]],[[587]],[[588]],[[589]],[[-141,590]]]},{"type":"Polygon","id":860,"arcs":[[-569,-385,-396,-567,-2]]},{"type":"Polygon","id":862,"arcs":[[591,-317,-108,-210]]},{"type":"Polygon","id":704,"arcs":[[592,-399,-410,-171]]},{"type":"MultiPolygon","id":548,"arcs":[[[593]],[[594]]]},{"type":"Polygon","id":887,"arcs":[[595,-535,-480]]},{"type":"Polygon","id":710,"arcs":[[-464,-118,596,-449,-561,-447,597],[-421]]},{"type":"Polygon","id":894,"arcs":[[-456,-451,598,-120,-463,-7,-200,-577]]},{"type":"Polygon","id":716,"arcs":[[-597,-121,-599,-450]]}]},"land":{"type":"MultiPolygon","arcs":[[[592,399,564,457,565,439,78,350,483,355,359,405,532,507,533,18,482,20,481,595,531,379,247,538,254,229,552,554,389,575,445,597,461,8,200,10,203,283,303,191,467,67,563,291,184,412,550,295,301,544,299,543,453,530,428,242,571,416,250,369,410,561,572,288,521,578,511,81,573,305,15,441,323,558,375,281,257,506,255,282,66,470,227,234,222,498,514,422,425,259,523,269,559,473,524,504,400,505,169],[123,542,536],[540,266,539],[386,520,55,358,567]],[[24,164]],[[579,28,165,486,245,206,484,211,468,317,551,309,433,586,139,590,141,585,432,98,311,319,469,213,485,208,591,314,555,277,111],[556,275]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[86]],[[87]],[[88]],[[459,113,460,346]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[142]],[[143]],[[144]],[[145]],[[146]],[[147]],[[148]],[[149]],[[150]],[[151]],[[152]],[[153]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]],[[167]],[[215]],[[216,218]],[[233]],[[235,326]],[[272]],[[273]],[[274]],[[278]],[[286,352]],[[287]],[[304]],[[308]],[[332]],[[334,569]],[[335]],[[336]],[[337]],[[338]],[[339]],[[340]],[[342,496]],[[343]],[[344]],[[347]],[[365]],[[372]],[[373]],[[376]],[[381]],[[382]],[[383]],[[419]],[[431]],[[464]],[[474]],[[475]],[[476]],[[477]],[[478]],[[487]],[[488]],[[489]],[[490]],[[491]],[[492]],[[493]],[[494]],[[495]],[[497]],[[502]],[[513]],[[515]],[[516]],[[517]],[[518]],[[519]],[[525]],[[526]],[[527]],[[545]],[[546]],[[547]],[[548]],[[549]],[[570]],[[574]],[[580]],[[581]],[[582]],[[583]],[[584]],[[587]],[[588]],[[589]],[[593]],[[594]]]}},"arcs":[[[67002,72360],[284,-219],[209,77],[58,261],[219,87],[157,175],[55,460],[234,112],[44,205],[131,-154],[84,-18]],[[68477,73346],[154,-4],[210,-122]],[[68841,73220],[85,-70],[201,185],[93,-111],[90,264],[166,-12],[43,84],[29,233],[120,200],[150,-131],[-30,-176],[84,-27],[-26,-484],[110,-189],[97,121],[123,57],[173,258],[192,-42],[286,-1]],[[70827,73379],[50,-165]],[[70877,73214],[-162,-65],[-141,-106],[-319,-67],[-298,-121],[-163,-251],[66,-244],[32,-287],[-139,-242],[12,-221],[-76,-207],[-265,18],[110,-381],[-177,-146],[-118,-347],[15,-346],[-108,-162],[-103,53],[-212,-75],[-31,-161],[-207,1],[-154,-326],[-10,-490],[-361,-239],[-194,50],[-56,-126],[-166,74],[-278,-87],[-465,294]],[[66909,69007],[252,523],[-23,370],[-210,97],[-22,366],[-91,460],[119,315],[-121,85],[76,419],[113,718]],[[56642,45537],[29,-179],[-32,-279],[49,-270],[-41,-216],[24,-199],[-579,7],[-13,-1832],[188,-471],[181,-360]],[[56448,41738],[-510,-235],[-673,82],[-192,276],[-1126,-25],[-42,-40],[-166,260],[-180,17],[-166,-98],[-134,-110]],[[53259,41865],[-26,363],[38,506],[96,527],[15,247],[90,519],[66,236],[159,377],[90,256],[29,427],[-15,326],[-83,206],[-74,350],[-68,345],[15,120],[85,228],[-84,557],[-57,385],[-139,364],[26,112]],[[53422,48316],[115,78],[80,-11],[98,69],[820,-7],[68,-430],[80,-345],[64,-186],[106,-301],[184,46],[91,81],[154,-81],[42,144],[69,336],[172,22],[15,100],[142,2],[-24,-207],[337,5],[5,-363],[56,-222],[-41,-347],[21,-354],[93,-214],[-15,-685],[68,53],[121,-15],[172,87],[127,-34]],[[53383,48495],[-74,433]],[[53309,48928],[112,249],[84,97],[104,-198]],[[53609,49076],[-101,-121],[-45,-148],[-9,-251],[-71,-61]],[[55719,75933],[-35,-196],[39,-247],[115,-140]],[[55838,75350],[-5,-151],[-91,-84],[-16,-187],[-129,-279]],[[55597,74649],[-48,40],[-5,127],[-154,193],[-24,274],[23,393],[38,179],[-47,91]],[[55380,75946],[-18,183],[120,284],[18,-109],[75,51]],[[55575,76355],[59,-154],[66,-59],[19,-209]],[[64327,65792],[49,28],[11,-158],[217,91],[230,-15],[168,-17],[190,389],[207,369],[176,355]],[[65575,66834],[52,-196]],[[65627,66638],[38,-455]],[[65665,66183],[-142,-2],[-23,-375],[50,-80],[-126,-114],[-1,-235],[-81,-238],[-7,-232]],[[65335,64907],[-56,-122],[-835,290],[-106,584],[-11,133]],[[31400,20215],[-168,16],[-297,0],[0,1286]],[[30935,21517],[106,-267],[139,-432],[361,-345],[389,-144],[-125,-288],[-264,-29],[-141,203]],[[32587,39017],[511,-940],[227,-88],[339,-425],[286,-225],[40,-254],[-273,-876],[280,-156],[312,-88],[220,92],[252,441],[45,509]],[[34826,37007],[138,110],[139,-332],[-6,-460],[-234,-318],[-186,-234],[-314,-559],[-370,-786]],[[33993,34428],[-70,-461],[-74,-592],[3,-573],[-61,-128],[-21,-372]],[[33770,32302],[-19,-301],[353,-493],[-38,-397],[173,-251],[-14,-282],[-267,-738],[-412,-309],[-557,-120],[-305,58],[59,-343],[-57,-431],[51,-291],[-167,-202],[-284,-80],[-267,210],[-108,-151],[39,-572],[188,-173],[152,181],[82,-299],[-255,-179],[-223,-358],[-41,-579],[-66,-309],[-262,-1],[-218,-295],[-80,-432],[273,-422],[266,-116],[-96,-517],[-328,-325],[-180,-675],[-254,-227],[-113,-270],[89,-598],[185,-333],[-117,29]],[[30952,21711],[-257,90],[-672,77],[-115,336],[6,431],[-185,-37],[-98,209],[-24,611],[213,253],[88,365],[-33,292],[148,491],[101,763],[-30,338],[122,109],[-30,217],[-129,115],[92,242],[-126,218],[-65,665],[112,117],[-47,702],[65,590],[75,513],[166,209],[-84,563],[-1,529],[210,376],[-7,481],[159,562],[1,530],[-72,105],[-128,994],[171,592],[-27,558],[100,523],[182,540],[196,358],[-83,226],[58,186],[-9,960],[302,284],[96,598],[-34,144]],[[31359,38736],[231,521],[364,-141],[163,-416],[109,464],[316,-24],[45,-123]],[[62106,75494],[386,89]],[[62492,75583],[57,-151],[106,-100],[-56,-144],[148,-198],[-78,-183],[118,-157],[124,-94],[7,-399]],[[62918,74157],[-101,-17]],[[62817,74140],[-113,333],[1,89],[-123,-2],[-82,155],[-58,-16]],[[62442,74699],[-109,168],[-207,144],[27,280],[-47,203]],[[33452,5736],[-82,-294],[-81,-259],[-582,79],[-621,-34],[-348,192],[0,22],[-152,170],[625,-23],[599,-56],[207,237],[147,203],[288,-237]],[[5775,6048],[-533,-79],[-364,204],[-163,203],[-11,34],[-180,158],[169,214],[517,-90],[277,-181],[212,-203],[76,-260]],[[37457,6883],[342,-248],[120,-350],[33,-248],[11,-293],[-430,-181],[-452,-146],[-522,-136],[-582,-113],[-658,34],[-365,192],[49,237],[593,158],[239,192],[174,248],[126,214],[168,203],[180,238],[0,-1],[141,0],[414,125],[419,-125]],[[16330,9501],[359,-90],[332,102],[-158,-203],[-261,-147],[-386,45],[-278,203],[60,192],[332,-102]],[[15122,9513],[425,-226],[-164,23],[-359,56],[-381,158],[202,124],[277,-135]],[[22505,10404],[305,-79],[304,68],[163,-327],[-217,45],[-337,-23],[-343,23],[-376,-34],[-283,113],[-146,237],[174,101],[353,-79],[403,-45]],[[30985,10967],[33,-259],[-49,-226],[-76,-214],[-326,-79],[-311,-113],[-364,11],[136,226],[-327,-79],[-310,-79],[-212,169],[-16,237],[305,226],[190,67],[321,-22],[82,293],[16,215],[-6,462],[158,271],[256,90],[147,-214],[65,-214],[120,-260],[92,-248],[76,-260]],[[0,3044],[16,-4],[245,335],[501,-181],[32,21],[294,183],[38,-6],[32,-5],[402,-239],[352,239],[63,33],[816,102],[265,-135],[130,-68],[419,-192],[789,-147],[625,-180],[1072,-136],[800,158],[1181,-113],[669,-180],[734,169],[773,158],[60,271],[-1094,22],[-898,136],[-234,225],[-745,125],[49,259],[103,237],[104,214],[-55,237],[-462,158],[-212,204],[-430,180],[675,-34],[642,91],[402,-192],[495,169],[457,214],[223,192],[-98,237],[-359,158],[-408,169],[-571,34],[-500,79],[-539,57],[-180,214],[-359,181],[-217,203],[-87,654],[136,-56],[250,-181],[457,57],[441,79],[228,-249],[441,57],[370,124],[348,158],[315,192],[419,56],[-11,215],[-97,214],[81,203],[359,102],[163,-192],[425,113],[321,146],[397,12],[375,56],[376,136],[299,124],[337,124],[218,-34],[190,-45],[414,79],[370,-102],[381,12],[364,79],[375,-57],[414,-56],[386,22],[403,-11],[413,-11],[381,22],[283,170],[337,90],[349,-124],[331,101],[300,203],[179,-180],[98,-203],[180,-192],[288,169],[332,-214],[375,-68],[321,-158],[392,34],[354,101],[418,-22],[376,-79],[381,-102],[147,249],[-180,191],[-136,204],[-359,45],[-158,214],[-60,214],[-98,429],[213,-79],[364,-34],[359,34],[327,-90],[283,-169],[119,-203],[376,-34],[359,79],[381,113],[342,67],[283,-135],[370,45],[239,440],[224,-259],[321,-102],[348,56],[228,-225],[365,-23],[337,-68],[332,-124],[218,215],[108,203],[278,-226],[381,57],[283,-125],[190,-191],[370,56],[288,124],[283,147],[337,79],[392,68],[354,79],[272,124],[163,180],[65,249],[-32,236],[-87,226],[-98,226],[-87,226],[-71,203],[-16,225],[27,226],[130,214],[109,237],[44,226],[-55,248],[-32,226],[136,260],[152,169],[180,214],[190,181],[223,169],[109,248],[152,158],[174,147],[267,34],[174,180],[196,113],[228,68],[202,147],[157,180],[218,68],[163,-147],[-103,-192],[-283,-169],[-120,-124],[-206,90],[-229,-56],[-190,-136],[-202,-146],[-136,-170],[-38,-225],[17,-215],[130,-191],[-190,-136],[-261,-45],[-153,-192],[-163,-180],[-174,-249],[-44,-214],[98,-237],[147,-181],[229,-135],[212,-181],[114,-225],[60,-215],[82,-225],[130,-192],[82,-215],[38,-530],[81,-214],[22,-226],[87,-226],[-38,-304],[-152,-237],[-163,-192],[-370,-79],[-125,-203],[-169,-192],[-419,-215],[-370,-90],[-348,-124],[-376,-124],[-223,-237],[-446,-23],[-489,23],[-441,-45],[-468,0],[87,-226],[424,-101],[311,-158],[174,-204],[-310,-180],[-479,56],[-397,-146],[-17,-237],[-11,-226],[327,-192],[60,-214],[353,-215],[588,-90],[500,-158],[398,-180],[506,-181],[690,-90],[681,-158],[473,-170],[517,-191],[272,-271],[136,-215],[337,204],[457,169],[484,180],[577,147],[495,158],[691,11],[680,-79],[560,-135],[180,248],[386,169],[702,12],[550,124],[522,124],[577,79],[614,102],[430,146],[-196,203],[-119,203],[0,215],[-539,-23],[-571,-90],[-544,0],[-77,214],[39,429],[125,124],[397,136],[468,135],[337,169],[337,170],[251,225],[380,102],[376,79],[190,45],[430,23],[408,79],[343,112],[337,136],[305,135],[386,181],[245,192],[261,169],[82,226],[-294,135],[98,237],[185,181],[288,112],[305,136],[283,180],[217,226],[136,271],[202,158],[331,-34],[136,-192],[332,-22],[11,214],[142,226],[299,-57],[71,-214],[331,-34],[360,102],[348,67],[315,-34],[120,-237],[305,192],[283,102],[315,79],[310,79],[283,135],[310,91],[240,124],[168,203],[207,-147],[288,79],[202,-271],[157,-203],[316,113],[125,226],[283,158],[365,-34],[108,-215],[229,215],[299,68],[326,22],[294,-11],[310,-68],[300,-34],[130,-192],[180,-169],[304,102],[327,22],[315,0],[310,12],[278,79],[294,67],[245,158],[261,102],[283,56],[212,158],[152,316],[158,192],[288,-90],[109,-203],[239,-136],[289,45],[196,-203],[206,-146],[283,135],[98,248],[250,102],[289,192],[272,79],[326,112],[218,125],[228,135],[218,124],[261,-68],[250,203],[180,158],[261,-11],[229,136],[54,203],[234,158],[228,113],[278,90],[256,45],[244,-34],[262,-56],[223,-158],[27,-249],[245,-191],[168,-158],[332,-68],[185,-158],[229,-158],[266,-34],[223,113],[240,237],[261,-124],[272,-68],[261,-68],[272,-45],[277,0],[229,-598],[-11,-147],[-33,-259],[-266,-147],[-218,-214],[38,-226],[310,11],[-38,-225],[-141,-215],[-131,-237],[212,-180],[321,-57],[321,102],[153,226],[92,214],[153,181],[174,169],[70,203],[147,282],[174,57],[316,22],[277,68],[283,90],[136,226],[82,214],[190,215],[272,146],[234,113],[153,192],[157,101],[202,91],[277,-57],[250,57],[272,67],[305,-33],[201,158],[142,383],[103,-158],[131,-271],[234,-112],[266,-46],[267,68],[283,-45],[261,-11],[174,56],[234,-34],[212,-124],[250,79],[300,0],[255,79],[289,-79],[185,192],[141,192],[191,158],[348,429],[179,-79],[212,-158],[185,-203],[354,-350],[272,-12],[256,0],[299,68],[299,79],[229,158],[190,169],[310,23],[207,124],[218,-113],[141,-180],[196,-181],[305,23],[190,-147],[332,-147],[348,-56],[288,45],[218,181],[185,180],[250,45],[251,-79],[288,-56],[261,90],[250,0],[245,-56],[256,-57],[250,102],[299,90],[283,23],[316,0],[255,56],[251,45],[76,282],[11,237],[174,-158],[49,-259],[92,-237],[115,-192],[234,-102],[315,34],[365,12],[250,33],[364,0],[262,12],[364,-23],[310,-45],[196,-181],[-54,-214],[179,-169],[299,-136],[310,-146],[360,-102],[375,-90],[283,-90],[315,-12],[180,192],[245,-158],[212,-180],[245,-136],[337,-56],[321,-68],[136,-226],[316,-135],[212,-203],[310,-90],[321,11],[299,-34],[332,11],[332,-45],[310,-79],[288,-135],[289,-113],[195,-169],[-32,-226],[-147,-203],[-125,-260],[-98,-203],[-131,-237],[-364,-90],[-163,-203],[-360,-124],[-125,-226],[-190,-214],[-201,-181],[-115,-237],[-70,-214],[-28,-260],[6,-214],[158,-226],[60,-214],[130,-204],[517,-78],[109,-249],[-501,-90],[-424,-124],[-528,-23],[-234,-327],[-49,-271],[-119,-214],[-147,-215],[370,-191],[141,-237],[239,-215],[338,-192],[386,-180],[419,-181],[636,-180],[142,-282],[800,-125],[53,-44],[208,-170],[767,147],[636,-181],[-99520,-139]],[[69148,23827],[179,-181],[263,-72],[9,-110],[-77,-262],[-427,-37],[-7,306],[41,238],[19,118]],[[90387,28338],[269,-199],[151,79],[217,111],[166,-39],[20,-684],[-95,-198],[-29,-463],[-97,157],[-193,-401],[-57,31],[-171,18],[-171,493],[-38,380],[-160,502],[7,264],[181,-51]],[[89877,43903],[100,-452],[179,217],[92,-243],[133,-225],[-29,-255],[60,-494],[42,-288],[70,-70],[75,-492],[-27,-299],[90,-390],[301,-301],[197,-274],[186,-251],[-37,-139],[159,-361],[108,-623],[111,126],[113,-249],[68,88],[48,-610],[197,-354],[129,-220],[217,-466],[78,-463],[7,-328],[-19,-356],[132,-490],[-16,-509],[-48,-267],[-75,-514],[6,-330],[-55,-413],[-123,-524],[-205,-283],[-102,-446],[-93,-284],[-82,-497],[-107,-287],[-70,-431],[-36,-397],[14,-182],[-159,-200],[-311,-21],[-257,-236],[-127,-223],[-168,-248],[-230,255],[-170,101],[43,301],[-152,-109],[-243,-417],[-240,156],[-158,91],[-159,41],[-269,167],[-179,355],[-52,437],[-64,291],[-137,233],[-267,70],[91,279],[-67,428],[-136,-399],[-247,-106],[146,319],[42,332],[107,282],[-22,427],[-226,-491],[-174,-197],[-106,-458],[-217,237],[9,305],[-174,418],[-147,216],[52,133],[-356,349],[-195,16],[-267,280],[-498,-54],[-359,-206],[-317,-192],[-265,38],[-294,-296],[-241,-132],[-53,-302],[-103,-234],[-236,-14],[-174,-52],[-246,105],[-199,-62],[-191,-27],[-165,-307],[-81,26],[-140,-163],[-133,-183],[-203,23],[-186,0],[-295,368],[-149,109],[6,330],[138,79],[47,131],[-10,207],[34,400],[-31,341],[-147,582],[-45,329],[12,328],[-111,375],[-7,169],[-123,230],[-35,451],[-158,456],[-39,245],[122,-249],[-93,535],[137,-167],[83,-223],[-5,294],[-138,454],[-26,181],[-65,173],[31,333],[56,141],[38,289],[-29,336],[114,415],[21,-439],[118,396],[225,193],[136,245],[212,212],[126,45],[77,-71],[219,214],[168,64],[42,126],[74,53],[153,-14],[292,169],[151,256],[71,307],[163,293],[13,229],[7,314],[194,489],[117,-497],[119,115],[-99,272],[87,279],[122,-125],[34,439],[152,283],[67,227],[140,98],[4,161],[122,-67],[5,145],[122,82],[134,78],[205,-264],[155,-342],[173,-3],[177,-54],[-59,316],[133,462],[126,150],[-44,144],[121,329],[168,203],[142,-68],[234,108],[-5,294],[-204,190],[148,84],[184,-143],[148,-236],[234,-148],[79,59],[172,-177],[162,164],[105,-50],[65,111],[127,-285],[-74,-308],[-105,-233],[-96,-19],[32,-230],[-81,-288],[-99,-283],[20,-163],[221,-318],[214,-184],[143,-199],[201,-341],[78,1],[145,-148],[43,-178],[265,-195],[183,197],[55,309],[56,255],[34,316],[85,458],[-39,279],[20,167],[-32,330],[37,434],[53,117],[-43,192],[67,305],[52,317],[7,164],[104,216],[78,-282],[19,-361],[70,-70],[11,-242],[101,-293],[21,-326],[-10,-209]],[[54716,79543],[-21,-236],[-156,-1],[53,-125],[-92,-370]],[[54500,78811],[-53,-97],[-243,-15],[-140,-130],[-229,44]],[[53835,78613],[-398,149],[-62,200],[-274,-100],[-32,-109],[-169,81]],[[52900,78834],[-142,16],[-125,105],[42,141],[-10,102]],[[52665,79198],[83,32],[141,-160],[39,152],[245,-25],[199,104],[133,-18],[87,-118],[26,98],[-40,375],[100,73],[98,266]],[[53776,79977],[206,-186],[157,236],[98,43],[215,-176],[131,30],[128,-109]],[[54711,79815],[-23,-73],[28,-199]],[[62817,74140],[-190,76],[-141,266],[-44,217]],[[63495,75906],[146,-303],[141,-408],[130,-27],[85,-156],[-228,-46],[-49,-447],[-48,-202],[-101,-135],[7,-285]],[[63578,73897],[-69,-28],[-173,301],[95,285],[-82,169],[-104,-43],[-327,-424]],[[62492,75583],[68,94],[207,-165],[149,-34],[38,67],[-136,312],[72,79]],[[62890,75936],[78,-19],[191,-350],[122,-39],[48,146],[166,232]],[[58149,49238],[-17,694],[-70,262]],[[58062,50194],[169,-45],[85,328],[147,-38]],[[58463,50439],[16,-227],[60,-130],[3,-187],[-69,-121],[-108,-300],[-101,-209],[-115,-27]],[[50920,81398],[204,-45],[257,120],[176,-252],[153,-135]],[[51710,81086],[-32,-389]],[[51678,80697],[-72,-22],[-30,-323]],[[51576,80352],[-243,263],[-143,-45],[-194,272],[-129,231],[-129,9],[-40,203]],[[50698,81285],[222,113]],[[50747,55434],[-229,-68]],[[50518,55366],[-69,398],[13,1322],[-56,119],[-11,283],[-96,201],[-85,170],[35,303]],[[50249,58162],[96,66],[56,251],[136,54],[61,172]],[[50598,58705],[93,169],[100,2],[212,-332]],[[51003,58544],[-11,-191],[62,-342],[-54,-232],[29,-154],[-135,-357],[-86,-176],[-52,-364],[7,-366],[-16,-928]],[[49214,57382],[-190,149],[-130,-22],[-97,-145],[-125,122],[-49,190],[-125,126]],[[48498,57802],[-18,334],[76,244],[-7,195],[221,477],[41,395],[76,141],[134,-78],[116,117],[38,148],[216,259],[53,180],[259,238],[153,82],[70,-110],[178,3]],[[50104,60427],[-22,-280],[37,-262],[156,-376],[9,-279],[320,-130],[-6,-395]],[[50249,58162],[-243,13]],[[50006,58175],[-128,46],[-90,-93],[-123,42],[-482,-27],[-7,-327],[38,-434]],[[75742,64522],[-6,-413],[-97,88],[18,-464]],[[75657,63733],[-79,301],[-16,293],[-53,277],[-116,335],[-256,23],[25,-237],[-87,-321],[-118,117],[-41,-105],[-78,63],[-108,52]],[[74730,64531],[-43,474],[-96,433],[47,347],[-171,154],[62,210],[173,215],[-200,305],[98,390],[220,-248],[133,-29],[24,-400],[265,-79],[257,8],[160,-98],[-128,-487],[-124,-34],[-86,-327],[152,-299],[46,368],[76,2],[147,-914]],[[56293,77303],[80,-236],[108,42],[213,-90],[408,-30],[138,147],[327,133],[202,-209],[163,-60]],[[57932,77000],[-144,-239],[-101,-412],[89,-328]],[[57776,76021],[-239,77],[-283,-181]],[[57254,75917],[-3,-287],[-252,-55],[-196,202],[-222,-159],[-206,17]],[[56375,75635],[-20,381],[-139,185]],[[56216,76201],[46,81],[-30,69],[47,183],[105,180],[-135,248],[-24,211],[68,130]],[[28462,65512],[-68,-29],[-70,332],[-104,167],[60,365],[84,-23],[97,-478],[1,-334]],[[28383,67136],[-303,-92],[-19,213],[130,46],[184,-17],[8,-150]],[[28611,67142],[-48,-409],[-51,73],[4,301],[-124,228],[-1,66],[220,-259]],[[55279,77663],[100,2],[-69,-253],[134,-222],[-41,-271],[-65,-25]],[[55338,76894],[-52,-53],[-90,-134],[-41,-316]],[[55155,76391],[-246,218],[-105,240],[-106,128],[-127,215],[-61,178],[-136,270],[59,239],[99,-133],[60,120],[130,13],[239,-96],[192,8],[126,-128]],[[56523,82877],[268,-4],[302,217],[64,325],[228,184],[-26,258]],[[57359,83857],[169,97],[298,222]],[[57826,84176],[293,-144],[39,-143],[146,68],[272,-137],[27,-270],[-60,-156],[174,-377],[113,-105],[-16,-104],[187,-101],[80,-154],[-108,-126],[-224,20],[-54,-53],[66,-192],[68,-368]],[[58829,81834],[-239,-34],[-85,-127],[-18,-290],[-111,56],[-250,-28],[-73,135],[-104,-100],[-105,83],[-218,11],[-310,139],[-281,45],[-215,-13],[-152,-156],[-133,-23]],[[56535,81532],[-6,257],[-85,267],[166,117],[2,230],[-77,219],[-12,255]],[[25238,62085],[-2,85],[33,26],[51,-68],[99,348],[53,7]],[[25472,62483],[1,-84],[53,-3],[-5,-157],[-45,-249],[24,-89],[-29,-206],[18,-55],[-32,-291],[-55,-153],[-50,-18],[-55,-199]],[[25297,60979],[-83,-1],[22,650],[2,457]],[[31359,38736],[-200,-79],[-109,794],[-150,646],[88,557],[-146,244],[-37,416],[-136,391]],[[30669,41705],[175,622],[-119,484],[63,194],[-49,213],[108,288],[6,490],[13,405],[60,195],[-240,926]],[[30686,45522],[206,-48],[143,12],[62,174],[243,234],[147,216],[363,98],[-29,-432],[34,-221],[-23,-386],[302,-516],[311,-95],[109,-216],[188,-114],[115,-167],[175,6],[161,-171],[12,-333],[55,-168],[3,-248],[-81,-10],[107,-671],[533,-23],[-41,-333],[30,-227],[151,-162],[66,-358],[-49,-453],[-77,-253],[27,-328],[-87,-119]],[[33842,40210],[-4,177],[-259,295],[-258,8],[-484,-167],[-133,-507],[-7,-310],[-110,-689]],[[34826,37007],[54,332],[38,340],[0,317],[-100,105],[-104,-94],[-103,26],[-33,222],[-26,527],[-52,172],[-187,156],[-114,-113],[-293,111],[18,782],[-82,320]],[[30686,45522],[-157,-99],[-126,66],[18,875],[-228,-339],[-245,15],[-105,307],[-184,33],[59,247],[-155,351],[-115,518],[73,106],[0,243],[168,166],[-28,312],[71,200],[20,269],[318,392],[227,111],[37,86],[251,-27]],[[30585,49354],[125,1579],[6,250],[-43,330],[-123,210],[1,418],[156,95],[56,-60],[9,221],[-162,60],[-4,360],[541,-13],[92,198],[77,-182],[55,-340],[52,71]],[[31423,52551],[153,-304],[216,37],[54,176],[206,135],[115,94],[32,244],[198,164],[-15,121],[-235,49],[-39,363],[12,386],[-125,149],[52,53],[206,-73],[221,-144],[80,136],[200,89],[310,216],[102,220],[-37,162]],[[33129,54824],[145,26],[64,-133],[-36,-253],[96,-87],[63,-268],[-77,-203],[-44,-490],[71,-291],[20,-267],[171,-270],[137,-28],[30,112],[88,25],[126,101],[90,153],[154,-48],[67,20]],[[34294,52923],[151,-47],[25,118],[-46,114],[28,167],[112,-51],[131,59],[159,-122]],[[34854,53161],[121,-119],[86,156],[62,-24],[38,-162],[133,41],[107,219],[85,424],[164,527]],[[35650,54223],[95,27],[69,-318],[155,-1008],[149,-95],[7,-397],[-208,-474],[86,-174],[491,-90],[10,-578],[211,378],[349,-207],[462,-351],[135,-338],[-45,-319],[323,178],[540,-305],[415,23],[411,-477],[355,-645],[214,-166],[237,-23],[101,-182],[94,-733],[46,-348],[-110,-953],[-142,-376],[-391,-801],[-177,-651],[-206,-499],[-69,-11],[-78,-424],[20,-1079],[-77,-888],[-30,-379],[-88,-228],[-49,-769],[-282,-752],[-47,-595],[-225,-250],[-65,-345],[-302,2],[-437,-222],[-195,-256],[-311,-168],[-327,-459],[-235,-571],[-41,-430],[46,-318],[-51,-582],[-63,-281],[-195,-317],[-308,-1013],[-244,-457],[-189,-269],[-127,-548],[-183,-329]],[[35174,32383],[-77,326],[122,273],[-160,392],[-218,318],[-286,369],[-103,-17],[-279,446],[-180,-62]],[[81723,54436],[110,215],[236,316]],[[82069,54967],[-13,-284],[-16,-368],[-133,18],[-58,-196],[-126,299]],[[75471,67823],[113,-184],[-20,-354],[-227,-17],[-234,39],[-175,-90],[-252,218],[-6,115]],[[74670,67550],[184,429],[150,146],[198,-134],[147,-14],[122,-154]],[[58175,39107],[-393,-424],[-249,-430],[-93,-383],[-83,-217],[-152,-46],[-48,-275],[-28,-180],[-178,-134],[-226,28],[-133,162],[-117,70],[-135,-134],[-68,-276],[-132,-173],[-139,-257],[-199,-59],[-62,202],[26,351],[-165,548],[-75,86]],[[55526,37566],[0,1681],[274,20],[8,2051],[207,19],[428,202],[106,-238],[177,226],[85,1],[156,130]],[[56967,41658],[50,-43]],[[57017,41615],[107,-460],[56,-103],[87,-333],[315,-633],[119,-62],[0,-203],[82,-365],[215,-88],[177,-261]],[[54244,56103],[229,44],[52,148],[46,-11],[69,-131],[350,221],[118,224],[145,202],[-28,202],[78,53],[269,-35],[261,266],[201,629],[141,233],[176,98]],[[56351,58246],[31,-246],[160,-360],[1,-235],[-45,-240],[18,-179],[96,-166]],[[56612,56820],[212,-252]],[[56824,56568],[152,-232],[2,-188],[187,-299],[116,-250],[70,-345],[208,-228],[44,-183]],[[57603,54843],[-91,-61],[-178,14],[-209,60],[-104,-49],[-41,-140],[-90,-17],[-110,121],[-309,-287],[-127,58],[-38,-45],[-83,-347],[-207,112],[-203,57],[-177,212],[-229,196],[-149,-186],[-108,-292],[-25,-402]],[[55125,53847],[-178,33],[-188,96],[-166,-305],[-146,-536]],[[54447,53135],[-29,167],[-12,263],[-127,185],[-103,297],[-23,207],[-132,301],[23,171],[-28,243],[21,446],[67,105],[140,583]],[[32315,78637],[202,-78],[257,16],[-137,-236],[-102,-37],[-353,244],[-69,193],[105,177],[97,-279]],[[32831,80108],[-135,-10],[-360,180],[-258,272],[96,49],[365,-145],[284,-240],[8,-106]],[[15692,79765],[-140,-80],[-456,262],[-84,204],[-248,202],[-50,164],[-286,103],[-107,314],[24,133],[291,-125],[171,-88],[261,-61],[94,-198],[138,-274],[277,-238],[115,-318]],[[34407,81019],[-184,-504],[181,195],[187,-124],[-98,-200],[247,-158],[128,140],[277,-177],[-86,-422],[194,99],[36,-306],[86,-358],[-117,-507],[-125,-21],[-183,109],[60,471],[-77,73],[-322,-499],[-166,20],[196,270],[-267,140],[-298,-34],[-539,17],[-43,171],[173,202],[-121,157],[234,347],[287,917],[172,328],[241,198],[129,-25],[-54,-156],[-148,-363]],[[13005,83025],[131,-75],[267,46],[-84,-654],[242,-463],[-111,1],[-167,264],[-103,265],[-140,179],[-51,253],[16,184]],[[27981,87625],[-108,-302],[-123,49],[-73,171],[13,40],[107,173],[114,-13],[70,-118]],[[27250,87943],[-325,-317],[-196,13],[-61,156],[207,265],[381,-5],[-6,-112]],[[26344,89640],[51,-253],[143,89],[161,-151],[304,-198],[318,-179],[25,-274],[204,45],[199,-191],[-247,-181],[-432,138],[-156,259],[-275,-306],[-396,-298],[-95,337],[-377,-55],[242,284],[35,454],[95,527],[201,-47]],[[28926,90499],[-312,-29],[-69,282],[118,323],[255,80],[217,-160],[3,-246],[-32,-80],[-180,-170]],[[23431,91627],[-173,-202],[-374,175],[-226,-63],[-380,259],[245,178],[194,250],[295,-164],[166,-103],[84,-110],[169,-220]],[[31350,77823],[-181,326],[0,785],[-123,166],[-187,-98],[-92,152],[-212,-435],[-84,-448],[-99,-262],[-118,-89],[-89,-29],[-28,-142],[-512,-1],[-422,-4],[-125,-106],[-294,-414],[-34,-45],[-89,-225],[-255,0],[-273,-2],[-125,-91],[44,-113],[25,-176],[-5,-58],[-363,-287],[-286,-90],[-323,-308],[-70,0],[-94,91],[-31,82],[6,60],[61,202],[131,317],[81,340],[-56,500],[-59,523],[-290,270],[35,103],[-41,70],[-76,0],[-56,91],[-14,137],[-54,-60],[-75,18],[17,57],[-65,57],[-27,151],[-216,185],[-224,191],[-272,223],[-261,209],[-248,-163],[-91,-6],[-342,150],[-225,-75],[-269,179],[-284,91],[-194,36],[-86,97],[-49,317],[-94,-3],[-1,-221],[-575,0],[-951,0],[-944,-1],[-833,1],[-834,0],[-819,0],[-847,0],[-273,0],[-825,0],[-788,0]],[[15878,80048],[-38,1],[-537,566],[-199,248],[-503,239],[-155,510],[40,353],[-356,245],[-48,464],[-336,419],[-6,296]],[[13740,83389],[154,278],[-7,363],[-473,367],[-284,657],[-173,413],[-255,259],[-187,236],[-147,298],[-279,-187],[-270,-321],[-247,378],[-194,252],[-271,160],[-273,17],[1,3279],[2,2137]],[[10837,91975],[518,-139],[438,-277],[289,-53],[244,241],[336,179],[413,-70],[416,253],[455,144],[191,-239],[207,134],[62,272],[192,-62],[470,-516],[369,390],[38,-437],[341,95],[105,168],[337,-33],[424,-242],[650,-211],[383,-98],[272,37],[374,-292],[-390,-286],[502,-123],[750,68],[236,100],[296,-345],[302,291],[-283,245],[179,197],[338,26],[223,58],[224,-138],[279,-312],[310,46],[491,-260],[431,91],[405,-13],[-32,358],[247,100],[431,-195],[-2,-545],[177,459],[223,-15],[126,579],[-298,355],[-324,233],[22,636],[329,418],[366,-92],[281,-255],[378,-649],[-247,-283],[517,-116],[-1,-589],[371,451],[332,-371],[-83,-427],[269,-388],[290,416],[202,497],[16,632],[394,-44],[411,-85],[373,-286],[17,-285],[-207,-307],[196,-309],[-36,-280],[-544,-403],[-386,-88],[-287,173],[-83,-289],[-268,-486],[-81,-252],[-322,-389],[-397,-38],[-220,-244],[-18,-374],[-323,-72],[-340,-467],[-301,-648],[-108,-454],[-16,-669],[409,-96],[125,-539],[130,-437],[388,114],[517,-250],[277,-219],[199,-272],[348,-158],[294,-243],[459,-33],[302,-56],[-45,-499],[86,-578],[201,-645],[414,-547],[214,188],[150,592],[-145,909],[-196,303],[445,270],[314,404],[154,401],[-23,385],[-188,489],[-338,434],[328,603],[-121,522],[-93,899],[194,133],[476,-157],[286,-56],[230,152],[258,-196],[342,-333],[85,-224],[495,-44],[-8,-483],[92,-728],[254,-90],[201,-339],[402,319],[266,636],[184,267],[216,-514],[362,-734],[307,-691],[-112,-362],[370,-325],[250,-329],[442,-149],[179,-183],[110,-488],[216,-76],[112,-217],[20,-647],[-202,-217],[-199,-202],[-458,-205],[-349,-473],[-470,-93],[-594,121],[-417,4],[-287,-40],[-233,-413],[-354,-255],[-401,-762],[-320,-532],[236,95],[446,756],[583,480],[415,58],[246,-283],[-262,-387],[88,-620],[91,-435],[361,-287],[459,83],[278,647],[19,-417],[180,-209],[-344,-377],[-615,-343],[-276,-233],[-310,-415],[-211,43],[-11,487],[483,476],[-445,-19],[-309,-70]],[[18287,93939],[-139,-270],[618,174],[386,-291],[314,294],[254,-188],[227,-566],[140,238],[-197,590],[244,85],[276,-93],[311,-232],[175,-561],[86,-406],[466,-285],[502,-273],[-31,-253],[-456,-47],[178,-221],[-94,-211],[-503,90],[-478,156],[-322,-35],[-522,-196],[-704,-86],[-494,-54],[-151,271],[-379,157],[-246,-64],[-343,456],[185,61],[429,99],[392,-26],[362,100],[-537,135],[-594,-46],[-394,11],[-146,213],[644,230],[-428,-8],[-485,152],[233,431],[193,229],[744,351],[284,-111]],[[20972,94111],[-244,-381],[-434,404],[95,80],[372,23],[211,-126]],[[28794,93928],[25,-159],[-296,16],[-299,13],[-304,-78],[-80,35],[-306,306],[12,207],[133,38],[636,-62],[479,-316]],[[25955,93959],[219,-359],[256,465],[704,236],[477,-596],[-42,-377],[550,168],[263,228],[616,-291],[383,-274],[36,-252],[515,131],[290,-367],[670,-228],[242,-232],[263,-539],[-510,-268],[654,-376],[441,-127],[400,-529],[437,-38],[-87,-404],[-487,-669],[-342,246],[-437,554],[-359,-72],[-35,-330],[292,-335],[377,-265],[114,-153],[181,-570],[-96,-414],[-350,156],[-697,461],[393,-496],[289,-348],[45,-201],[-753,230],[-596,334],[-337,281],[97,162],[-414,296],[-405,280],[5,-167],[-803,-92],[-235,198],[183,424],[522,10],[571,74],[-92,205],[96,287],[360,561],[-77,255],[-107,197],[-425,280],[-563,196],[178,145],[-294,358],[-245,33],[-219,196],[-149,-170],[-503,-74],[-1011,129],[-588,169],[-450,87],[-231,202],[290,263],[-394,2],[-88,583],[213,515],[286,235],[717,154],[-204,-373]],[[22123,94355],[331,-122],[496,73],[72,-167],[-259,-276],[420,-248],[-50,-518],[-455,-223],[-268,48],[-192,220],[-690,444],[5,185],[567,-72],[-306,377],[329,279]],[[24112,93737],[-298,-430],[-317,21],[-173,506],[4,287],[145,244],[276,157],[579,-20],[530,-140],[-415,-513],[-331,-112]],[[16539,92938],[-731,-278],[-147,253],[-641,304],[119,244],[192,421],[241,378],[-272,353],[939,90],[397,-119],[709,-32],[270,-167],[298,-243],[-349,-145],[-681,-405],[-344,-403],[0,-251]],[[23996,95009],[-151,-223],[-403,43],[-337,150],[148,259],[399,155],[243,-202],[101,-182]],[[22639,96011],[212,-267],[9,-295],[-127,-429],[-458,-59],[-298,92],[5,336],[-455,-44],[-18,445],[299,-18],[419,197],[390,-34],[22,76]],[[19941,95712],[109,-205],[247,97],[291,-25],[49,-282],[-169,-274],[-940,-89],[-701,-249],[-423,-13],[-35,187],[577,255],[-1255,-69],[-389,103],[379,563],[262,161],[782,-194],[493,-341],[485,-44],[-397,551],[255,210],[286,-67],[94,-275]],[[23699,96229],[308,-186],[547,2],[240,-190],[-64,-216],[319,-130],[177,-137],[374,-26],[406,-48],[441,125],[566,49],[451,-40],[298,-218],[62,-238],[-174,-153],[-414,-124],[-355,70],[-797,-88],[-570,-11],[-449,71],[-738,186],[-96,316],[-34,286],[-279,251],[-574,70],[-322,179],[104,236],[573,-36]],[[17722,96544],[-38,-443],[-214,-199],[-259,-29],[-517,-246],[-444,-88],[-377,124],[472,431],[570,373],[426,-8],[381,85]],[[23933,96472],[-126,-17],[-521,37],[-74,161],[559,-9],[195,-107],[-33,-65]],[[19392,96574],[-518,-166],[-411,186],[224,183],[406,59],[392,-90],[-93,-172]],[[19538,97095],[-339,-113],[-461,1],[5,82],[285,173],[149,-27],[361,-116]],[[23380,96781],[-411,-119],[-226,134],[-119,216],[-22,238],[360,-23],[162,-38],[332,-200],[-76,-208]],[[22205,96935],[108,-240],[-453,64],[-457,187],[-619,21],[268,171],[-335,139],[-21,221],[546,-79],[751,-210],[212,-274]],[[25828,97704],[334,-186],[-381,-171],[-513,-434],[-492,-41],[-575,74],[-299,235],[4,208],[220,154],[-508,-5],[-306,192],[-176,261],[193,256],[192,175],[285,41],[-122,132],[646,29],[355,-308],[468,-123],[455,-109],[220,-380]],[[30972,99689],[742,-45],[597,-74],[508,-156],[-12,-154],[-678,-250],[-672,-117],[-251,-129],[605,3],[-656,-349],[-452,-163],[-476,-470],[-573,-96],[-177,-117],[-841,-62],[383,-72],[-192,-103],[230,-284],[-264,-198],[-429,-163],[-132,-225],[-388,-172],[39,-130],[475,22],[6,-141],[-742,-345],[-726,159],[-816,-89],[-414,69],[-525,30],[-35,277],[514,130],[-137,415],[170,41],[742,-249],[-379,370],[-450,110],[225,223],[492,137],[79,201],[-392,225],[-118,297],[759,-25],[220,-63],[433,210],[-625,67],[-972,-37],[-491,196],[-232,232],[-324,169],[-61,197],[413,110],[324,18],[545,94],[409,214],[344,-30],[300,-161],[211,311],[367,92],[498,64],[849,24],[148,-63],[802,98],[601,-37],[602,-36]],[[52900,78834],[-22,-236],[-122,-97],[-206,72],[-60,-232],[-132,-18],[-48,91],[-156,-195],[-134,-28],[-120,124]],[[51900,78315],[-95,252],[-133,-90],[5,261],[203,323],[-9,147],[126,-53],[77,98]],[[52074,79253],[236,-4],[57,125],[298,-176]],[[31400,20215],[-92,-233],[-238,-178],[-137,18],[-164,46],[-202,174],[-291,83],[-350,322],[-283,309],[-383,645],[229,-121],[390,-384],[369,-207],[143,264],[90,394],[256,238],[198,-68]],[[30952,21711],[-247,4],[-134,-141],[-250,-208],[-45,-538],[-118,-14],[-313,188],[-318,401],[-346,329],[-87,365],[79,337],[-140,383],[-36,982],[119,554],[293,445],[-422,168],[265,509],[94,956],[309,-202],[145,1193],[-186,153],[-87,-719],[-175,81],[87,823],[95,1067],[127,394],[-80,562],[-22,649],[117,18],[170,930],[192,922],[118,858],[-64,863],[83,475],[-34,711],[163,703],[50,1114],[89,1196],[87,1287],[-20,943],[-58,811]],[[30452,41263],[143,147],[74,295]],[[80649,62586],[-240,-277],[-228,179],[-8,495],[137,261],[304,161],[159,-13],[62,-220],[-122,-254],[-64,-332]],[[86288,76244],[-179,340],[-111,-323],[-429,-248],[44,-304],[-241,21],[-131,181],[-191,-409],[-306,-309],[-227,-370]],[[84517,74823],[-388,-167],[-204,-269],[-300,-157],[148,267],[-58,224],[220,387],[-147,302],[-242,-204],[-314,-400],[-171,-372],[-272,-28],[-142,-268],[147,-390],[227,-94],[9,-259],[220,-168],[311,411],[247,-224],[179,-15],[45,-302],[-393,-161],[-130,-311],[-270,-289],[-142,-403],[299,-316],[109,-567],[169,-527],[189,-443],[-5,-428],[-174,-157],[66,-307],[164,-179],[-43,-469],[-71,-456],[-155,-52],[-203,-623],[-225,-756],[-258,-687],[-382,-532],[-386,-484],[-313,-67],[-170,-255],[-96,186],[-157,-286],[-388,-288],[-294,-88],[-95,-609],[-154,-33],[-73,418],[66,222],[-373,185],[-131,-94]],[[80013,64241],[-280,149],[-132,234],[44,332],[-254,105],[-134,216],[-236,-307],[-271,-66],[-221,3],[-149,-141]],[[78380,64766],[-144,-84],[42,-659],[-148,16],[-25,135]],[[78105,64174],[-9,238],[-203,-167],[-121,106],[-206,216],[81,478],[-176,112],[-66,530],[-293,-96],[33,684],[263,480],[11,475],[-8,441],[-121,137],[-93,339],[-162,-42]],[[77035,68105],[-300,86],[94,242],[-130,358],[-198,-243],[-233,142],[-321,-367],[-252,-428],[-224,-72]],[[74670,67550],[-23,454],[-170,-121]],[[74477,67883],[-324,56],[-314,132],[-225,253],[-216,114],[-93,276],[-157,83],[-280,375],[-223,177],[-115,-138]],[[72530,69211],[-386,403],[-273,365],[-78,635],[200,-78],[9,294],[-111,295],[28,470],[-298,675]],[[71621,72270],[-457,233],[-82,442],[-205,269]],[[70827,73379],[-42,328],[10,224],[-169,131],[-91,-58],[-70,533]],[[70465,74537],[79,132],[-39,135],[266,272],[192,112],[294,-77],[105,368],[356,68],[99,229],[438,312],[39,130]],[[72294,76218],[-22,328],[190,150],[-250,1000],[550,231],[143,128],[200,1031],[551,-190],[155,261],[13,577],[230,54],[212,383]],[[74266,80171],[109,48]],[[74375,80219],[73,-402],[233,-306],[396,-216],[192,-464],[-107,-673],[100,-249],[330,-99],[374,-80],[336,-359],[171,-64],[127,-531],[163,-342],[306,14],[574,-129],[369,80],[274,-86],[411,-350],[336,1],[123,-179],[324,309],[448,200],[417,21],[324,203],[200,309],[194,193],[-45,190],[-89,222],[146,371],[156,-52],[286,-117],[277,306],[423,223],[204,380],[195,164],[404,77],[219,-65],[30,204],[-251,403],[-223,184],[-214,-212],[-274,89],[-157,-73],[-72,236],[197,575],[135,434]],[[82410,80559],[333,-217],[392,364],[-3,253],[251,611],[155,184],[-4,318],[-152,137],[229,287],[345,104],[369,15],[415,-171],[244,-212],[172,-581],[104,-248],[97,-354],[103,-564],[483,-184],[329,-409],[112,-541],[423,-1],[240,227],[459,170],[-146,-518],[-107,-211],[-96,-631],[-186,-560],[-338,102],[-238,-203],[73,-494],[-40,-680],[-142,-16],[2,-292]],[[49206,54706],[-126,-6],[-194,112],[-178,-6],[-329,-101],[-193,-166],[-275,-211],[-54,15]],[[47857,54343],[22,474],[26,72],[-8,227],[-118,241],[-88,39],[-81,158],[60,256],[-28,278],[13,168]],[[47655,56256],[44,0],[17,251],[-22,112],[27,80],[103,69],[-69,461],[-64,238],[23,195],[55,45]],[[47769,57707],[36,52],[77,-86],[215,-5],[51,168],[48,-11],[80,65],[43,-246],[65,72],[114,86]],[[49214,57382],[74,-819],[-117,-484],[-73,-650],[121,-496],[-13,-227]],[[53632,53135],[-35,31],[-164,-74],[-169,77],[-132,-38]],[[53132,53131],[-452,14]],[[52680,53145],[40,454],[-108,381],[-127,98],[-56,258],[-72,82],[4,159]],[[52361,54577],[71,408],[132,556],[81,5],[165,337],[105,9],[156,-236],[191,194],[26,239],[63,232],[43,291],[148,238],[56,403],[59,128],[39,299],[74,368],[234,446],[14,191],[31,104],[-110,229]],[[53939,59018],[9,184],[78,33]],[[54026,59235],[111,-369],[18,-382],[-10,-383],[151,-523],[-155,6],[-78,-41],[-127,57],[-60,-271],[164,-336],[121,-98],[39,-239],[87,-397],[-43,-156]],[[54447,53135],[-20,-311],[-220,136],[-225,152],[-350,23]],[[58564,53850],[-16,-673],[111,-78],[-89,-205],[-107,-153],[-106,-300],[-59,-268],[-15,-462],[-65,-220],[-2,-434]],[[58216,51057],[-80,-161],[-10,-342],[-38,-45],[-26,-315]],[[58149,49238],[50,-530],[-27,-299],[55,-334],[161,-323],[150,-726]],[[58538,47026],[-109,59],[-373,-97],[-75,-69],[-79,-368],[62,-254],[-49,-681],[-34,-578],[75,-103],[194,-224],[76,105],[23,-621],[-212,4],[-114,317],[-103,246],[-213,80],[-62,302],[-170,-182],[-222,81],[-93,261],[-176,53],[-131,-14],[-15,179],[-96,15]],[[53422,48316],[-39,179]],[[53609,49076],[73,-59],[95,221],[152,-6],[17,-163],[104,-102],[164,361],[161,281],[71,185],[-10,473],[121,560],[127,296],[183,278],[32,184],[7,211],[45,200],[-14,326],[34,510],[55,360],[83,308],[16,347]],[[57603,54843],[169,-475],[124,-70],[75,97],[128,-38],[155,122],[66,-246],[244,-383]],[[53309,48928],[-228,610]],[[53081,49538],[212,318],[-105,381],[95,144],[187,71],[23,255],[148,-276],[245,-25],[85,273],[36,382],[-31,450],[-131,341],[120,667],[-69,114],[-207,-47],[-78,298],[21,251]],[[29063,51742],[-119,136],[-137,191],[-79,-92],[-235,80],[-68,248],[-52,-9],[-278,329]],[[28095,52625],[-37,178],[103,44],[-12,288],[65,209],[138,38],[117,362],[106,302],[-102,137],[52,335],[-62,526],[59,152],[-44,487],[-112,306]],[[28366,55989],[36,280],[89,-41],[52,171],[-64,339],[34,85]],[[28513,56823],[143,-19],[209,402],[114,62],[3,190],[51,487],[159,267],[175,11],[22,120],[218,-48],[218,291],[109,128],[134,278],[98,-36],[73,-151],[-54,-194]],[[30185,58611],[-178,-96],[-71,-288],[-107,-165],[-81,-215],[-34,-410],[-77,-337],[144,-39],[35,-265],[62,-126],[21,-232],[-33,-213],[10,-120],[69,-48],[66,-201],[357,55],[161,-73],[196,-496],[112,62],[200,-31],[158,66],[99,-99],[-50,-311],[-62,-193],[-22,-413],[56,-383],[79,-171],[9,-129],[-140,-286],[100,-127],[74,-202],[85,-574]],[[30585,49354],[-139,306],[-83,14],[179,586],[-213,270],[-166,-50],[-101,100],[-153,-152],[-207,72],[-163,603],[-129,149],[-89,272],[-184,272],[-74,-54]],[[26954,56566],[-151,128],[-56,121],[32,100],[-11,127],[-77,138],[-109,113],[-95,74],[-19,168],[-73,103],[18,-167],[-55,-138],[-64,160],[-89,57],[-38,116],[2,175],[36,182],[-78,81],[64,111]],[[26191,58215],[42,74],[183,-152],[63,75],[89,-48],[46,-119],[82,-38],[66,122]],[[26762,58129],[70,-313],[108,-232],[130,-246]],[[27070,57338],[-107,-51],[1,-232],[58,-86],[-41,-68],[10,-104],[-23,-117],[-14,-114]],[[27147,65183],[240,-41],[219,-6],[261,-197],[110,-210],[260,65],[98,-136],[235,-356],[173,-260],[92,8],[165,-118],[-20,-162],[205,-23],[210,-236],[-33,-135],[-185,-73],[-187,-29],[-191,46],[-398,-56],[186,321],[-113,150],[-179,38],[-96,166],[-66,328],[-157,-22],[-259,154],[-83,121],[-362,89],[-97,113],[104,144],[-273,29],[-199,-299],[-115,-8],[-40,-141],[-138,-63],[-118,55],[146,178],[60,208],[126,128],[142,112],[210,55],[67,63]],[[59092,72066],[19,3],[40,139],[200,-8],[253,172],[-188,-245],[21,-108]],[[59437,72019],[-30,20],[-53,-44],[-42,12],[-14,-22],[-5,59],[-20,35],[-54,6],[-75,-49],[-52,30]],[[59437,72019],[8,-46],[-285,-234],[-136,74],[-64,232],[132,21]],[[53776,79977],[-157,247],[-141,139],[-30,243],[-49,171],[202,125],[103,144],[200,111],[70,110],[73,-66],[124,60]],[[54171,81261],[132,-186],[207,-50],[-17,-158],[151,-119],[41,148],[191,-64],[26,-180],[207,-35],[127,-284]],[[55236,80333],[-82,0],[-43,-104],[-64,-25],[-18,-131],[-54,-28],[-7,-53],[-95,-60],[-123,10],[-39,-127]],[[52756,83493],[4,-222],[281,-135],[-3,-204],[283,108],[156,158],[313,-228],[132,-183]],[[53922,82787],[64,-293],[-77,-154],[101,-205],[69,-308],[-22,-199],[114,-367]],[[52074,79253],[35,410],[140,395],[-400,106],[-131,151]],[[51718,80315],[16,252],[-56,130]],[[51710,81086],[-47,604],[167,0],[70,217],[69,527],[-51,195]],[[51918,82629],[54,122],[232,31],[52,-127],[188,284],[-63,216],[-13,326]],[[52368,83481],[210,-76],[178,88]],[[61966,59143],[66,-178],[-9,-240],[-158,-137],[119,-158]],[[61984,58430],[-102,-308]],[[61882,58122],[-62,103],[-67,-41],[-155,9],[-4,176],[-22,159],[94,269],[98,255]],[[61764,59052],[119,-50],[83,141]],[[53524,83854],[-166,-466],[-291,325],[-39,239],[408,191],[88,-289]],[[52368,83481],[-113,320],[-8,589],[46,155],[80,173],[244,36],[98,159],[223,162],[-9,-296],[-82,-188],[33,-161],[151,-87],[-68,-217],[-83,62],[-200,-415],[76,-280]],[[30080,63183],[34,98],[217,-3],[165,-148],[73,14],[50,-204],[152,11],[-9,-171],[124,-21],[136,-211],[-103,-235],[-132,126],[-127,-25],[-92,28],[-50,-105],[-106,-36],[-43,140],[-92,-83],[-111,-394],[-71,92],[-14,165]],[[30081,62221],[5,157],[-71,172],[68,97],[21,222],[-24,314]],[[53333,65346],[-952,-1097],[-804,-1132],[-392,-257]],[[51185,62860],[-308,-56],[-3,366],[-129,94],[-173,165],[-66,270],[-937,1256],[-937,1257]],[[48632,66212],[-1045,1394]],[[47587,67606],[6,112],[-1,38]],[[47592,67756],[-2,682],[449,425],[277,88],[227,155],[107,288],[324,228],[12,427],[161,50],[126,213],[363,97],[51,224],[-73,122],[-96,608],[-17,350],[-104,369]],[[49397,72082],[267,315],[300,100],[175,238],[268,175],[471,102],[459,47],[140,-85],[262,227],[297,4],[113,-134],[190,35]],[[52339,73106],[-57,-295],[44,-549],[-65,-475],[-171,-322],[24,-433],[227,-344],[3,-139],[171,-232],[118,-1034]],[[52633,69283],[90,-509],[15,-267],[-49,-470],[21,-263],[-36,-315],[24,-362],[-110,-240],[164,-420],[11,-247],[99,-321],[130,105],[219,-267],[122,-361]],[[27693,49869],[148,430],[-60,251],[-106,-267],[-166,252],[56,163],[-47,522],[97,87],[52,359],[105,371],[-20,235],[153,123],[190,230]],[[29063,51742],[38,-438],[-86,-374],[-303,-603],[-334,-227],[-170,-501],[-53,-389],[-157,-237],[-116,291],[-113,62],[-114,-45],[-8,211],[79,137],[-33,240]],[[59700,68819],[-78,-232],[-60,-435],[-75,-300],[-65,-100],[-93,186],[-125,257],[-198,825],[-29,-52],[115,-608],[171,-579],[210,-897],[102,-313],[90,-325],[249,-638],[-55,-100],[9,-374],[323,-517],[49,-118]],[[60240,64499],[-1102,0],[-1077,0],[-1117,0]],[[56944,64499],[0,2120],[0,2048],[-83,464],[71,356],[-43,246],[101,276]],[[56990,70009],[369,10],[268,-152],[275,-171],[129,-89],[214,182],[114,165],[245,48],[198,-73],[75,-286],[65,189],[222,-136],[217,-33],[137,145]],[[59518,69808],[182,-989]],[[61764,59052],[-95,187],[-114,337],[-124,185],[-71,199],[-242,231],[-191,7],[-67,120],[-163,-135],[-168,261],[-87,-430],[-323,121]],[[60119,60135],[-30,230],[120,847],[27,382],[88,177],[204,95],[141,328]],[[60669,62194],[161,-666],[77,-529],[152,-281],[379,-544],[154,-328],[151,-332],[87,-198],[136,-173]],[[47490,75948],[14,410],[-114,250],[393,415],[340,-104],[373,4],[296,-98],[230,30],[449,-19]],[[49471,76836],[111,-224],[511,-262],[101,125],[313,-261],[322,75]],[[50829,76289],[15,-335],[-263,-383],[-356,-122],[-25,-194],[-171,-319],[-107,-469],[108,-329],[-160,-257],[-60,-374],[-210,-115],[-197,-443],[-352,-8],[-265,10],[-174,-203],[-106,-218],[-136,48],[-103,195],[-79,331],[-259,89]],[[47929,73193],[-23,191],[103,216],[38,156],[-96,172],[77,378],[-111,345],[120,48],[11,272],[45,84],[3,449],[129,156],[-78,289],[-162,20],[-47,-72],[-164,-1],[-70,282],[-113,-84],[-101,-146]],[[56753,85111],[32,340],[-102,-72],[-176,204],[-24,331],[351,161],[350,83],[301,-95],[287,17]],[[57772,86080],[42,-100],[-198,-332],[83,-537],[-120,-183]],[[57579,84928],[-229,1],[-239,214],[-121,70],[-237,-102]],[[61882,58122],[-61,-204],[103,-317],[102,-277],[106,-206],[909,-683],[233,3]],[[63274,56438],[-785,-1728],[-362,-26],[-247,-406],[-178,-10],[-76,-182]],[[61626,54086],[-190,0],[-112,195],[-254,-241],[-82,-240],[-185,45],[-62,67],[-65,-16],[-87,6],[-352,489],[-193,0],[-95,189],[0,324],[-145,96]],[[59804,55000],[-164,627],[-127,133],[-48,231],[-141,280],[-171,42],[95,328],[147,14],[42,176]],[[59437,56831],[-4,517]],[[59433,57348],[82,603],[132,161],[28,236],[119,440],[168,285],[112,567],[45,495]],[[57942,91602],[-41,-403],[425,-383],[-256,-435],[323,-655],[-187,-494],[250,-429],[-113,-375],[411,-394],[-105,-294],[-258,-333],[-594,-735]],[[57797,86672],[-504,-46],[-489,-211],[-452,-121],[-161,314],[-269,189],[62,567],[-135,520],[133,335],[252,362],[635,624],[185,121],[-28,243],[-387,272]],[[56639,89841],[-93,225],[-8,886],[-433,392],[-371,282]],[[55734,91626],[167,152],[309,-304],[362,29],[298,-140],[265,255],[137,422],[431,196],[356,-229],[-117,-405]],[[99547,41844],[96,-167],[-46,-300],[-172,-79],[-153,71],[-27,253],[107,198],[126,-71],[69,95]],[[0,42577],[57,26],[-34,-277],[-23,-31],[99822,-141],[-177,-122],[-36,215],[139,118],[88,32],[-99836,180]],[[33000,21970],[333,345],[236,-144],[167,231],[222,-259],[-83,-202],[-375,-173],[-125,202],[-236,-259],[-139,259]],[[34854,53161],[70,246],[24,262],[48,246],[-107,340]],[[34889,54255],[-22,394],[144,495]],[[35011,55144],[95,-63],[204,-136],[294,-486],[46,-236]],[[52655,76104],[-92,-445],[-126,118],[-64,387],[56,214],[179,220],[47,-494]],[[51576,80352],[62,-50],[80,13]],[[51900,78315],[-11,-163],[82,-216],[-97,-176],[72,-445],[151,-73],[-32,-250]],[[52065,76992],[-252,-326],[-548,156],[-404,-186],[-32,-347]],[[49471,76836],[144,345],[53,1147],[-287,605],[-205,291],[-424,222],[-28,420],[360,125],[466,-148],[-88,652],[263,-247],[646,449],[84,472],[243,116]],[[53081,49538],[-285,581],[-184,475],[-169,595],[9,192],[61,184],[67,419],[56,427]],[[52636,52411],[94,33],[404,-6],[-2,693]],[[48278,82851],[-210,118],[-172,-8],[57,309],[-57,309]],[[47896,83579],[233,23],[298,-356],[-149,-395]],[[49165,85596],[-297,-623],[283,79],[304,-3],[-72,-469],[-250,-516],[287,-37],[22,-61],[248,-679],[190,-93],[171,-656],[79,-227],[337,-110],[-34,-368],[-142,-169],[111,-298],[-250,-302],[-371,6],[-473,-159],[-130,114],[-183,-270],[-257,65],[-195,-220],[-148,115],[407,605],[249,125],[-2,0],[-434,96],[-79,229],[291,179],[-152,310],[52,377],[413,-52],[1,0],[40,334],[-186,355],[-4,8],[-337,101],[-66,156],[101,258],[-92,158],[-149,-272],[-17,555],[-140,294],[101,595],[216,467],[222,-45],[335,48]],[[61542,75749],[42,246],[-70,393],[-160,212],[-154,66],[-102,177]],[[61098,76843],[34,68],[235,-99],[409,-93],[378,-276],[48,-107],[169,90],[259,-120],[85,-236],[175,-134]],[[62106,75494],[-268,282],[-296,-27]],[[50294,55244],[-436,-337],[-154,-198],[-250,-167],[-248,164]],[[50006,58175],[-20,-180],[116,-297],[-1,-418],[27,-454],[69,-210],[-61,-518],[22,-287],[74,-365],[62,-202]],[[47655,56256],[-78,14],[-57,-232],[-78,3],[-55,123],[19,231],[-116,353],[-73,-65],[-59,-13]],[[47158,56670],[-77,-33],[3,211],[-44,151],[9,168],[-60,242],[-78,206],[-222,0],[-65,-108],[-76,-13],[-48,-125],[-32,-159],[-148,-254]],[[46320,56956],[-122,341],[-108,226],[-71,74],[-69,115],[-32,254],[-41,127],[-80,94]],[[45797,58187],[123,281],[84,-11],[73,97],[61,1],[44,76],[-24,191],[31,60],[5,195]],[[46194,59077],[134,-5],[200,-141],[61,13],[21,64],[151,-45],[40,32]],[[46801,58995],[16,-211],[44,1],[73,77],[46,-20],[77,-146],[119,-46],[76,125],[90,77],[67,80],[55,-15],[62,-126],[33,-159],[114,-241],[-57,-149],[-11,-187],[59,57],[35,-67],[-15,-172],[85,-166]],[[45321,59403],[36,255]],[[45357,59658],[302,17],[63,136],[88,10],[110,-142],[86,-3],[92,97],[56,-166],[-120,-130],[-121,11],[-119,121],[-103,-133],[-50,-5],[-67,-80],[-253,12]],[[45797,58187],[-149,241],[-117,38],[-63,162],[1,88],[-84,122],[-18,124]],[[45367,58962],[147,93],[92,-18],[75,65],[513,-25]],[[52636,52411],[-52,87],[96,647]],[[56583,72391],[152,-194],[216,33],[207,-41],[-7,-100],[151,69],[-35,-170],[-400,-49],[3,95],[-339,112],[52,245]],[[57237,75339],[-169,17],[-145,54],[-336,-150],[192,-323],[-141,-94],[-154,-1],[-147,297],[-52,-127],[62,-344],[139,-270],[-105,-126],[155,-265],[137,-167],[4,-326],[-257,153],[82,-294],[-176,-60],[105,-509],[-184,-7],[-228,251],[-104,460],[-49,384],[-108,264],[-143,329],[-18,164]],[[55838,75350],[182,51],[106,126],[150,-11],[46,100],[53,19]],[[57254,75917],[135,-153],[-86,-360],[-66,-65]],[[37010,99413],[932,344],[975,-26],[354,213],[982,55],[2219,-72],[1737,-457],[-513,-222],[-1062,-25],[-1496,-56],[140,-103],[984,63],[836,-198],[540,176],[231,-206],[-305,-335],[707,214],[1348,223],[833,-111],[156,-246],[-1132,-410],[-157,-133],[-888,-99],[643,-28],[-324,-420],[-224,-373],[9,-641],[333,-376],[-434,-24],[-457,-182],[513,-305],[65,-490],[-297,-53],[360,-495],[-617,-42],[322,-234],[-91,-203],[-391,-89],[-388,-2],[348,-390],[4,-256],[-549,238],[-143,-154],[375,-144],[364,-352],[105,-464],[-495,-111],[-214,222],[-344,331],[95,-391],[-322,-303],[732,-24],[383,-31],[-745,-502],[-755,-454],[-813,-199],[-306,-2],[-288,-222],[-386,-608],[-597,-404],[-192,-23],[-370,-142],[-399,-134],[-238,-357],[-4,-403],[-141,-378],[-453,-461],[112,-450],[-125,-476],[-142,-563],[-391,-35],[-410,471],[-556,3],[-269,315],[-186,563],[-481,716],[-141,375],[-38,517],[-384,532],[100,424],[-186,203],[275,673],[418,214],[110,241],[58,450],[-318,-204],[-151,-85],[-249,-83],[-341,188],[-19,392],[109,306],[258,8],[567,-153],[-478,366],[-249,197],[-276,-81],[-232,143],[310,536],[-169,215],[-220,398],[-335,611],[-353,223],[3,241],[-745,337],[-590,42],[-743,-23],[-677,-42],[-323,183],[-482,362],[729,181],[559,31],[-1188,149],[-627,236],[39,223],[1051,277],[1018,277],[107,210],[-750,206],[243,230],[961,402],[404,62],[-115,258],[658,152],[854,90],[853,6],[303,-180],[737,317],[663,-215],[390,-45],[577,-188],[-660,311],[38,246]],[[24973,59739],[-142,101],[-174,10],[-127,114],[-149,238]],[[24381,60202],[7,168],[32,135],[-39,107],[133,470],[357,1],[7,197],[-45,35],[-31,124],[-103,133],[-103,193],[125,1],[1,324],[259,1],[257,-6]],[[25297,60979],[90,-105],[24,86],[82,-73]],[[25493,60887],[-127,-220],[-131,-161],[-20,-111],[22,-113],[-58,-146]],[[25179,60136],[-65,-36],[15,-67],[-52,-64],[-95,-145],[-9,-85]],[[33400,56648],[183,-212],[171,-375],[8,-297],[105,-13],[149,-281],[109,-201]],[[34125,55269],[-44,-518],[-169,-150],[15,-136],[-51,-297],[123,-418],[89,-1],[37,-325],[169,-501]],[[33129,54824],[-188,437],[75,159],[-5,265],[171,93],[69,108],[-95,213],[24,210],[220,339]],[[25745,59307],[-48,180],[-84,50]],[[25613,59537],[19,231],[-38,62],[-57,41],[-122,-68],[-10,77],[-84,93],[-60,114],[-82,49]],[[25493,60887],[29,-23],[61,101],[79,9],[26,-47],[43,28],[129,-52],[128,15],[90,64],[32,65],[89,-30],[66,-39],[73,13],[55,50],[127,-80],[44,-13],[85,-107],[80,-129],[101,-88],[73,-159]],[[26903,60465],[-95,12],[-38,-79],[-97,-75],[-70,0],[-61,-73],[-56,26],[-47,88],[-29,-17],[-36,-138],[-27,5],[-4,-118],[-97,-159],[-51,-68],[-29,-72],[-82,117],[-60,-154],[-58,4],[-65,-14],[6,-283],[-41,-5],[-35,-131],[-86,-24]],[[55230,78267],[67,-223],[89,-164],[-107,-217]],[[55155,76391],[-31,-98]],[[55124,76293],[-261,213],[-161,207],[-254,171],[-233,424],[56,43],[-127,242],[-5,195],[-179,91],[-85,-249],[-82,193],[6,200],[10,9]],[[53809,78032],[194,-20],[51,98],[94,-94],[109,-12],[-1,161],[97,59],[27,233],[221,153]],[[54601,78610],[88,-71],[208,-247],[229,-111],[104,86]],[[30081,62221],[-185,98],[-131,-40],[-169,42],[-130,-108],[-149,179],[24,186],[256,-80],[210,-46],[100,128],[-127,250],[2,220],[-175,89],[62,159],[170,-25],[241,-90]],[[54716,79543],[141,-148],[103,-62],[233,70],[22,116],[111,17],[135,89],[30,-37],[130,72],[66,136],[91,35],[297,-175],[59,59]],[[56134,79715],[155,-157],[19,-154]],[[56308,79404],[-170,-121],[-131,-391],[-168,-390],[-223,-109]],[[55616,78393],[-173,26],[-213,-152]],[[54601,78610],[-54,194],[-47,7]],[[83531,45933],[-117,-11],[-368,403],[259,113],[146,-175],[97,-175],[-17,-155]],[[84713,46708],[28,-113],[5,-175]],[[84746,46420],[-181,-430],[-238,-127],[-33,69],[25,196],[119,351],[275,229]],[[82749,47167],[100,-153],[172,47],[69,-245],[-321,-116],[-193,-77],[-149,4],[95,332],[153,5],[74,203]],[[84139,47168],[-41,-320],[-417,-163],[-370,71],[0,210],[220,120],[174,-173],[185,44],[249,211]],[[80172,47926],[533,-57],[61,237],[515,-277],[101,-373],[417,-105],[341,-342],[-317,-220],[-306,232],[-251,-15],[-288,42],[-260,104],[-322,220],[-204,57],[-116,-72],[-506,237],[-48,247],[-255,43],[191,550],[337,-34],[224,-225],[115,-44],[38,-205]],[[87423,48251],[-143,-393],[-27,434],[49,207],[58,195],[63,-169],[0,-274]],[[85346,49837],[-104,-191],[-192,106],[-54,248],[281,27],[69,-190]],[[86241,50048],[101,-441],[-234,238],[-232,48],[-157,-38],[-192,20],[65,317],[344,24],[305,-168]],[[89166,50332],[5,-1877],[4,-1876]],[[89175,46579],[-247,472],[-282,116],[-69,-164],[-352,-18],[118,469],[175,160],[-72,626],[-134,483],[-538,488],[-229,48],[-417,532],[-82,-279],[-107,-51],[-63,211],[-1,250],[-212,283],[299,207],[198,-11],[-23,153],[-407,1],[-110,343],[-248,106],[-117,285],[374,140],[142,188],[446,-237],[44,-214],[78,-931],[287,-345],[232,611],[319,347],[247,1],[238,-201],[206,-206],[298,-110]],[[84788,52647],[-223,-571],[-209,-111],[-267,113],[-463,-29],[-243,-83],[-39,-436],[248,-512],[150,261],[518,196],[-22,-265],[-121,83],[-121,-337],[-245,-223],[263,-738],[-50,-198],[249,-665],[-2,-378],[-148,-170],[-109,203],[134,471],[-273,-222],[-69,159],[36,222],[-200,338],[21,561],[-186,-175],[24,-671],[11,-824],[-176,-84],[-119,169],[79,530],[-43,556],[-117,4],[-86,395],[115,377],[40,457],[139,868],[58,238],[237,427],[217,-170],[350,-80],[319,24],[275,419],[48,-129]],[[85746,52481],[-15,-503],[-143,57],[-42,-351],[114,-304],[-78,-69],[-112,365],[-82,736],[56,460],[92,210],[20,-315],[164,-50],[26,-236]],[[80461,52985],[47,-385],[190,-325],[179,117],[177,-42],[162,291],[133,51],[263,-162],[226,123],[143,801],[107,200],[96,655],[319,0],[241,-97]],[[82744,54212],[-158,-520],[204,-545],[-48,-265],[312,-533],[-329,-68],[-93,-393],[12,-522],[-267,-393],[-7,-574],[-107,-881],[-41,205],[-316,-259],[-110,352],[-198,33],[-139,184],[-330,-207],[-101,279],[-182,-32],[-229,67],[-43,772],[-138,160],[-134,493],[-38,504],[32,533],[165,383]],[[79393,48459],[-308,-12],[-234,481],[-356,471],[-119,349],[-210,469],[-138,432],[-212,806],[-244,480],[-81,495],[-103,449],[-250,363],[-145,493],[-209,322],[-290,635],[-24,293],[178,-23],[430,-111],[246,-564],[215,-390],[153,-240],[263,-619],[283,-9],[233,-394],[161,-482],[211,-263],[-111,-471],[159,-200],[100,-14],[47,-402],[97,-321],[204,-51],[135,-365],[-70,-716],[-11,-891]],[[72530,69211],[-176,-261],[-108,-538],[269,-218],[262,-283],[362,-323],[381,-75],[160,-293],[215,-54],[334,-135],[231,10],[32,228],[-36,366],[21,248]],[[77035,68105],[20,-219],[-97,-105],[23,-355],[-199,104],[-359,-397],[8,-330],[-153,-483],[-14,-281],[-124,-474],[-217,131],[-11,-596],[-63,-196],[30,-245],[-137,-137]],[[74730,64531],[-39,-210],[-189,7],[-343,-120],[16,-433],[-148,-341],[-400,-387],[-311,-678],[-209,-363],[-276,-377],[-1,-265],[-138,-142],[-251,-206],[-129,-31],[-84,-439],[58,-749],[15,-478],[-118,-547],[-1,-978],[-144,-28],[-126,-439],[84,-190],[-253,-163],[-93,-392],[-112,-165],[-263,537],[-128,807],[-107,581],[-97,272],[-148,553],[-69,720],[-48,360],[-253,791],[-115,1116],[-83,737],[1,698],[-54,539],[-404,-345],[-196,69],[-362,698],[133,208],[-82,226],[-326,489]],[[68937,65473],[185,384],[612,-1],[-56,494],[-156,292],[-31,444],[-182,258],[306,604],[323,-44],[290,604],[174,584],[270,578],[-4,411],[236,333],[-224,284],[-96,390],[-99,504],[137,249],[421,-141],[310,86],[268,484]],[[48278,82851],[46,-412],[-210,-514],[-493,-340],[-393,87],[225,601],[-145,586],[378,451],[210,269]],[[64978,73251],[244,112],[197,329],[186,-17],[122,108],[197,-53],[308,-292],[221,-63],[318,-510],[207,-21],[24,-484]],[[66909,69007],[137,-302],[112,-348],[266,-253],[7,-508],[133,-93],[23,-265],[-400,-298],[-105,-669]],[[67082,66271],[-523,174],[-303,133],[-313,74],[-118,707],[-133,102],[-214,-103],[-280,-279],[-339,191],[-281,443],[-267,164],[-186,546],[-205,768],[-149,-93],[-177,190],[-104,-224]],[[63490,69064],[-153,302],[-3,307],[-89,0],[46,417],[-143,438],[-340,315],[-193,548],[65,449],[139,199],[-21,336],[-182,173],[-180,687]],[[62436,73235],[-152,461],[55,179],[-87,660],[190,164]],[[63578,73897],[88,-424],[263,-120],[193,-289],[395,-100],[434,153],[27,134]],[[63490,69064],[-164,28]],[[63326,69092],[-187,48],[-204,-553]],[[62935,68587],[-516,46],[-784,1158],[-413,403],[-335,156]],[[60887,70350],[-112,701]],[[60775,71051],[615,600],[105,696],[-26,421],[152,142],[142,359]],[[61763,73269],[119,90],[324,-75],[97,-146],[133,97]],[[45969,90100],[-64,-373],[314,-392],[-361,-440],[-801,-394],[-240,-105],[-365,85],[-775,182],[273,254],[-605,282],[492,112],[-12,169],[-583,134],[188,375],[421,85],[433,-391],[422,314],[349,-163],[453,307],[461,-41]],[[59922,70666],[-49,-182]],[[59873,70484],[-100,80],[-58,-383],[69,-65],[-71,-79],[-12,-152],[131,78]],[[59832,69963],[7,-224],[-139,-920]],[[59518,69808],[80,190],[-19,32],[74,270],[56,434],[40,146],[8,6]],[[59757,70886],[93,-1],[25,101],[75,7]],[[59950,70993],[4,-236],[-38,-87],[6,-4]],[[54311,73846],[-100,-453],[41,-179],[-58,-296],[-213,217],[-141,62],[-387,293],[38,296],[325,-53],[284,63],[211,50]],[[52558,75561],[166,-408],[-39,-762],[-126,36],[-113,-192],[-105,153],[-11,694],[-64,330],[153,-29],[139,178]],[[53835,78613],[-31,-283],[67,-246]],[[53871,78084],[-221,84],[-226,-204],[15,-286],[-34,-164],[91,-293],[261,-290],[140,-476],[309,-464],[217,3],[68,-127],[-78,-115],[249,-208],[204,-174],[238,-301],[29,-107],[-52,-206],[-154,268],[-242,95],[-116,-372],[200,-214],[-33,-300],[-116,-34],[-148,-494],[-116,-45],[1,176],[57,309],[60,123],[-108,334],[-85,290],[-115,72],[-82,249],[-179,104],[-120,232],[-206,37],[-217,260],[-254,375],[-189,332],[-86,569],[-138,67],[-226,190],[-128,-78],[-161,-267],[-115,-42]],[[28453,62478],[187,-52],[147,-138],[46,-158],[-195,-11],[-84,-96],[-156,92],[-159,210],[34,132],[116,40],[64,-19]],[[59922,70666],[309,-228],[544,613]],[[60887,70350],[-53,-87],[-556,-289],[277,-575],[-92,-98],[-46,-193],[-212,-80],[-66,-207],[-120,-177],[-310,91]],[[59709,68735],[-9,84]],[[59832,69963],[41,169],[0,352]],[[87399,71495],[35,-197],[-156,-349],[-114,185],[-143,-134],[-73,-337],[-181,164],[2,273],[154,344],[158,-67],[114,242],[204,-124]],[[89159,73219],[-104,-460],[48,-288],[-145,-406],[-355,-271],[-488,-36],[-396,-657],[-186,221],[-12,431],[-483,-127],[-329,-271],[-325,-11],[282,-424],[-186,-979],[-179,-242],[-135,224],[69,519],[-176,167],[-113,395],[263,177],[145,362],[280,298],[203,394],[553,171],[297,-117],[291,1024],[185,-275],[408,575],[158,224],[174,704],[-47,648],[117,364],[295,105],[152,-798],[-9,-467],[-256,-580],[4,-594]],[[89974,77268],[195,-122],[197,244],[62,-647],[-412,-157],[-244,-572],[-436,393],[-152,-630],[-308,-9],[-39,573],[138,443],[296,32],[81,797],[83,449],[326,-600],[213,-194]],[[69711,76170],[-159,-107],[-367,-401],[-121,-412],[-104,-4],[-76,273],[-353,18],[-57,472],[-135,4],[21,578],[-333,421],[-476,-45],[-326,-84],[-265,519],[-227,218],[-431,412],[-52,50],[-715,-340],[11,-2124]],[[65546,75618],[-142,-28],[-195,452],[-188,161],[-315,-120],[-123,-191]],[[64583,75892],[-15,140],[68,240],[-53,201],[-322,196],[-125,517],[-154,146],[-9,187],[270,-54],[11,421],[236,93],[243,-86],[50,562],[-50,356],[-278,-28],[-236,141],[-321,-253],[-259,-121]],[[63639,78550],[-142,93],[29,296],[-177,385],[-207,-16],[-235,391],[160,436],[-81,118],[222,632],[285,-334],[35,421],[573,626],[434,15],[612,-399],[329,-233],[295,243],[440,12],[356,-298],[80,170],[391,-24],[69,272],[-450,396],[267,281],[-52,157],[266,150],[-200,394],[127,197],[1039,200],[136,142],[695,213],[250,239],[499,-124],[88,-597],[290,140],[356,-197],[-23,-314],[267,33],[696,543],[-102,-180],[355,-445],[620,-1463],[148,302],[383,-332],[399,148],[154,-104],[133,-332],[194,-112],[119,-244],[358,77],[147,-353]],[[72294,76218],[-171,84],[-140,207],[-412,61],[-461,15],[-100,-63],[-396,242],[-158,-119],[-43,-340],[-457,198],[-183,-81],[-62,-252]],[[61551,50860],[-195,-230],[-68,-240],[-104,-42],[-40,-406],[-89,-233],[-54,-383],[-112,-190]],[[60889,49136],[-399,576],[-19,334],[-1007,1173],[-47,63]],[[59417,51282],[-3,611],[80,233],[137,381],[101,420],[-123,661],[-32,289],[-132,400]],[[59445,54277],[171,344],[188,379]],[[61626,54086],[-243,-653],[3,-2098],[165,-475]],[[70465,74537],[-526,-87],[-343,187],[-301,-45],[26,332],[303,-96],[101,177]],[[69725,75005],[212,-56],[355,414],[-329,304],[-198,-144],[-205,217],[234,373],[-83,57]],[[78495,58847],[-66,696],[178,479],[359,110],[261,-83]],[[79227,60049],[229,-226],[126,397],[246,-212]],[[79828,60008],[64,-384],[-34,-690],[-467,-443],[122,-349],[-292,-42],[-240,-232]],[[78981,57868],[-233,84],[-112,301],[-141,594]],[[85652,74065],[240,-679],[68,-373],[3,-664],[-105,-316],[-252,-111],[-222,-239],[-250,-49],[-31,313],[51,432],[-122,600],[206,97],[-190,493]],[[85048,73569],[17,52],[124,-21],[108,260],[197,28],[118,38],[40,139]],[[55575,76355],[52,129]],[[55627,76484],[66,42],[38,191],[50,32],[40,-81],[52,-36],[36,-92],[46,-27],[54,-107],[39,3],[-31,-140],[-33,-68],[9,-43]],[[55993,76158],[-62,-23],[-164,-89],[-13,-118],[-35,5]],[[63326,69092],[58,-254],[-25,-132],[89,-434]],[[63448,68272],[-196,-15],[-69,274],[-248,56]],[[79227,60049],[90,260],[12,487],[-224,502],[-18,568],[-211,468],[-210,40],[-56,-201],[-163,-17],[-83,102],[-293,-344],[-6,517],[68,606],[-188,27],[-16,346],[-120,178]],[[77809,63588],[59,212],[237,374]],[[78380,64766],[162,-454],[125,-524],[342,-4],[108,-502],[-178,-151],[-80,-207],[333,-345],[231,-680],[175,-508],[210,-400],[70,-407],[-50,-576]],[[59757,70886],[99,469],[138,406],[5,20]],[[59999,71781],[125,-30],[45,-226],[-151,-217],[-68,-315]],[[47857,54343],[-73,-5],[-286,274],[-252,439],[-237,315],[-187,371]],[[46822,55737],[66,184],[15,168],[126,313],[129,268]],[[54125,64996],[-197,-214],[-156,316],[-439,248]],[[52633,69283],[136,133],[24,244],[-30,238],[191,222],[86,185],[135,165],[16,442]],[[53191,70912],[326,-198],[117,50],[232,-96],[368,-258],[130,-512],[250,-111],[391,-242],[296,-286],[136,150],[133,264],[-65,442],[87,280],[200,270],[192,78],[375,-118],[95,-257],[104,-3],[88,-98],[276,-67],[68,-191]],[[56944,64499],[0,-1150],[-320,-2],[-3,-242]],[[56621,63105],[-1108,1103],[-1108,1103],[-280,-315]],[[72718,56162],[-42,-600],[-116,-164],[-242,-132],[-132,458],[-49,828],[126,935],[192,-320],[129,-406],[134,-599]],[[58049,35154],[96,-173],[-85,-281],[-47,-187],[-155,-90],[-51,-184],[-99,-58],[-209,443],[148,365],[151,225],[130,118],[121,-178]],[[56314,83116],[-23,147],[30,157],[-123,92],[-291,100]],[[55907,83612],[-59,485]],[[55848,84097],[318,176],[466,-37],[273,57],[39,-120],[148,-37],[267,-279]],[[56523,82877],[-67,177],[-142,62]],[[55848,84097],[10,433],[136,362],[262,196],[221,-430],[223,11],[53,442]],[[57579,84928],[134,-133],[24,-279],[89,-340]],[[47592,67756],[-42,0],[7,-308],[-172,-19],[-90,-131],[-126,0],[-100,75],[-234,-62],[-91,-449],[-86,-42],[-131,-726],[-386,-621],[-92,-796],[-114,-258],[-33,-208],[-625,-46],[-5,1]],[[45272,64166],[13,267],[106,157],[91,300],[-18,195],[96,406],[155,366],[93,93],[74,336],[6,307],[100,356],[185,210],[177,588],[5,8],[139,221],[259,64],[218,393],[140,154],[232,481],[-70,716],[106,495],[37,304],[179,389],[278,263],[206,238],[186,596],[87,354],[205,-3],[167,-244],[264,39],[288,-127],[121,-6]],[[57394,79599],[66,85],[185,57],[204,-180],[115,-21],[125,-155],[-20,-195],[101,-95],[40,-240],[97,-147],[-19,-86],[52,-58],[-74,-43],[-164,17],[-27,80],[-58,-46],[20,-103],[-76,-184],[-49,-197],[-70,-63]],[[57842,78025],[-50,263],[30,246],[-9,253],[-160,342],[-89,243],[-86,171],[-84,56]],[[63761,44648],[74,-245],[69,-380],[45,-693],[72,-269],[-28,-277],[-49,-169],[-94,338],[-53,-171],[53,-427],[-24,-244],[-77,-133],[-18,-488],[-109,-671],[-137,-793],[-172,-1092],[-106,-800],[-125,-668],[-226,-136],[-243,-244],[-160,147],[-220,206],[-77,304],[-18,510],[-98,460],[-26,414],[50,415],[128,100],[1,191],[133,437],[25,367],[-65,272],[-52,364],[-23,530],[97,322],[38,366],[138,21],[155,118],[103,104],[122,8],[158,328],[229,355],[83,289],[-38,247],[118,-70],[153,401],[6,346],[92,257],[96,-247]],[[23016,66727],[-107,-505],[-49,-415],[-20,-771],[-27,-281],[48,-315],[86,-280],[56,-447],[184,-429],[65,-328],[109,-284],[295,-153],[114,-241],[244,161],[212,58],[208,104],[175,99],[176,235],[67,336],[22,483],[48,169],[188,151],[294,133],[246,-20],[169,49],[66,-122],[-9,-278],[-149,-342],[-66,-351],[51,-100],[-42,-249],[-69,-449],[-71,148],[-58,-10]],[[24381,60202],[-314,620],[-144,187],[-226,150],[-156,-42],[-223,-216],[-140,-57],[-196,152],[-208,109],[-260,264],[-208,81],[-314,268],[-233,275],[-70,154],[-155,34],[-284,183],[-116,262],[-299,327],[-139,363],[-66,281],[93,56],[-29,164],[64,150],[1,199],[-93,259],[-25,229],[-94,290],[-244,573],[-280,450],[-135,359],[-238,235],[-51,140],[42,356],[-142,135],[-164,279],[-69,402],[-149,47],[-162,303],[-130,281],[-12,180],[-149,434],[-99,441],[5,221],[-201,229],[-93,-26],[-159,159],[-44,-234],[46,-276],[27,-433],[95,-237],[206,-397],[46,-135],[42,-41],[37,-198],[49,8],[56,-372],[85,-146],[59,-204],[174,-293],[92,-536],[83,-252],[77,-270],[15,-304],[134,-19],[112,-261],[100,-257],[-6,-104],[-117,-211],[-49,3],[-74,350],[-181,328],[-201,278],[-142,147],[9,421],[-42,312],[-132,179],[-191,257],[-37,-75],[-70,151],[-171,139],[-164,334],[20,44],[115,-33],[103,215],[10,260],[-214,411],[-163,159],[-102,360],[-103,377],[-129,461],[-113,518]],[[17464,70566],[316,44],[353,63],[-26,-113],[419,-280],[634,-406],[552,5],[221,0],[0,237],[481,0],[102,-204],[142,-182],[165,-253],[92,-301],[69,-317],[144,-174],[230,-172],[175,455],[227,11],[196,-230],[139,-394],[96,-338],[164,-328],[61,-403],[78,-271],[217,-178],[197,-127],[108,17]],[[55993,76158],[95,33],[128,10]],[[46619,60247],[93,105],[47,339],[88,13],[194,-160],[157,114],[107,-38],[42,128],[1114,8],[62,404],[-48,71],[-134,2485],[-134,2485],[425,11]],[[51185,62860],[1,-1326],[-152,-384],[-24,-355],[-247,-92],[-379,-49],[-102,-205],[-178,-22]],[[46801,58995],[13,179],[-24,223],[-104,162],[-54,330],[-13,358]],[[77375,57550],[-27,427],[86,441],[-94,341],[23,627],[-113,299],[-90,689],[-50,727],[-121,477],[-183,-289],[-315,-410],[-156,51],[-172,135],[96,714],[-58,539],[-218,664],[34,208],[-163,74],[-197,469]],[[77809,63588],[-159,-134],[-162,-249],[-196,-26],[-127,-623],[-117,-104],[134,-506],[177,-420],[113,-380],[-101,-501],[-96,-106],[66,-289],[185,-458],[32,-321],[-4,-268],[108,-525],[-152,-537],[-135,-591]],[[55380,75946],[-58,44],[-78,188],[-120,115]],[[55338,76894],[74,-99],[40,-80],[91,-62],[106,-119],[-22,-50]],[[74375,80219],[292,99],[530,496],[423,271],[242,-176],[289,-9],[186,-269],[277,-21],[402,-144],[270,401],[-113,339],[288,596],[311,-238],[252,-67],[327,-148],[53,-432],[394,-242],[263,107],[351,75],[279,-76],[272,-276],[168,-295],[258,6],[350,-94],[255,143],[366,96],[407,405],[166,-62],[146,-193],[331,48]],[[59599,45195],[209,47],[334,-163],[73,73],[193,15],[99,173],[167,-10],[303,224],[221,334]],[[61198,45888],[45,-258],[-11,-574],[34,-505],[11,-900],[49,-282],[-83,-412],[-108,-400],[-177,-357],[-254,-219],[-313,-279],[-313,-618],[-107,-106],[-194,-409],[-115,-133],[-23,-411],[132,-436],[54,-337],[4,-173],[49,29],[-8,-565],[-45,-267],[65,-99],[-41,-239],[-116,-205],[-229,-195],[-334,-312],[-122,-213],[24,-242],[71,-39],[-24,-303]],[[59119,36429],[-211,5]],[[58908,36434],[-24,254],[-41,259]],[[58843,36947],[-23,206],[49,642],[-72,410],[-133,810]],[[58664,39015],[292,654],[74,415],[42,52],[31,339],[-45,171],[12,430],[54,400],[0,728],[-145,185],[-132,42],[-60,143],[-128,121],[-232,-11],[-18,215]],[[58409,42899],[-26,410],[843,474]],[[59226,43783],[159,-276],[77,53],[110,-146],[16,-231],[-59,-268],[21,-405],[181,-356],[85,399],[120,122],[-24,740],[-116,417],[-100,185],[-97,-8],[-77,748],[77,438]],[[46619,60247],[-184,395],[-168,424],[-184,153],[-133,169],[-155,-6],[-135,-126],[-138,50],[-96,-185]],[[45426,61121],[-24,311],[78,283],[34,543],[-30,569],[-34,286],[28,287],[-72,274],[-146,249]],[[45260,63923],[60,192],[1088,-4],[-53,832],[68,296],[261,51],[-9,1474],[911,-30],[1,872]],[[59226,43783],[-147,149],[85,535],[87,201],[-53,477],[56,467],[47,156],[-71,489],[-131,257]],[[59099,46514],[273,-108],[55,-159],[95,-269],[77,-783]],[[78372,55412],[64,-54],[164,-347],[116,-386],[16,-388],[-29,-262],[27,-198],[20,-340],[98,-159],[109,-509],[-5,-195],[-197,-38],[-263,426],[-329,457],[-32,294],[-161,385],[-38,477],[-100,314],[30,419],[-61,244]],[[77801,55552],[48,103],[227,-252],[22,-296],[183,69],[91,236]],[[80461,52985],[204,-198],[214,108],[56,488],[119,108],[333,125],[199,456],[137,364]],[[82069,54967],[214,400],[140,450],[112,2],[143,-291],[13,-251],[183,-160],[231,-173],[-20,-226],[-186,-29],[50,-281],[-205,-196]],[[54540,35373],[-207,435],[-108,420],[-62,561],[-68,417],[-93,887],[-7,689],[-35,314],[-108,237],[-144,476],[-146,691],[-60,361],[-226,563],[-17,441]],[[56448,41738],[228,131],[180,-33],[109,-130],[2,-48]],[[55526,37566],[0,-2127],[-248,-294],[-149,-42],[-175,108],[-125,42],[-47,247],[-109,157],[-133,-284]],[[96049,39690],[228,-357],[144,-265],[-105,-138],[-153,155],[-199,259],[-179,306],[-184,406],[-38,195],[119,-8],[156,-196],[122,-196],[89,-161]],[[54125,64996],[68,-895],[104,-150],[4,-183],[116,-198],[-60,-248],[-107,-1168],[-15,-749],[-354,-543],[-120,-759],[115,-213],[0,-371],[178,-13],[-28,-271]],[[53939,59018],[-52,-12],[-188,630],[-65,23],[-217,-322],[-215,168],[-150,34],[-80,-81],[-163,17],[-164,-245],[-141,-14],[-337,298],[-131,-142],[-142,10],[-104,218],[-279,214],[-298,-68],[-72,-124],[-39,-331],[-80,-233],[-19,-514]],[[52361,54577],[-289,-207],[-105,30],[-107,-129],[-222,13],[-149,360],[-91,417],[-197,379],[-209,-7],[-245,1]],[[26191,58215],[-96,181],[-130,233],[-61,194],[-117,181],[-140,260],[31,89],[46,-87],[21,41]],[[26903,60465],[-24,-55],[-14,-129],[29,-210],[-64,-197],[-30,-231],[-9,-254],[15,-148],[7,-260],[-43,-56],[-26,-247],[19,-152],[-56,-147],[12,-156],[43,-94]],[[50920,81398],[143,159],[244,847],[380,241],[231,-16]],[[58639,91887],[-473,-231],[-224,-54]],[[55734,91626],[-172,-23],[-41,-379],[-523,92],[-74,-321],[-267,2],[-183,-409],[-278,-639],[-431,-810],[101,-197],[-97,-228],[-275,10],[-180,-540],[17,-765],[177,-292],[-92,-677],[-231,-395],[-122,-332]],[[53063,85723],[-187,354],[-548,-666],[-371,-135],[-384,293],[-99,619],[-88,1329],[256,371],[733,483],[549,595],[508,802],[668,1112],[465,434],[763,722],[610,252],[457,-31],[423,477],[506,-25],[499,115],[869,-422],[-358,-154],[305,-361]],[[56867,96664],[-620,-236],[-490,134],[191,149],[-167,184],[575,115],[110,-216],[401,-130]],[[55069,97728],[915,-429],[-699,-227],[-155,-424],[-243,-108],[-132,-478],[-335,-22],[-598,351],[252,205],[-416,166],[-541,487],[-216,451],[757,206],[152,-202],[396,8],[105,197],[408,20],[350,-201]],[[57068,98134],[545,-202],[-412,-310],[-806,-68],[-819,96],[-50,159],[-398,10],[-304,264],[858,161],[403,-138],[281,172],[702,-144]],[[98060,28265],[63,-238],[198,233],[80,-243],[0,-242],[-103,-267],[-182,-424],[-142,-232],[103,-277],[-214,-7],[-238,-217],[-75,-377],[-157,-583],[-219,-257],[-138,-164],[-256,12],[-180,190],[-302,40],[-46,212],[149,427],[349,568],[179,109],[200,219],[238,301],[167,299],[123,429],[106,146],[41,321],[195,267],[61,-245]],[[98502,31008],[202,-607],[5,394],[126,-158],[41,-435],[224,-188],[188,-46],[158,220],[141,-67],[-67,-511],[-85,-336],[-212,12],[-74,-175],[26,-248],[-41,-107],[-105,-310],[-138,-395],[-214,-229],[-48,151],[-116,83],[160,474],[-91,317],[-299,230],[8,209],[201,200],[47,444],[-13,372],[-113,386],[8,102],[-133,237],[-218,510],[-117,408],[104,45],[151,-320],[216,-149],[78,-513]],[[64752,61418],[-91,403],[-217,950]],[[64444,62771],[833,576],[185,1152],[-127,408]],[[65665,66183],[125,-393],[155,-209],[203,-76],[165,-105],[125,-330],[75,-191],[100,-73],[-1,-128],[-101,-344],[-44,-161],[-117,-184],[-104,-395],[-126,30],[-58,-137],[-44,-292],[34,-385],[-26,-71],[-128,2],[-174,-215],[-27,-281],[-63,-121],[-173,4],[-109,-145],[1,-232],[-134,-160],[-153,54],[-186,-194],[-128,-33]],[[65575,66834],[80,196],[35,-50],[-26,-238],[-37,-104]],[[68937,65473],[-203,146],[-83,414],[-215,438],[-512,-108],[-451,-11],[-391,-81]],[[28366,55989],[-93,166],[-59,311],[68,154],[-70,40],[-52,190],[-138,160],[-122,-37],[-56,-200],[-112,-145],[-61,-20],[-27,-120],[132,-312],[-75,-74],[-40,-85],[-130,-29],[-48,344],[-36,-98],[-92,33],[-56,232],[-114,38],[-72,68],[-119,-1],[-8,-125],[-32,87]],[[27070,57338],[100,-206],[-6,-122],[111,-26],[26,47],[77,-142],[136,42],[119,145],[168,116],[95,172],[153,-33],[-10,-57],[155,-20],[124,-99],[90,-173],[105,-159]],[[30452,41263],[-279,331],[-24,236],[-551,578],[-498,630],[-214,355],[-115,476],[46,166],[-236,755],[-274,1063],[-262,1147],[-114,262],[-87,424],[-216,376],[-198,233],[90,257],[-134,550],[86,403],[221,364]],[[85104,56675],[28,-382],[16,-323],[-94,-527],[-102,587],[-130,-292],[89,-425],[-79,-270],[-327,335],[-78,416],[84,274],[-176,273],[-87,-239],[-131,22],[-205,-321],[-46,168],[109,486],[175,161],[151,217],[98,-260],[212,157],[45,257],[196,16],[-16,445],[225,-273],[23,-290],[20,-212]],[[84439,57749],[-100,-190],[-87,-363],[-87,-171],[-171,398],[57,154],[70,162],[30,357],[153,34],[-44,-388],[205,556],[-26,-549]],[[82917,57194],[-369,-546],[136,403],[200,355],[167,399],[146,572],[49,-470],[-183,-317],[-146,-396]],[[83856,58678],[166,-179],[177,1],[-5,-240],[-129,-245],[-176,-173],[-10,268],[20,293],[-43,275]],[[84861,58834],[78,-643],[-214,152],[5,-193],[68,-355],[-132,-129],[-11,405],[-84,30],[-43,348],[163,-46],[-4,218],[-169,440],[266,-13],[77,-214]],[[83757,59356],[-74,-498],[-119,288],[-142,438],[238,-21],[97,-207]],[[83700,62485],[171,-164],[85,150],[26,-146],[-46,-239],[95,-413],[-73,-478],[-164,-191],[-43,-465],[62,-458],[147,-64],[123,68],[347,-319],[-27,-313],[91,-139],[-29,-265],[-216,283],[-103,302],[-71,-211],[-177,345],[-253,-86],[-138,128],[14,238],[87,146],[-83,133],[-36,-207],[-137,331],[-41,251],[-11,551],[112,-190],[29,901],[90,522],[169,-1]],[[93299,47902],[-78,-58],[-120,221],[-122,366],[-59,439],[38,55],[30,-171],[84,-130],[135,-366],[131,-195],[-39,-161]],[[92217,48675],[-146,-48],[-44,-161],[-152,-140],[-142,-135],[-148,1],[-228,167],[-158,161],[23,178],[249,-84],[152,45],[42,276],[40,14],[27,-306],[158,44],[78,197],[155,206],[-30,339],[166,11],[56,-94],[-5,-320],[-93,-351]],[[89166,50332],[482,-397],[513,-329],[192,-295],[154,-290],[43,-339],[462,-356],[68,-306],[-256,-62],[62,-383],[248,-378],[180,-611],[159,19],[-11,-255],[215,-98],[-84,-108],[295,-243],[-30,-166],[-184,-40],[-69,149],[-238,65],[-281,86],[-216,368],[-158,316],[-144,504],[-362,252],[-235,-164],[-170,-190],[35,-425],[-218,-198],[-155,96],[-288,25]],[[92538,49238],[-87,-154],[-52,340],[-65,223],[-126,189],[-158,245],[-200,170],[77,139],[150,-162],[94,-126],[117,-139],[111,-241],[106,-185],[33,-299]],[[53922,82787],[189,169],[434,266],[350,195],[277,-97],[21,-140],[268,-8]],[[55461,83172],[342,-65],[511,9]],[[56535,81532],[139,-502],[-29,-162],[-138,-67],[-252,-479],[71,-259],[-60,34]],[[56266,80097],[-264,221],[-200,-81],[-131,59],[-165,-123],[-140,204],[-114,-78],[-16,34]],[[31588,62492],[142,-51],[50,-114],[-71,-146],[-209,4],[-163,-21],[-16,247],[40,84],[227,-3]],[[86288,76244],[39,-101]],[[86327,76143],[-106,35],[-120,-195],[-83,-196],[10,-414],[-143,-127],[-50,-102],[-104,-170],[-185,-95],[-121,-154],[-9,-250],[-32,-63],[111,-94],[157,-253]],[[85048,73569],[-135,109],[-34,-108],[-81,-48],[-10,109],[-72,52],[-75,92],[76,254],[66,67],[-25,105],[71,311],[-18,94],[-163,63],[-131,154]],[[47929,73193],[-112,-149],[-146,81],[-143,-64],[42,451],[-26,354],[-124,53],[-67,218],[22,377],[111,210],[20,232],[58,347],[-6,244],[-56,206],[-12,195]],[[64113,66085],[-18,419],[75,302],[76,62],[84,-180],[5,-337],[-61,-339]],[[64274,66012],[-77,-41],[-84,114]],[[56308,79404],[120,123],[172,-64],[178,-2],[129,-141],[95,89],[205,55],[69,135],[118,0]],[[57842,78025],[124,-106],[131,93],[126,-99]],[[58223,77913],[6,-149],[-135,-124],[-84,54],[-78,-694]],[[56293,77303],[-51,101],[65,97],[-69,72],[-87,-129],[-162,167],[-22,237],[-169,136],[-31,183],[-151,226]],[[89901,81054],[280,-1020],[-411,190],[-171,-832],[271,-590],[-8,-403],[-211,347],[-182,-445],[-51,483],[31,561],[-32,621],[64,436],[13,770],[-163,566],[24,787],[257,265],[-110,267],[123,81],[73,-381],[96,-555],[-7,-567],[114,-581]],[[55461,83172],[63,254],[383,186]],[[99999,92620],[-305,-29],[-49,183],[-99645,240],[36,24],[235,-1],[402,-165],[-24,-79],[-286,-138],[-363,-35],[99999,0]],[[89889,93991],[-421,-4],[-569,64],[-49,31],[263,227],[348,54],[394,-221],[34,-151]],[[91869,95069],[-321,-228],[-444,52],[-516,227],[66,187],[518,-87],[697,-151]],[[90301,95344],[-219,-427],[-1023,16],[-461,-136],[-550,374],[149,396],[366,108],[734,-25],[1004,-306]],[[65981,92556],[-164,-51],[-907,75],[-74,256],[-503,154],[-40,311],[284,124],[-10,314],[551,491],[-255,70],[665,506],[-75,261],[621,304],[917,370],[925,108],[475,214],[541,74],[193,-227],[-187,-179],[-984,-286],[-848,-274],[-863,-548],[-414,-563],[-435,-553],[56,-479],[531,-472]],[[63639,78550],[-127,-342],[-269,-95],[-276,-594],[252,-547],[-27,-388],[303,-678]],[[61098,76843],[-354,486],[-317,218],[-240,338],[202,92],[231,482],[-156,227],[410,236],[-8,125],[-249,-92]],[[60617,78955],[9,255],[143,161],[269,42],[44,192],[-62,318],[113,302],[-3,169],[-410,187],[-162,-6],[-172,270],[-213,-92],[-352,203],[6,113],[-99,250],[-222,28],[-23,178],[70,117],[-178,326],[-288,-56],[-84,29],[-70,-131],[-104,24]],[[57772,86080],[316,318],[-291,274]],[[58639,91887],[286,200],[456,-348],[761,-137],[1050,-652],[213,-273],[18,-384],[-308,-302],[-454,-154],[-1240,438],[-204,-73],[453,-422],[18,-267],[18,-589],[358,-175],[217,-150],[36,279],[-168,248],[177,218],[672,-358],[233,140],[-186,422],[647,564],[256,-33],[260,-202],[161,396],[-231,343],[136,345],[-204,357],[777,-185],[158,-322],[-351,-71],[1,-321],[219,-197],[429,125],[68,367],[580,274],[970,495],[209,-28],[-273,-350],[344,-60],[199,197],[521,16],[412,239],[317,-347],[315,381],[-291,334],[145,190],[820,-175],[385,-180],[1006,-658],[186,302],[-282,304],[-8,122],[-335,57],[92,273],[-149,449],[-8,185],[512,521],[183,523],[206,114],[736,-152],[57,-320],[-263,-468],[173,-183],[89,-403],[-63,-789],[307,-353],[-120,-384],[-544,-818],[318,-85],[110,207],[306,148],[74,285],[240,274],[-162,328],[130,380],[-304,47],[-67,321],[222,578],[-361,469],[497,389],[-64,409],[139,13],[145,-319],[-109,-556],[297,-105],[-127,415],[465,227],[577,30],[513,-328],[-247,479],[-28,614],[483,116],[669,-25],[602,75],[-226,301],[321,378],[319,16],[540,286],[734,77],[93,157],[729,54],[227,-129],[624,306],[510,-10],[77,249],[265,245],[656,236],[476,-186],[-378,-142],[629,-89],[75,-284],[254,140],[812,-8],[626,-281],[223,-215],[-69,-300],[-307,-170],[-730,-320],[-209,-171],[345,-80],[410,-146],[251,109],[141,-369],[122,149],[444,91],[892,-95],[67,-269],[1162,-86],[15,440],[590,-101],[443,3],[449,-303],[128,-369],[-165,-241],[349,-453],[437,-234],[268,605],[446,-260],[473,155],[538,-177],[204,162],[455,-81],[-201,534],[367,250],[2509,-374],[236,-342],[727,-440],[1122,109],[553,-95],[231,-238],[-33,-421],[342,-164],[372,118],[492,15],[525,-113],[526,64],[484,-512],[344,184],[-224,368],[123,256],[886,-161],[578,34],[799,-275],[-99610,-251],[681,-440],[728,-572],[-24,-358],[187,-143],[-64,418],[754,-86],[544,-539],[-276,-251],[-455,-59],[-7,-563],[-111,-120],[-260,17],[-212,201],[-369,168],[-62,250],[-283,94],[-315,-74],[-151,201],[60,214],[-333,-137],[126,-271],[-158,-244],[0,-3],[99640,-253],[-360,42],[250,-307],[166,-474],[128,-155],[32,-238],[-71,-153],[-518,126],[-777,-434],[-247,-67],[-425,-405],[-403,-353],[-102,-262],[-397,399],[-724,-453],[-126,214],[-268,-246],[-371,79],[-90,-379],[-333,-557],[10,-233],[316,-129],[-37,-839],[-258,-21],[-119,-482],[116,-248],[-486,-294],[-96,-657],[-415,-141],[-83,-585],[-400,-536],[-103,396],[-119,841],[-155,1279],[134,799],[234,344],[14,269],[432,129],[496,725],[479,592],[499,459],[223,812],[-337,-49],[-167,-474],[-705,-632],[-227,708],[-717,-196],[-696,-965],[230,-353],[-620,-151],[-430,-59],[20,417],[-431,87],[-344,-283],[-850,99],[-914,-171],[-899,-1124],[-1065,-1358],[438,-73],[136,-360],[270,-128],[178,288],[305,-38],[401,-633],[9,-490],[-217,-576],[-23,-687],[-126,-921],[-418,-833],[-94,-399],[-377,-670],[-374,-665],[-179,-340],[-370,-338],[-175,-8],[-175,280],[-373,-421],[-43,-192]],[[79187,96925],[-1566,-222],[507,756],[229,64],[208,-37],[704,-327],[-82,-234]],[[64204,98215],[-373,-76],[-250,-44],[-39,-94],[-324,-95],[-301,136],[158,180],[-618,17],[542,105],[422,7],[57,-155],[159,138],[262,95],[412,-126],[-107,-88]],[[77760,97255],[-606,-71],[-773,166],[-462,220],[-213,413],[-379,113],[722,394],[600,130],[540,-290],[640,-557],[-69,-518]],[[58449,51176],[110,-325],[-16,-339],[-80,-73]],[[58216,51057],[67,-59],[166,178]],[[45260,63923],[12,243]],[[61883,61244],[-37,246],[-83,173],[-22,230],[-143,206],[-148,483],[-79,469],[-192,397],[-124,94],[-184,549],[-32,400],[12,342],[-159,638],[-130,225],[-150,119],[-92,330],[15,130],[-77,299],[-81,128],[-108,429],[-170,464],[-141,395],[-139,-2],[44,316],[12,201],[34,230]],[[63448,68272],[109,-497],[137,-131],[47,-203],[190,-242],[16,-237],[-27,-192],[35,-193],[80,-162],[37,-189],[41,-141]],[[64274,66012],[53,-220]],[[64444,62771],[-801,-221],[-259,-259],[-199,-604],[-130,-96],[-70,191],[-106,-28],[-269,57],[-50,58],[-321,-13],[-75,-52],[-114,149],[-74,-283],[28,-243],[-121,-183]],[[59434,57280],[-39,11],[5,287],[-33,197],[-143,228],[-34,415],[34,425],[-129,40],[-19,-129],[-167,-29],[67,-169],[23,-346],[-152,-316],[-138,-415],[-144,-59],[-233,336],[-105,-119],[-29,-168],[-143,-109],[-9,-118],[-277,0],[-38,118],[-200,20],[-100,-99],[-77,50],[-143,336],[-48,158],[-200,-79],[-76,-267],[-72,-514],[-95,-109],[-85,-63]],[[56635,56793],[-23,27]],[[56351,58246],[3,140],[-102,169],[-3,335],[-58,222],[-98,-33],[28,211],[72,240],[-32,239],[92,176],[-58,135],[73,355],[127,425],[240,-41],[-14,2286]],[[60240,64499],[90,-565],[-61,-105],[40,-593],[102,-687],[106,-142],[152,-213]],[[59433,57348],[1,-68]],[[59434,57280],[3,-449]],[[59445,54277],[-171,-265],[-195,1],[-224,-135],[-176,129],[-115,-157]],[[56824,56568],[-189,225]],[[45357,59658],[-115,449],[-138,205],[122,109],[134,404],[66,296]],[[45367,58962],[-46,441]],[[95032,45793],[78,-198],[-194,3],[-106,355],[166,-140],[56,-20]],[[94680,46144],[-108,-13],[-170,58],[-58,89],[17,228],[183,-90],[91,-121],[45,-151]],[[94910,46301],[-42,-106],[-206,499],[-57,344],[94,0],[100,-461],[111,-276]],[[94409,47028],[12,-116],[-218,245],[-152,206],[-104,192],[41,59],[128,-138],[228,-265],[65,-183]],[[93760,47598],[-56,-33],[-121,131],[-114,237],[14,96],[166,-243],[111,-188]],[[46822,55737],[-75,43],[-200,232],[-144,308],[-49,211],[-34,425]],[[25613,59537],[-31,-135],[-161,8],[-100,55],[-115,115],[-154,36],[-79,123]],[[61984,58430],[91,-106],[54,-238],[125,-241],[138,-2],[262,147],[302,68],[245,179],[138,38],[99,105],[158,20]],[[63596,58400],[-2,-9],[-1,-237],[0,-581],[0,-301],[-125,-353],[-194,-481]],[[63596,58400],[89,12],[128,85],[147,58],[132,198],[105,1],[6,-159],[-25,-335],[1,-303],[-59,-208],[-78,-622],[-134,-644],[-172,-735],[-238,-844],[-237,-645],[-327,-785],[-278,-467],[-415,-571],[-259,-438],[-304,-698],[-64,-304],[-63,-136]],[[34125,55269],[333,-115],[30,104],[225,41],[298,-155]],[[34889,54255],[109,-341],[-49,-248],[-24,-263],[-71,-242]],[[56266,80097],[-77,-150],[-55,-232]],[[53809,78032],[62,52]],[[56639,89841],[-478,-163],[-269,-401],[43,-353],[-441,-463],[-537,-495],[-202,-811],[198,-406],[265,-320],[-255,-649],[-289,-135],[-106,-967],[-157,-539],[-337,55],[-158,-456],[-321,-27],[-89,545],[-232,653],[-211,814]],[[58908,36434],[-56,-256],[-163,-62],[-166,312],[-2,199],[76,216],[26,168],[80,41],[140,-105]],[[59999,71781],[-26,440],[68,237]],[[60041,72458],[74,126],[75,127],[15,321],[91,-112],[306,160],[147,-108],[229,1],[320,217],[149,-10],[316,89]],[[50518,55366],[-224,-122]],[[78495,58847],[-249,265],[-238,-11],[41,452],[-245,-3],[-22,-633],[-150,-841],[-90,-509],[19,-417],[181,-18],[113,-526],[50,-498],[155,-330],[168,-67],[144,-299]],[[77801,55552],[-110,221],[-47,285],[-148,325],[-135,274],[-45,-339],[-53,320],[30,359],[82,553]],[[68841,73220],[156,583],[-60,429],[-204,137],[72,254],[232,-27],[132,318],[89,370],[371,134],[-58,-267],[40,-161],[114,15]],[[64978,73251],[-52,408],[40,602],[-216,195],[71,394],[-184,34],[61,485],[262,-141],[244,184],[-202,346],[-80,329],[-224,-147],[-28,-422],[-87,374]],[[65546,75618],[313,8],[-45,290],[237,199],[234,334],[374,-304],[30,-460],[106,-118],[301,27],[93,-105],[137,-593],[317,-398],[181,-271],[291,-282],[369,-247],[-7,-352]],[[84713,46708],[32,136],[239,129],[194,20],[87,72],[105,-72],[-102,-156],[-289,-252],[-233,-165]],[[32866,58026],[160,75],[58,-20],[-11,-430],[-232,-63],[-50,52],[81,158],[-6,228]],[[52339,73106],[302,232],[195,-69],[-9,-291],[236,212],[20,-111],[-139,-282],[-2,-266],[96,-143],[-36,-499],[-183,-289],[53,-314],[143,-10],[70,-274],[106,-90]],[[60041,72458],[-102,261],[105,217],[-169,-49],[-233,132],[-191,-331],[-421,-65],[-225,309],[-300,19],[-64,-238],[-192,-69],[-268,307],[-303,-11],[-165,573],[-203,320],[135,447],[-176,276],[308,550],[428,23],[117,438],[529,-76],[334,373],[324,163],[459,13],[485,-406],[399,-223],[323,89],[239,-52],[328,301]],[[57776,76021],[33,-222],[243,-186],[-51,-141],[-330,-32],[-118,-178],[-232,-310],[-87,268],[3,119]],[[83826,65878],[-167,-924],[-119,-472],[-146,486],[-32,427],[163,566],[223,436],[127,-172],[-49,-347]],[[60889,49136],[-128,-710],[16,-326],[178,-210],[8,-149],[-76,-348],[16,-175],[-18,-275],[97,-361],[115,-568],[101,-126]],[[59099,46514],[-157,172],[-177,97],[-111,97],[-116,146]],[[58449,51176],[98,69],[304,-7],[566,44]],[[60617,78955],[-222,-46],[-185,-187],[-260,-30],[-239,-215],[16,-358],[136,-139],[284,35],[-55,-206],[-304,-100],[-377,-333],[-154,117],[61,271],[-304,169],[50,110],[265,191],[-80,132],[-432,146],[-19,215],[-257,-71],[-103,-317],[-215,-426]],[[35174,32383],[-121,-362],[-313,-320],[-205,115],[-151,-62],[-256,247],[-189,-18],[-169,319]],[[6794,62819],[-41,-96],[-69,82],[8,161],[-46,210],[14,64],[48,94],[-19,113],[16,54],[21,-11],[107,-97],[49,-50],[45,-77],[71,-202],[-7,-32],[-108,-123],[-89,-90]],[[6645,63718],[-94,-41],[-47,121],[-32,47],[-3,36],[27,49],[99,-55],[73,-88],[-23,-69]],[[6456,64025],[-9,-63],[-149,17],[21,70],[137,-24]],[[6207,64108],[-15,-33],[-19,8],[-97,20],[-35,130],[-11,23],[74,80],[23,-37],[80,-191]],[[5737,64488],[-33,-57],[-93,105],[14,42],[43,57],[64,-13],[5,-134]],[[31350,77823],[48,-189],[-296,-279],[-286,-198],[-293,-171],[-147,-342],[-47,-129],[-3,-306],[92,-305],[115,-14],[-29,210],[83,-128],[-22,-165],[-188,-93],[-133,11],[-205,-100],[-121,-29],[-162,-28],[-231,-167],[408,108],[82,-109],[-389,-173],[-177,-1],[8,71],[-84,-160],[82,-26],[-60,-414],[-203,-443],[-20,148],[-61,30],[-91,144],[57,-310],[69,-103],[5,-217],[-89,-224],[-157,-460],[-25,23],[86,392],[-142,220],[-33,478],[-53,-249],[59,-365],[-183,90],[191,-185],[12,-548],[79,-40],[29,-199],[39,-577],[-176,-427],[-288,-171],[-182,-338],[-139,-37],[-141,-211],[-39,-193],[-305,-374],[-157,-274],[-131,-342],[-43,-409],[50,-400],[92,-492],[124,-408],[1,-249],[132,-668],[-9,-388],[-12,-224],[-69,-352],[-83,-73],[-137,70],[-44,253],[-105,132],[-148,496],[-129,440],[-42,225],[57,383],[-77,316],[-217,482],[-108,89],[-281,-262],[-49,29],[-135,269],[-174,142],[-314,-72],[-247,63],[-212,-39],[-114,-90],[50,-153],[-5,-234],[59,-113],[-53,-76],[-103,85],[-104,-109],[-202,17],[-207,305],[-242,-72],[-202,133],[-173,-40],[-234,-135],[-253,-427],[-276,-248],[-152,-275],[-63,-259],[-3,-397],[14,-277],[52,-196]],[[17464,70566],[-46,294],[-180,331],[-130,69],[-30,165],[-156,29],[-100,156],[-258,57],[-71,93],[-33,316],[-270,578],[-231,801],[10,133],[-123,190],[-215,483],[-38,469],[-148,315],[61,477],[-10,494],[-89,441],[109,543],[34,523],[33,522],[-50,773],[-88,492],[-80,268],[33,112],[402,-195],[148,-544],[69,152],[-45,472],[-94,473]],[[7498,84721],[-277,-219],[-142,148],[-43,270],[252,205],[148,88],[185,-39],[117,-179],[-240,-274]],[[4006,86330],[-171,-89],[-182,107],[-168,157],[274,98],[220,-52],[27,-221]],[[2297,88560],[171,-109],[173,59],[225,-152],[276,-77],[-23,-63],[-211,-121],[-211,125],[-106,104],[-245,-33],[-66,51],[17,216]],[[13740,83389],[-153,217],[-245,183],[-78,503],[-358,466],[-150,543],[-267,38],[-441,14],[-326,165],[-574,598],[-266,109],[-486,206],[-385,-49],[-546,264],[-330,246],[-309,-122],[58,-400],[-154,-37],[-321,-120],[-245,-195],[-308,-122],[-39,339],[125,565],[295,177],[-76,145],[-354,-321],[-190,-383],[-400,-410],[203,-280],[-262,-413],[-299,-241],[-278,-176],[-69,-255],[-434,-297],[-87,-271],[-325,-246],[-191,44],[-259,-160],[-282,-196],[-231,-193],[-477,-164],[-43,96],[304,270],[271,177],[296,315],[345,65],[137,236],[385,345],[62,115],[205,204],[48,437],[141,340],[-320,-175],[-90,99],[-150,-209],[-181,292],[-75,-207],[-104,287],[-278,-230],[-170,0],[-24,343],[50,211],[-179,205],[-361,-110],[-235,270],[-190,138],[-1,327],[-214,245],[108,331],[226,322],[99,295],[225,42],[191,-92],[224,278],[201,-50],[212,179],[-52,263],[-155,104],[205,222],[-170,-7],[-295,-125],[-85,-127],[-219,127],[-392,-65],[-407,138],[-117,232],[-351,334],[390,241],[620,282],[228,0],[-38,-288],[586,22],[-225,357],[-342,219],[-197,288],[-267,246],[-381,182],[155,302],[493,19],[350,262],[66,280],[284,274],[271,66],[526,256],[256,-39],[427,307],[421,-121],[201,-260],[123,112],[469,-35],[-16,-132],[425,-98],[283,57],[585,-182],[534,-54],[214,-75],[370,94],[421,-173],[302,-81]],[[30185,58611],[-8,-136],[-163,-67],[91,-262],[-3,-301],[-123,-334],[105,-457],[120,37],[62,417],[-86,202],[-14,436],[346,234],[-38,272],[97,181],[100,-404],[195,-10],[180,-321],[11,-190],[249,-6],[297,60],[159,-258],[213,-71],[155,180],[4,145],[344,34],[333,8],[-236,-170],[95,-272],[222,-43],[210,-283],[45,-462],[144,13],[109,-135]],[[80013,64241],[-371,-493],[-231,-544],[-61,-399],[212,-607],[260,-753],[252,-356],[169,-462],[127,-1066],[-37,-1013],[-232,-379],[-318,-371],[-227,-480],[-346,-536],[-101,369],[78,390],[-206,327]],[[96623,42347],[-92,-76],[-93,252],[10,155],[175,-331]],[[96418,43229],[45,-464],[-75,72],[-58,-31],[-39,159],[-6,441],[133,-177]],[[64752,61418],[-201,-154],[-54,-256],[-6,-196],[-277,-244],[-444,-268],[-249,-406],[-122,-32],[-83,34],[-163,-239],[-177,-111],[-233,-30],[-70,-33],[-61,-152],[-73,-42],[-43,-146],[-137,12],[-89,-78],[-192,30],[-72,336],[8,315],[-46,170],[-54,426],[-80,236],[56,28],[-29,264],[34,111],[-12,251]],[[58175,39107],[113,-6],[134,-97],[94,69],[148,-58]],[[59119,36429],[-70,-419],[-32,-479],[-72,-260],[-190,-290],[-54,-84],[-118,-292],[-77,-296],[-158,-413],[-314,-594],[-196,-345],[-210,-262],[-290,-224],[-141,-30],[-36,-160],[-169,85],[-138,-109],[-301,111],[-168,-71],[-115,31],[-286,-228],[-238,-91],[-171,-218],[-127,-13],[-117,205],[-94,10],[-120,258],[-13,-80],[-37,155],[2,337],[-90,386],[89,105],[-7,442],[-182,539],[-139,488],[-1,1],[-199,749]],[[58409,42899],[-210,-79],[-159,-230],[-33,-199],[-100,-46],[-241,-473],[-154,-373],[-94,-13],[-90,66],[-311,63]]],"transform":{"scale":[0.0036000360003600037,0.0017364686646866468],"translate":[-180,-90]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment