mapshaper 0.6.111 → 0.6.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mapshaper.js +1124 -630
- package/package.json +3 -2
- package/www/basemap.js +6 -4
- package/www/elements.css +1 -1
- package/www/images/eye3.png +0 -0
- package/www/index.html +27 -8
- package/www/mapshaper-gui.js +276 -62
- package/www/mapshaper.js +1124 -630
- package/www/modules.js +147 -0
- package/www/page.css +71 -34
package/www/modules.js
CHANGED
|
@@ -32213,12 +32213,159 @@
|
|
|
32213
32213
|
}
|
|
32214
32214
|
}
|
|
32215
32215
|
|
|
32216
|
+
var geographiclibGeodesic_min$1 = {exports: {}};
|
|
32217
|
+
|
|
32218
|
+
var geographiclibGeodesic_min = geographiclibGeodesic_min$1.exports;
|
|
32219
|
+
|
|
32220
|
+
var hasRequiredGeographiclibGeodesic_min;
|
|
32221
|
+
|
|
32222
|
+
function requireGeographiclibGeodesic_min () {
|
|
32223
|
+
if (hasRequiredGeographiclibGeodesic_min) return geographiclibGeodesic_min$1.exports;
|
|
32224
|
+
hasRequiredGeographiclibGeodesic_min = 1;
|
|
32225
|
+
(function (module) {
|
|
32226
|
+
(function(cb){var geodesic={};geodesic.Constants={};geodesic.Math={};geodesic.Accumulator={};(function(c){"use strict";c.WGS84={a:6378137,f:1/298.257223563};c.version={major:2,minor:2,patch:0};c.version_string="2.2.0";})(geodesic.Constants);(function(m){"use strict";m.digits=53;m.epsilon=Math.pow(0.5,m.digits-1);m.degree=Math.PI/180;m.sq=function(x){return x*x;};m.hypot=function(x,y){return Math.sqrt(x*x+y*y);};m.cbrt=Math.cbrt||function(x){var y=Math.pow(Math.abs(x),1/3);return x>0?y:(x<0?-y:x);};m.log1p=Math.log1p||function(x){var y=1+x,z=y-1;return z===0?x:x*Math.log(y)/z;};m.atanh=Math.atanh||function(x){var y=Math.abs(x);y=m.log1p(2*y/(1-y))/2;return x>0?y:(x<0?-y:x);};m.copysign=function(x,y){return Math.abs(x)*(y<0||(y===0&&1/y<0)?-1:1);};m.sum=function(u,v){var s=u+v,up=s-v,vpp=s-up,t;up-=u;vpp-=v;t=s?0-(up+vpp):s;return {s:s,t:t};};m.polyval=function(N,p,s,x){var y=N<0?0:p[s++];while(--N>=0)y=y*x+p[s++];return y;};m.AngRound=function(x){var z=1/16,y=Math.abs(x);y=y<z?z-(z-y):y;return m.copysign(y,x);};m.remainder=function(x,y){x%=y;return x<-y/2?x+y:(x<y/2?x:x-y);};m.AngNormalize=function(x){var y=m.remainder(x,360);return Math.abs(y)===180?m.copysign(180,x):y;};m.LatFix=function(x){return Math.abs(x)>90?NaN:x;};m.AngDiff=function(x,y){var r=m.sum(m.remainder(-x,360),m.remainder(y,360)),d,e;r=m.sum(m.remainder(r.s,360),r.t);d=r.s;e=r.t;if(d===0||Math.abs(d)===180)
|
|
32227
|
+
d=m.copysign(d,e===0?y-x:-e);return {d:d,e:e};};m.sincosd=function(x){var d,r,q,s,c,sinx,cosx;d=x%360;q=Math.round(d/90);d-=90*q;r=d*this.degree;s=Math.sin(r);c=Math.cos(r);if(Math.abs(d)===45){c=Math.sqrt(0.5);s=m.copysign(c,r);}else if(Math.abs(d)===30){c=Math.sqrt(0.75);s=m.copysign(0.5,r);}
|
|
32228
|
+
switch(q&3){case 0:sinx=s;cosx=c;break;case 1:sinx=c;cosx=-s;break;case 2:sinx=-s;cosx=-c;break;default:sinx=-c;cosx=s;break;}
|
|
32229
|
+
cosx+=0;if(sinx===0)sinx=m.copysign(sinx,x);return {s:sinx,c:cosx};};m.sincosde=function(x,t){var d,r,q,s,c,sinx,cosx;d=x%360;q=Math.round(d/90);d=m.AngRound((d-90*q)+t);r=d*this.degree;s=Math.sin(r);c=Math.cos(r);if(Math.abs(d)===45){c=Math.sqrt(0.5);s=m.copysign(c,r);}else if(Math.abs(d)===30){c=Math.sqrt(0.75);s=m.copysign(0.5,r);}
|
|
32230
|
+
switch(q&3){case 0:sinx=s;cosx=c;break;case 1:sinx=c;cosx=-s;break;case 2:sinx=-s;cosx=-c;break;default:sinx=-c;cosx=s;break;}
|
|
32231
|
+
cosx+=0;if(sinx===0)sinx=m.copysign(sinx,x+t);return {s:sinx,c:cosx};};m.atan2d=function(y,x){var q=0,ang;if(Math.abs(y)>Math.abs(x)){[y,x]=[x,y];q=2;}
|
|
32232
|
+
if(m.copysign(1,x)<0){x=-x;++q;}
|
|
32233
|
+
ang=Math.atan2(y,x)/this.degree;switch(q){case 1:ang=m.copysign(180,y)-ang;break;case 2:ang=90-ang;break;case 3:ang=-90+ang;break;default:break;}
|
|
32234
|
+
return ang;};})(geodesic.Math);(function(a,m){"use strict";a.Accumulator=function(y){this.Set(y);};a.Accumulator.prototype.Set=function(y){if(!y)y=0;if(y.constructor===a.Accumulator){this._s=y._s;this._t=y._t;}else {this._s=y;this._t=0;}};a.Accumulator.prototype.Add=function(y){var u=m.sum(y,this._t),v=m.sum(u.s,this._s);u=u.t;this._s=v.s;this._t=v.t;if(this._s===0)
|
|
32235
|
+
this._s=u;else
|
|
32236
|
+
this._t+=u;};a.Accumulator.prototype.Sum=function(y){var b;if(!y)
|
|
32237
|
+
return this._s;else {b=new a.Accumulator(this);b.Add(y);return b._s;}};a.Accumulator.prototype.Negate=function(){this._s*=-1;this._t*=-1;};a.Accumulator.prototype.Remainder=function(y){this._s=m.remainder(this._s,y);this.Add(0);};})(geodesic.Accumulator,geodesic.Math);geodesic.Geodesic={};geodesic.GeodesicLine={};geodesic.PolygonArea={};(function(g,l,p,m,c){"use strict";var GEOGRAPHICLIB_GEODESIC_ORDER=6,nA1_=GEOGRAPHICLIB_GEODESIC_ORDER,nA2_=GEOGRAPHICLIB_GEODESIC_ORDER,nA3_=GEOGRAPHICLIB_GEODESIC_ORDER,nA3x_=nA3_,nC3x_,nC4x_,maxit1_=20,maxit2_=maxit1_+m.digits+10,tol0_=m.epsilon,tol1_=200*tol0_,tol2_=Math.sqrt(tol0_),tolb_=tol0_,xthresh_=1000*tol2_,CAP_NONE=0,CAP_ALL=0x1F,OUT_ALL=0x7F80,astroid,A1m1f_coeff,C1f_coeff,C1pf_coeff,A2m1f_coeff,C2f_coeff,A3_coeff,C3_coeff,C4_coeff;g.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON);g.nC1_=GEOGRAPHICLIB_GEODESIC_ORDER;g.nC1p_=GEOGRAPHICLIB_GEODESIC_ORDER;g.nC2_=GEOGRAPHICLIB_GEODESIC_ORDER;g.nC3_=GEOGRAPHICLIB_GEODESIC_ORDER;g.nC4_=GEOGRAPHICLIB_GEODESIC_ORDER;nC3x_=(g.nC3_*(g.nC3_-1))/2;nC4x_=(g.nC4_*(g.nC4_+1))/2;g.CAP_C1=1<<0;g.CAP_C1p=1<<1;g.CAP_C2=1<<2;g.CAP_C3=1<<3;g.CAP_C4=1<<4;g.NONE=0;g.ARC=1<<6;g.LATITUDE=1<<7|CAP_NONE;g.LONGITUDE=1<<8|g.CAP_C3;g.AZIMUTH=1<<9|CAP_NONE;g.DISTANCE=1<<10|g.CAP_C1;g.STANDARD=g.LATITUDE|g.LONGITUDE|g.AZIMUTH|g.DISTANCE;g.DISTANCE_IN=1<<11|g.CAP_C1|g.CAP_C1p;g.REDUCEDLENGTH=1<<12|g.CAP_C1|g.CAP_C2;g.GEODESICSCALE=1<<13|g.CAP_C1|g.CAP_C2;g.AREA=1<<14|g.CAP_C4;g.ALL=OUT_ALL|CAP_ALL;g.LONG_UNROLL=1<<15;g.OUT_MASK=OUT_ALL|g.LONG_UNROLL;g.SinCosSeries=function(sinp,sinx,cosx,c){var k=c.length,n=k-(sinp?1:0),ar=2*(cosx-sinx)*(cosx+sinx),y0=n&1?c[--k]:0,y1=0;n=Math.floor(n/2);while(n--){y1=ar*y0-y1+c[--k];y0=ar*y1-y0+c[--k];}
|
|
32238
|
+
return(sinp?2*sinx*cosx*y0:cosx*(y0-y1));};astroid=function(x,y){var k,p=m.sq(x),q=m.sq(y),r=(p+q-1)/6,S,r2,r3,disc,u,T3,T,ang,v,uv,w;if(!(q===0&&r<=0)){S=p*q/4;r2=m.sq(r);r3=r*r2;disc=S*(S+2*r3);u=r;if(disc>=0){T3=S+r3;T3+=T3<0?-Math.sqrt(disc):Math.sqrt(disc);T=m.cbrt(T3);u+=T+(T!==0?r2/T:0);}else {ang=Math.atan2(Math.sqrt(-disc),-(S+r3));u+=2*r*Math.cos(ang/3);}
|
|
32239
|
+
v=Math.sqrt(m.sq(u)+q);uv=u<0?q/(v-u):u+v;w=(uv-q)/(2*v);k=uv/(Math.sqrt(uv+m.sq(w))+w);}else {k=0;}
|
|
32240
|
+
return k;};A1m1f_coeff=[+1,4,64,0,256];g.A1m1f=function(eps){var p=Math.floor(nA1_/2),t=m.polyval(p,A1m1f_coeff,0,m.sq(eps))/A1m1f_coeff[p+1];return (t+eps)/(1-eps);};C1f_coeff=[-1,6,-16,32,-9,64,-128,2048,+9,-16,768,+3,-5,512,-7,1280,-7,2048];g.C1f=function(eps,c){var eps2=m.sq(eps),d=eps,o=0,l,p;for(l=1;l<=g.nC1_;++l){p=Math.floor((g.nC1_-l)/2);c[l]=d*m.polyval(p,C1f_coeff,o,eps2)/C1f_coeff[o+p+1];o+=p+2;d*=eps;}};C1pf_coeff=[+205,-432,768,1536,+4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,+3467,7680,+38081,61440];g.C1pf=function(eps,c){var eps2=m.sq(eps),d=eps,o=0,l,p;for(l=1;l<=g.nC1p_;++l){p=Math.floor((g.nC1p_-l)/2);c[l]=d*m.polyval(p,C1pf_coeff,o,eps2)/C1pf_coeff[o+p+1];o+=p+2;d*=eps;}};A2m1f_coeff=[-11,-28,-192,0,256];g.A2m1f=function(eps){var p=Math.floor(nA2_/2),t=m.polyval(p,A2m1f_coeff,0,m.sq(eps))/A2m1f_coeff[p+1];return (t-eps)/(1+eps);};C2f_coeff=[+1,2,16,32,+35,64,384,2048,+15,80,768,+7,35,512,+63,1280,+77,2048];g.C2f=function(eps,c){var eps2=m.sq(eps),d=eps,o=0,l,p;for(l=1;l<=g.nC2_;++l){p=Math.floor((g.nC2_-l)/2);c[l]=d*m.polyval(p,C2f_coeff,o,eps2)/C2f_coeff[o+p+1];o+=p+2;d*=eps;}};g.Geodesic=function(a,f){this.a=a;this.f=f;this._f1=1-this.f;this._e2=this.f*(2-this.f);this._ep2=this._e2/m.sq(this._f1);this._n=this.f/(2-this.f);this._b=this.a*this._f1;this._c2=(m.sq(this.a)+m.sq(this._b)*(this._e2===0?1:(this._e2>0?m.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2;this._etol2=0.1*tol2_/Math.sqrt(Math.max(0.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2);if(!(isFinite(this.a)&&this.a>0))
|
|
32241
|
+
throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))
|
|
32242
|
+
throw new Error("Polar semi-axis is not positive");this._A3x=new Array(nA3x_);this._C3x=new Array(nC3x_);this._C4x=new Array(nC4x_);this.A3coeff();this.C3coeff();this.C4coeff();};A3_coeff=[-3,128,-2,-3,64,-1,-3,-1,16,+3,-1,-2,8,+1,-1,2,+1,1];g.Geodesic.prototype.A3coeff=function(){var o=0,k=0,j,p;for(j=nA3_-1;j>=0;--j){p=Math.min(nA3_-j-1,j);this._A3x[k++]=m.polyval(p,A3_coeff,o,this._n)/A3_coeff[o+p+1];o+=p+2;}};C3_coeff=[+3,128,+2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,+5,256,+1,3,128,-3,-2,3,64,+1,-3,2,32,+7,512,-10,9,384,+5,-9,5,192,+7,512,-14,7,512,+21,2560];g.Geodesic.prototype.C3coeff=function(){var o=0,k=0,l,j,p;for(l=1;l<g.nC3_;++l){for(j=g.nC3_-1;j>=l;--j){p=Math.min(g.nC3_-j-1,j);this._C3x[k++]=m.polyval(p,C3_coeff,o,this._n)/C3_coeff[o+p+1];o+=p+2;}}};C4_coeff=[+97,15015,+1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,+64,624,-4576,6864,-3003,15015,+100,208,572,3432,-12012,30030,45045,+1,9009,-2944,468,135135,+5792,1040,-1287,135135,+5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,+8,10725,+1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,+1024,-208,105105,+3584,-3328,1144,315315,-128,135135,-2560,832,405405,+128,99099];g.Geodesic.prototype.C4coeff=function(){var o=0,k=0,l,j,p;for(l=0;l<g.nC4_;++l){for(j=g.nC4_-1;j>=l;--j){p=g.nC4_-j-1;this._C4x[k++]=m.polyval(p,C4_coeff,o,this._n)/C4_coeff[o+p+1];o+=p+2;}}};g.Geodesic.prototype.A3f=function(eps){return m.polyval(nA3x_-1,this._A3x,0,eps);};g.Geodesic.prototype.C3f=function(eps,c){var mult=1,o=0,l,p;for(l=1;l<g.nC3_;++l){p=g.nC3_-l-1;mult*=eps;c[l]=mult*m.polyval(p,this._C3x,o,eps);o+=p+1;}};g.Geodesic.prototype.C4f=function(eps,c){var mult=1,o=0,l,p;for(l=0;l<g.nC4_;++l){p=g.nC4_-l-1;c[l]=mult*m.polyval(p,this._C4x,o,eps);o+=p+1;mult*=eps;}};g.Geodesic.prototype.Lengths=function(eps,sig12,ssig1,csig1,dn1,ssig2,csig2,dn2,cbet1,cbet2,outmask,C1a,C2a){outmask&=g.OUT_MASK;var vals={},m0x=0,J12=0,A1=0,A2=0,B1,B2,l,csig12,t;if(outmask&(g.DISTANCE|g.REDUCEDLENGTH|g.GEODESICSCALE)){A1=g.A1m1f(eps);g.C1f(eps,C1a);if(outmask&(g.REDUCEDLENGTH|g.GEODESICSCALE)){A2=g.A2m1f(eps);g.C2f(eps,C2a);m0x=A1-A2;A2=1+A2;}
|
|
32243
|
+
A1=1+A1;}
|
|
32244
|
+
if(outmask&g.DISTANCE){B1=g.SinCosSeries(true,ssig2,csig2,C1a)-
|
|
32245
|
+
g.SinCosSeries(true,ssig1,csig1,C1a);vals.s12b=A1*(sig12+B1);if(outmask&(g.REDUCEDLENGTH|g.GEODESICSCALE)){B2=g.SinCosSeries(true,ssig2,csig2,C2a)-
|
|
32246
|
+
g.SinCosSeries(true,ssig1,csig1,C2a);J12=m0x*sig12+(A1*B1-A2*B2);}}else if(outmask&(g.REDUCEDLENGTH|g.GEODESICSCALE)){for(l=1;l<=g.nC2_;++l)
|
|
32247
|
+
C2a[l]=A1*C1a[l]-A2*C2a[l];J12=m0x*sig12+(g.SinCosSeries(true,ssig2,csig2,C2a)-
|
|
32248
|
+
g.SinCosSeries(true,ssig1,csig1,C2a));}
|
|
32249
|
+
if(outmask&g.REDUCEDLENGTH){vals.m0=m0x;vals.m12b=dn2*(csig1*ssig2)-dn1*(ssig1*csig2)-
|
|
32250
|
+
csig1*csig2*J12;}else
|
|
32251
|
+
vals.m12b=NaN;if(outmask&g.GEODESICSCALE){csig12=csig1*csig2+ssig1*ssig2;t=this._ep2*(cbet1-cbet2)*(cbet1+cbet2)/(dn1+dn2);vals.M12=csig12+(t*ssig2-csig2*J12)*ssig1/dn1;vals.M21=csig12-(t*ssig1-csig1*J12)*ssig2/dn2;}
|
|
32252
|
+
return vals;};g.Geodesic.prototype.InverseStart=function(sbet1,cbet1,dn1,sbet2,cbet2,dn2,lam12,slam12,clam12,C1a,C2a){var vals={},sbet12=sbet2*cbet1-cbet2*sbet1,cbet12=cbet2*cbet1+sbet2*sbet1,sbet12a,shortline,omg12,sbetm2,somg12,comg12,t,ssig12,csig12,x,y,lamscale,betscale,k2,eps,cbet12a,bet12a,m12b,m0,nvals,k,omg12a,lam12x;vals.sig12=-1;sbet12a=sbet2*cbet1;sbet12a+=cbet2*sbet1;shortline=cbet12>=0&&sbet12<0.5&&cbet2*lam12<0.5;if(shortline){sbetm2=m.sq(sbet1+sbet2);sbetm2/=sbetm2+m.sq(cbet1+cbet2);vals.dnm=Math.sqrt(1+this._ep2*sbetm2);omg12=lam12/(this._f1*vals.dnm);somg12=Math.sin(omg12);comg12=Math.cos(omg12);}else {somg12=slam12;comg12=clam12;}
|
|
32253
|
+
vals.salp1=cbet2*somg12;vals.calp1=comg12>=0?sbet12+cbet2*sbet1*m.sq(somg12)/(1+comg12):sbet12a-cbet2*sbet1*m.sq(somg12)/(1-comg12);ssig12=m.hypot(vals.salp1,vals.calp1);csig12=sbet1*sbet2+cbet1*cbet2*comg12;if(shortline&&ssig12<this._etol2){vals.salp2=cbet1*somg12;vals.calp2=sbet12-cbet1*sbet2*(comg12>=0?m.sq(somg12)/(1+comg12):1-comg12);t=m.hypot(vals.salp2,vals.calp2);vals.salp2/=t;vals.calp2/=t;vals.sig12=Math.atan2(ssig12,csig12);}else if(Math.abs(this._n)>0.1||csig12>=0||ssig12>=6*Math.abs(this._n)*Math.PI*m.sq(cbet1)){}else {lam12x=Math.atan2(-slam12,-clam12);if(this.f>=0){k2=m.sq(sbet1)*this._ep2;eps=k2/(2*(1+Math.sqrt(1+k2))+k2);lamscale=this.f*cbet1*this.A3f(eps)*Math.PI;betscale=lamscale*cbet1;x=lam12x/lamscale;y=sbet12a/betscale;}else {cbet12a=cbet2*cbet1-sbet2*sbet1;bet12a=Math.atan2(sbet12a,cbet12a);nvals=this.Lengths(this._n,Math.PI+bet12a,sbet1,-cbet1,dn1,sbet2,cbet2,dn2,cbet1,cbet2,g.REDUCEDLENGTH,C1a,C2a);m12b=nvals.m12b;m0=nvals.m0;x=-1+m12b/(cbet1*cbet2*m0*Math.PI);betscale=x<-0.01?sbet12a/x:-this.f*m.sq(cbet1)*Math.PI;lamscale=betscale/cbet1;y=lam12/lamscale;}
|
|
32254
|
+
if(y>-tol1_&&x>-1-xthresh_){if(this.f>=0){vals.salp1=Math.min(1,-x);vals.calp1=-Math.sqrt(1-m.sq(vals.salp1));}else {vals.calp1=Math.max(x>-tol1_?0:-1,x);vals.salp1=Math.sqrt(1-m.sq(vals.calp1));}}else {k=astroid(x,y);omg12a=lamscale*(this.f>=0?-x*k/(1+k):-y*(1+k)/k);somg12=Math.sin(omg12a);comg12=-Math.cos(omg12a);vals.salp1=cbet2*somg12;vals.calp1=sbet12a-
|
|
32255
|
+
cbet2*sbet1*m.sq(somg12)/(1-comg12);}}
|
|
32256
|
+
if(!(vals.salp1<=0)){t=m.hypot(vals.salp1,vals.calp1);vals.salp1/=t;vals.calp1/=t;}else {vals.salp1=1;vals.calp1=0;}
|
|
32257
|
+
return vals;};g.Geodesic.prototype.Lambda12=function(sbet1,cbet1,dn1,sbet2,cbet2,dn2,salp1,calp1,slam120,clam120,diffp,C1a,C2a,C3a){var vals={},t,salp0,calp0,somg1,comg1,somg2,comg2,somg12,comg12,B312,eta,k2,nvals;if(sbet1===0&&calp1===0)
|
|
32258
|
+
calp1=-g.tiny_;salp0=salp1*cbet1;calp0=m.hypot(calp1,salp1*sbet1);vals.ssig1=sbet1;somg1=salp0*sbet1;vals.csig1=comg1=calp1*cbet1;t=m.hypot(vals.ssig1,vals.csig1);vals.ssig1/=t;vals.csig1/=t;vals.salp2=cbet2!==cbet1?salp0/cbet2:salp1;vals.calp2=cbet2!==cbet1||Math.abs(sbet2)!==-sbet1?Math.sqrt(m.sq(calp1*cbet1)+(cbet1<-sbet1?(cbet2-cbet1)*(cbet1+cbet2):(sbet1-sbet2)*(sbet1+sbet2)))/cbet2:Math.abs(calp1);vals.ssig2=sbet2;somg2=salp0*sbet2;vals.csig2=comg2=vals.calp2*cbet2;t=m.hypot(vals.ssig2,vals.csig2);vals.ssig2/=t;vals.csig2/=t;vals.sig12=Math.atan2(Math.max(0,vals.csig1*vals.ssig2-
|
|
32259
|
+
vals.ssig1*vals.csig2),vals.csig1*vals.csig2+
|
|
32260
|
+
vals.ssig1*vals.ssig2);somg12=Math.max(0,comg1*somg2-somg1*comg2);comg12=comg1*comg2+somg1*somg2;eta=Math.atan2(somg12*clam120-comg12*slam120,comg12*clam120+somg12*slam120);k2=m.sq(calp0)*this._ep2;vals.eps=k2/(2*(1+Math.sqrt(1+k2))+k2);this.C3f(vals.eps,C3a);B312=(g.SinCosSeries(true,vals.ssig2,vals.csig2,C3a)-
|
|
32261
|
+
g.SinCosSeries(true,vals.ssig1,vals.csig1,C3a));vals.domg12=-this.f*this.A3f(vals.eps)*salp0*(vals.sig12+B312);vals.lam12=eta+vals.domg12;if(diffp){if(vals.calp2===0)
|
|
32262
|
+
vals.dlam12=-2*this._f1*dn1/sbet1;else {nvals=this.Lengths(vals.eps,vals.sig12,vals.ssig1,vals.csig1,dn1,vals.ssig2,vals.csig2,dn2,cbet1,cbet2,g.REDUCEDLENGTH,C1a,C2a);vals.dlam12=nvals.m12b;vals.dlam12*=this._f1/(vals.calp2*cbet2);}}
|
|
32263
|
+
return vals;};g.Geodesic.prototype.Inverse=function(lat1,lon1,lat2,lon2,outmask){var r,vals;if(!outmask)outmask=g.STANDARD;if(outmask===g.LONG_UNROLL)outmask|=g.STANDARD;outmask&=g.OUT_MASK;r=this.InverseInt(lat1,lon1,lat2,lon2,outmask);vals=r.vals;if(outmask&g.AZIMUTH){vals.azi1=m.atan2d(r.salp1,r.calp1);vals.azi2=m.atan2d(r.salp2,r.calp2);}
|
|
32264
|
+
return vals;};g.Geodesic.prototype.InverseInt=function(lat1,lon1,lat2,lon2,outmask){var vals={},lon12,lon12s,lonsign,t,swapp,latsign,sbet1,cbet1,sbet2,cbet2,s12x,m12x,dn1,dn2,lam12,slam12,clam12,sig12,calp1,salp1,calp2,salp2,C1a,C2a,C3a,meridian,nvals,ssig1,csig1,ssig2,csig2,eps,omg12,dnm,numit,salp1a,calp1a,salp1b,calp1b,tripn,tripb,v,dv,dalp1,sdalp1,cdalp1,nsalp1,lengthmask,salp0,calp0,alp12,k2,A4,C4a,B41,B42,somg12,comg12,domg12,dbet1,dbet2,salp12,calp12,sdomg12,cdomg12;vals.lat1=lat1=m.LatFix(lat1);vals.lat2=lat2=m.LatFix(lat2);lat1=m.AngRound(lat1);lat2=m.AngRound(lat2);lon12=m.AngDiff(lon1,lon2);lon12s=lon12.e;lon12=lon12.d;if(outmask&g.LONG_UNROLL){vals.lon1=lon1;vals.lon2=(lon1+lon12)+lon12s;}else {vals.lon1=m.AngNormalize(lon1);vals.lon2=m.AngNormalize(lon2);}
|
|
32265
|
+
lonsign=m.copysign(1,lon12);lon12*=lonsign;lon12s*=lonsign;lam12=lon12*m.degree;t=m.sincosde(lon12,lon12s);slam12=t.s;clam12=t.c;lon12s=(180-lon12)-lon12s;swapp=Math.abs(lat1)<Math.abs(lat2)||isNaN(lat2)?-1:1;if(swapp<0){lonsign*=-1;[lat2,lat1]=[lat1,lat2];}
|
|
32266
|
+
latsign=m.copysign(1,-lat1);lat1*=latsign;lat2*=latsign;t=m.sincosd(lat1);sbet1=this._f1*t.s;cbet1=t.c;t=m.hypot(sbet1,cbet1);sbet1/=t;cbet1/=t;cbet1=Math.max(g.tiny_,cbet1);t=m.sincosd(lat2);sbet2=this._f1*t.s;cbet2=t.c;t=m.hypot(sbet2,cbet2);sbet2/=t;cbet2/=t;cbet2=Math.max(g.tiny_,cbet2);if(cbet1<-sbet1){if(cbet2===cbet1)
|
|
32267
|
+
sbet2=m.copysign(sbet1,sbet2);}else {if(Math.abs(sbet2)===-sbet1)
|
|
32268
|
+
cbet2=cbet1;}
|
|
32269
|
+
dn1=Math.sqrt(1+this._ep2*m.sq(sbet1));dn2=Math.sqrt(1+this._ep2*m.sq(sbet2));C1a=new Array(g.nC1_+1);C2a=new Array(g.nC2_+1);C3a=new Array(g.nC3_);meridian=lat1===-90||slam12===0;if(meridian){calp1=clam12;salp1=slam12;calp2=1;salp2=0;ssig1=sbet1;csig1=calp1*cbet1;ssig2=sbet2;csig2=calp2*cbet2;sig12=Math.atan2(Math.max(0,csig1*ssig2-ssig1*csig2),csig1*csig2+ssig1*ssig2);nvals=this.Lengths(this._n,sig12,ssig1,csig1,dn1,ssig2,csig2,dn2,cbet1,cbet2,outmask|g.DISTANCE|g.REDUCEDLENGTH,C1a,C2a);s12x=nvals.s12b;m12x=nvals.m12b;if(outmask&g.GEODESICSCALE){vals.M12=nvals.M12;vals.M21=nvals.M21;}
|
|
32270
|
+
if(sig12<tol2_||m12x>=0){if(sig12<3*g.tiny_||(sig12<tol0_&&(s12x<0||m12x<0)))
|
|
32271
|
+
sig12=m12x=s12x=0;m12x*=this._b;s12x*=this._b;vals.a12=sig12/m.degree;}else
|
|
32272
|
+
meridian=false;}
|
|
32273
|
+
somg12=2;if(!meridian&&sbet1===0&&(this.f<=0||lon12s>=this.f*180)){calp1=calp2=0;salp1=salp2=1;s12x=this.a*lam12;sig12=omg12=lam12/this._f1;m12x=this._b*Math.sin(sig12);if(outmask&g.GEODESICSCALE)
|
|
32274
|
+
vals.M12=vals.M21=Math.cos(sig12);vals.a12=lon12/this._f1;}else if(!meridian){nvals=this.InverseStart(sbet1,cbet1,dn1,sbet2,cbet2,dn2,lam12,slam12,clam12,C1a,C2a);sig12=nvals.sig12;salp1=nvals.salp1;calp1=nvals.calp1;if(sig12>=0){salp2=nvals.salp2;calp2=nvals.calp2;dnm=nvals.dnm;s12x=sig12*this._b*dnm;m12x=m.sq(dnm)*this._b*Math.sin(sig12/dnm);if(outmask&g.GEODESICSCALE)
|
|
32275
|
+
vals.M12=vals.M21=Math.cos(sig12/dnm);vals.a12=sig12/m.degree;omg12=lam12/(this._f1*dnm);}else {numit=0;salp1a=g.tiny_;calp1a=1;salp1b=g.tiny_;calp1b=-1;for(tripn=false,tripb=false;;++numit){nvals=this.Lambda12(sbet1,cbet1,dn1,sbet2,cbet2,dn2,salp1,calp1,slam12,clam12,numit<maxit1_,C1a,C2a,C3a);v=nvals.lam12;salp2=nvals.salp2;calp2=nvals.calp2;sig12=nvals.sig12;ssig1=nvals.ssig1;csig1=nvals.csig1;ssig2=nvals.ssig2;csig2=nvals.csig2;eps=nvals.eps;domg12=nvals.domg12;dv=nvals.dlam12;if(tripb||!(Math.abs(v)>=(tripn?8:1)*tol0_)||numit==maxit2_)
|
|
32276
|
+
break;if(v>0&&(numit<maxit1_||calp1/salp1>calp1b/salp1b)){salp1b=salp1;calp1b=calp1;}else if(v<0&&(numit<maxit1_||calp1/salp1<calp1a/salp1a)){salp1a=salp1;calp1a=calp1;}
|
|
32277
|
+
if(numit<maxit1_&&dv>0){dalp1=-v/dv;if(Math.abs(dalp1)<Math.PI){sdalp1=Math.sin(dalp1);cdalp1=Math.cos(dalp1);nsalp1=salp1*cdalp1+calp1*sdalp1;if(nsalp1>0){calp1=calp1*cdalp1-salp1*sdalp1;salp1=nsalp1;t=m.hypot(salp1,calp1);salp1/=t;calp1/=t;tripn=Math.abs(v)<=16*tol0_;continue;}}}
|
|
32278
|
+
salp1=(salp1a+salp1b)/2;calp1=(calp1a+calp1b)/2;t=m.hypot(salp1,calp1);salp1/=t;calp1/=t;tripn=false;tripb=(Math.abs(salp1a-salp1)+(calp1a-calp1)<tolb_||Math.abs(salp1-salp1b)+(calp1-calp1b)<tolb_);}
|
|
32279
|
+
lengthmask=outmask|(outmask&(g.REDUCEDLENGTH|g.GEODESICSCALE)?g.DISTANCE:g.NONE);nvals=this.Lengths(eps,sig12,ssig1,csig1,dn1,ssig2,csig2,dn2,cbet1,cbet2,lengthmask,C1a,C2a);s12x=nvals.s12b;m12x=nvals.m12b;if(outmask&g.GEODESICSCALE){vals.M12=nvals.M12;vals.M21=nvals.M21;}
|
|
32280
|
+
m12x*=this._b;s12x*=this._b;vals.a12=sig12/m.degree;if(outmask&g.AREA){sdomg12=Math.sin(domg12);cdomg12=Math.cos(domg12);somg12=slam12*cdomg12-clam12*sdomg12;comg12=clam12*cdomg12+slam12*sdomg12;}}}
|
|
32281
|
+
if(outmask&g.DISTANCE)
|
|
32282
|
+
vals.s12=0+s12x;if(outmask&g.REDUCEDLENGTH)
|
|
32283
|
+
vals.m12=0+m12x;if(outmask&g.AREA){salp0=salp1*cbet1;calp0=m.hypot(calp1,salp1*sbet1);if(calp0!==0&&salp0!==0){ssig1=sbet1;csig1=calp1*cbet1;ssig2=sbet2;csig2=calp2*cbet2;k2=m.sq(calp0)*this._ep2;eps=k2/(2*(1+Math.sqrt(1+k2))+k2);A4=m.sq(this.a)*calp0*salp0*this._e2;t=m.hypot(ssig1,csig1);ssig1/=t;csig1/=t;t=m.hypot(ssig2,csig2);ssig2/=t;csig2/=t;C4a=new Array(g.nC4_);this.C4f(eps,C4a);B41=g.SinCosSeries(false,ssig1,csig1,C4a);B42=g.SinCosSeries(false,ssig2,csig2,C4a);vals.S12=A4*(B42-B41);}else
|
|
32284
|
+
vals.S12=0;if(!meridian&&somg12==2){somg12=Math.sin(omg12);comg12=Math.cos(omg12);}
|
|
32285
|
+
if(!meridian&&comg12>-0.7071&&sbet2-sbet1<1.75){domg12=1+comg12;dbet1=1+cbet1;dbet2=1+cbet2;alp12=2*Math.atan2(somg12*(sbet1*dbet2+sbet2*dbet1),domg12*(sbet1*sbet2+dbet1*dbet2));}else {salp12=salp2*calp1-calp2*salp1;calp12=calp2*calp1+salp2*salp1;if(salp12===0&&calp12<0){salp12=g.tiny_*calp1;calp12=-1;}
|
|
32286
|
+
alp12=Math.atan2(salp12,calp12);}
|
|
32287
|
+
vals.S12+=this._c2*alp12;vals.S12*=swapp*lonsign*latsign;vals.S12+=0;}
|
|
32288
|
+
if(swapp<0){[salp2,salp1]=[salp1,salp2];[calp2,calp1]=[calp1,calp2];if(outmask&g.GEODESICSCALE){[vals.M21,vals.M12]=[vals.M12,vals.M21];}}
|
|
32289
|
+
salp1*=swapp*lonsign;calp1*=swapp*latsign;salp2*=swapp*lonsign;calp2*=swapp*latsign;return {vals:vals,salp1:salp1,calp1:calp1,salp2:salp2,calp2:calp2};};g.Geodesic.prototype.GenDirect=function(lat1,lon1,azi1,arcmode,s12_a12,outmask){var line;if(!outmask)outmask=g.STANDARD;else if(outmask===g.LONG_UNROLL)outmask|=g.STANDARD;if(!arcmode)outmask|=g.DISTANCE_IN;line=new l.GeodesicLine(this,lat1,lon1,azi1,outmask);return line.GenPosition(arcmode,s12_a12,outmask);};g.Geodesic.prototype.Direct=function(lat1,lon1,azi1,s12,outmask){return this.GenDirect(lat1,lon1,azi1,false,s12,outmask);};g.Geodesic.prototype.ArcDirect=function(lat1,lon1,azi1,a12,outmask){return this.GenDirect(lat1,lon1,azi1,true,a12,outmask);};g.Geodesic.prototype.Line=function(lat1,lon1,azi1,caps){return new l.GeodesicLine(this,lat1,lon1,azi1,caps);};g.Geodesic.prototype.DirectLine=function(lat1,lon1,azi1,s12,caps){return this.GenDirectLine(lat1,lon1,azi1,false,s12,caps);};g.Geodesic.prototype.ArcDirectLine=function(lat1,lon1,azi1,a12,caps){return this.GenDirectLine(lat1,lon1,azi1,true,a12,caps);};g.Geodesic.prototype.GenDirectLine=function(lat1,lon1,azi1,arcmode,s12_a12,caps){var t;if(!caps)caps=g.STANDARD|g.DISTANCE_IN;if(!arcmode)caps|=g.DISTANCE_IN;t=new l.GeodesicLine(this,lat1,lon1,azi1,caps);t.GenSetDistance(arcmode,s12_a12);return t;};g.Geodesic.prototype.InverseLine=function(lat1,lon1,lat2,lon2,caps){var r,t,azi1;if(!caps)caps=g.STANDARD|g.DISTANCE_IN;r=this.InverseInt(lat1,lon1,lat2,lon2,g.ARC);azi1=m.atan2d(r.salp1,r.calp1);if(caps&(g.OUT_MASK&g.DISTANCE_IN))caps|=g.DISTANCE;t=new l.GeodesicLine(this,lat1,lon1,azi1,caps,r.salp1,r.calp1);t.SetArc(r.vals.a12);return t;};g.Geodesic.prototype.Polygon=function(polyline){return new p.PolygonArea(this,polyline);};g.WGS84=new g.Geodesic(c.WGS84.a,c.WGS84.f);})(geodesic.Geodesic,geodesic.GeodesicLine,geodesic.PolygonArea,geodesic.Math,geodesic.Constants);(function(g,l,m){"use strict";l.GeodesicLine=function(geod,lat1,lon1,azi1,caps,salp1,calp1){var t,cbet1,sbet1,eps,s,c;if(!caps)caps=g.STANDARD|g.DISTANCE_IN;this.a=geod.a;this.f=geod.f;this._b=geod._b;this._c2=geod._c2;this._f1=geod._f1;this.caps=caps|g.LATITUDE|g.AZIMUTH|g.LONG_UNROLL;this.lat1=m.LatFix(lat1);this.lon1=lon1;if(typeof salp1==='undefined'||typeof calp1==='undefined'){this.azi1=m.AngNormalize(azi1);t=m.sincosd(m.AngRound(this.azi1));this.salp1=t.s;this.calp1=t.c;}else {this.azi1=azi1;this.salp1=salp1;this.calp1=calp1;}
|
|
32290
|
+
t=m.sincosd(m.AngRound(this.lat1));sbet1=this._f1*t.s;cbet1=t.c;t=m.hypot(sbet1,cbet1);sbet1/=t;cbet1/=t;cbet1=Math.max(g.tiny_,cbet1);this._dn1=Math.sqrt(1+geod._ep2*m.sq(sbet1));this._salp0=this.salp1*cbet1;this._calp0=m.hypot(this.calp1,this.salp1*sbet1);this._ssig1=sbet1;this._somg1=this._salp0*sbet1;this._csig1=this._comg1=sbet1!==0||this.calp1!==0?cbet1*this.calp1:1;t=m.hypot(this._ssig1,this._csig1);this._ssig1/=t;this._csig1/=t;this._k2=m.sq(this._calp0)*geod._ep2;eps=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2);if(this.caps&g.CAP_C1){this._A1m1=g.A1m1f(eps);this._C1a=new Array(g.nC1_+1);g.C1f(eps,this._C1a);this._B11=g.SinCosSeries(true,this._ssig1,this._csig1,this._C1a);s=Math.sin(this._B11);c=Math.cos(this._B11);this._stau1=this._ssig1*c+this._csig1*s;this._ctau1=this._csig1*c-this._ssig1*s;}
|
|
32291
|
+
if(this.caps&g.CAP_C1p){this._C1pa=new Array(g.nC1p_+1);g.C1pf(eps,this._C1pa);}
|
|
32292
|
+
if(this.caps&g.CAP_C2){this._A2m1=g.A2m1f(eps);this._C2a=new Array(g.nC2_+1);g.C2f(eps,this._C2a);this._B21=g.SinCosSeries(true,this._ssig1,this._csig1,this._C2a);}
|
|
32293
|
+
if(this.caps&g.CAP_C3){this._C3a=new Array(g.nC3_);geod.C3f(eps,this._C3a);this._A3c=-this.f*this._salp0*geod.A3f(eps);this._B31=g.SinCosSeries(true,this._ssig1,this._csig1,this._C3a);}
|
|
32294
|
+
if(this.caps&g.CAP_C4){this._C4a=new Array(g.nC4_);geod.C4f(eps,this._C4a);this._A4=m.sq(this.a)*this._calp0*this._salp0*geod._e2;this._B41=g.SinCosSeries(false,this._ssig1,this._csig1,this._C4a);}
|
|
32295
|
+
this.a13=this.s13=NaN;};l.GeodesicLine.prototype.GenPosition=function(arcmode,s12_a12,outmask){var vals={},sig12,ssig12,csig12,B12,AB1,ssig2,csig2,tau12,s,c,serr,omg12,lam12,lon12,E,sbet2,cbet2,somg2,comg2,salp2,calp2,dn2,B22,AB2,J12,t,B42,salp12,calp12;if(!outmask)outmask=g.STANDARD;else if(outmask===g.LONG_UNROLL)outmask|=g.STANDARD;outmask&=this.caps&g.OUT_MASK;vals.lat1=this.lat1;vals.azi1=this.azi1;vals.lon1=outmask&g.LONG_UNROLL?this.lon1:m.AngNormalize(this.lon1);if(arcmode)
|
|
32296
|
+
vals.a12=s12_a12;else
|
|
32297
|
+
vals.s12=s12_a12;if(!(arcmode||(this.caps&g.DISTANCE_IN&g.OUT_MASK))){vals.a12=NaN;return vals;}
|
|
32298
|
+
B12=0;AB1=0;if(arcmode){sig12=s12_a12*m.degree;t=m.sincosd(s12_a12);ssig12=t.s;csig12=t.c;}else {tau12=s12_a12/(this._b*(1+this._A1m1));s=Math.sin(tau12);c=Math.cos(tau12);B12=-g.SinCosSeries(true,this._stau1*c+this._ctau1*s,this._ctau1*c-this._stau1*s,this._C1pa);sig12=tau12-(B12-this._B11);ssig12=Math.sin(sig12);csig12=Math.cos(sig12);if(Math.abs(this.f)>0.01){ssig2=this._ssig1*csig12+this._csig1*ssig12;csig2=this._csig1*csig12-this._ssig1*ssig12;B12=g.SinCosSeries(true,ssig2,csig2,this._C1a);serr=(1+this._A1m1)*(sig12+(B12-this._B11))-
|
|
32299
|
+
s12_a12/this._b;sig12=sig12-serr/Math.sqrt(1+this._k2*m.sq(ssig2));ssig12=Math.sin(sig12);csig12=Math.cos(sig12);}}
|
|
32300
|
+
ssig2=this._ssig1*csig12+this._csig1*ssig12;csig2=this._csig1*csig12-this._ssig1*ssig12;dn2=Math.sqrt(1+this._k2*m.sq(ssig2));if(outmask&(g.DISTANCE|g.REDUCEDLENGTH|g.GEODESICSCALE)){if(arcmode||Math.abs(this.f)>0.01)
|
|
32301
|
+
B12=g.SinCosSeries(true,ssig2,csig2,this._C1a);AB1=(1+this._A1m1)*(B12-this._B11);}
|
|
32302
|
+
sbet2=this._calp0*ssig2;cbet2=m.hypot(this._salp0,this._calp0*csig2);if(cbet2===0)
|
|
32303
|
+
cbet2=csig2=g.tiny_;salp2=this._salp0;calp2=this._calp0*csig2;if(arcmode&&(outmask&g.DISTANCE))
|
|
32304
|
+
vals.s12=this._b*((1+this._A1m1)*sig12+AB1);if(outmask&g.LONGITUDE){somg2=this._salp0*ssig2;comg2=csig2;E=m.copysign(1,this._salp0);omg12=outmask&g.LONG_UNROLL?E*(sig12-
|
|
32305
|
+
(Math.atan2(ssig2,csig2)-
|
|
32306
|
+
Math.atan2(this._ssig1,this._csig1))+
|
|
32307
|
+
(Math.atan2(E*somg2,comg2)-
|
|
32308
|
+
Math.atan2(E*this._somg1,this._comg1))):Math.atan2(somg2*this._comg1-comg2*this._somg1,comg2*this._comg1+somg2*this._somg1);lam12=omg12+this._A3c*(sig12+(g.SinCosSeries(true,ssig2,csig2,this._C3a)-
|
|
32309
|
+
this._B31));lon12=lam12/m.degree;vals.lon2=outmask&g.LONG_UNROLL?this.lon1+lon12:m.AngNormalize(m.AngNormalize(this.lon1)+m.AngNormalize(lon12));}
|
|
32310
|
+
if(outmask&g.LATITUDE)
|
|
32311
|
+
vals.lat2=m.atan2d(sbet2,this._f1*cbet2);if(outmask&g.AZIMUTH)
|
|
32312
|
+
vals.azi2=m.atan2d(salp2,calp2);if(outmask&(g.REDUCEDLENGTH|g.GEODESICSCALE)){B22=g.SinCosSeries(true,ssig2,csig2,this._C2a);AB2=(1+this._A2m1)*(B22-this._B21);J12=(this._A1m1-this._A2m1)*sig12+(AB1-AB2);if(outmask&g.REDUCEDLENGTH)
|
|
32313
|
+
vals.m12=this._b*((dn2*(this._csig1*ssig2)-
|
|
32314
|
+
this._dn1*(this._ssig1*csig2))-
|
|
32315
|
+
this._csig1*csig2*J12);if(outmask&g.GEODESICSCALE){t=this._k2*(ssig2-this._ssig1)*(ssig2+this._ssig1)/(this._dn1+dn2);vals.M12=csig12+
|
|
32316
|
+
(t*ssig2-csig2*J12)*this._ssig1/this._dn1;vals.M21=csig12-
|
|
32317
|
+
(t*this._ssig1-this._csig1*J12)*ssig2/dn2;}}
|
|
32318
|
+
if(outmask&g.AREA){B42=g.SinCosSeries(false,ssig2,csig2,this._C4a);if(this._calp0===0||this._salp0===0){salp12=salp2*this.calp1-calp2*this.salp1;calp12=calp2*this.calp1+salp2*this.salp1;}else {salp12=this._calp0*this._salp0*(csig12<=0?this._csig1*(1-csig12)+ssig12*this._ssig1:ssig12*(this._csig1*ssig12/(1+csig12)+this._ssig1));calp12=m.sq(this._salp0)+m.sq(this._calp0)*this._csig1*csig2;}
|
|
32319
|
+
vals.S12=this._c2*Math.atan2(salp12,calp12)+
|
|
32320
|
+
this._A4*(B42-this._B41);}
|
|
32321
|
+
if(!arcmode)
|
|
32322
|
+
vals.a12=sig12/m.degree;return vals;};l.GeodesicLine.prototype.Position=function(s12,outmask){return this.GenPosition(false,s12,outmask);};l.GeodesicLine.prototype.ArcPosition=function(a12,outmask){return this.GenPosition(true,a12,outmask);};l.GeodesicLine.prototype.GenSetDistance=function(arcmode,s13_a13){if(arcmode)
|
|
32323
|
+
this.SetArc(s13_a13);else
|
|
32324
|
+
this.SetDistance(s13_a13);};l.GeodesicLine.prototype.SetDistance=function(s13){var r;this.s13=s13;r=this.GenPosition(false,this.s13,g.ARC);this.a13=0+r.a12;};l.GeodesicLine.prototype.SetArc=function(a13){var r;this.a13=a13;r=this.GenPosition(true,this.a13,g.DISTANCE);this.s13=0+r.s12;};})(geodesic.Geodesic,geodesic.GeodesicLine,geodesic.Math);(function(p,g,m,a){"use strict";var transit,transitdirect,AreaReduceA,AreaReduceB;transit=function(lon1,lon2){var lon12=m.AngDiff(lon1,lon2).d;lon1=m.AngNormalize(lon1);lon2=m.AngNormalize(lon2);return lon12>0&&((lon1<0&&lon2>=0)||(lon1>0&&lon2===0))?1:(lon12<0&&lon1>=0&&lon2<0?-1:0);};transitdirect=function(lon1,lon2){lon1=lon1%720;lon2=lon2%720;return ((0<=lon2&&lon2<360)||lon2<-360?0:1)-
|
|
32325
|
+
((0<=lon1&&lon1<360)||lon1<-360?0:1);};AreaReduceA=function(area,area0,crossings,reverse,sign){area.Remainder(area0);if(crossings&1)
|
|
32326
|
+
area.Add((area.Sum()<0?1:-1)*area0/2);if(!reverse)
|
|
32327
|
+
area.Negate();if(sign){if(area.Sum()>area0/2)
|
|
32328
|
+
area.Add(-area0);else if(area.Sum()<=-area0/2)
|
|
32329
|
+
area.Add(+area0);}else {if(area.Sum()>=area0)
|
|
32330
|
+
area.Add(-area0);else if(area.Sum()<0)
|
|
32331
|
+
area.Add(+area0);}
|
|
32332
|
+
return 0+area.Sum();};AreaReduceB=function(area,area0,crossings,reverse,sign){area=m.remainder(area,area0);if(crossings&1)
|
|
32333
|
+
area+=(area<0?1:-1)*area0/2;if(!reverse)
|
|
32334
|
+
area*=-1;if(sign){if(area>area0/2)
|
|
32335
|
+
area-=area0;else if(area<=-area0/2)
|
|
32336
|
+
area+=area0;}else {if(area>=area0)
|
|
32337
|
+
area-=area0;else if(area<0)
|
|
32338
|
+
area+=area0;}
|
|
32339
|
+
return 0+area;};p.PolygonArea=function(geod,polyline){this._geod=geod;this.a=this._geod.a;this.f=this._geod.f;this._area0=4*Math.PI*geod._c2;this.polyline=!polyline?false:polyline;this._mask=g.LATITUDE|g.LONGITUDE|g.DISTANCE|(this.polyline?g.NONE:g.AREA|g.LONG_UNROLL);if(!this.polyline)
|
|
32340
|
+
this._areasum=new a.Accumulator(0);this._perimetersum=new a.Accumulator(0);this.Clear();};p.PolygonArea.prototype.Clear=function(){this.num=0;this._crossings=0;if(!this.polyline)
|
|
32341
|
+
this._areasum.Set(0);this._perimetersum.Set(0);this._lat0=this._lon0=this.lat=this.lon=NaN;};p.PolygonArea.prototype.AddPoint=function(lat,lon){var t;if(this.num===0){this._lat0=this.lat=lat;this._lon0=this.lon=lon;}else {t=this._geod.Inverse(this.lat,this.lon,lat,lon,this._mask);this._perimetersum.Add(t.s12);if(!this.polyline){this._areasum.Add(t.S12);this._crossings+=transit(this.lon,lon);}
|
|
32342
|
+
this.lat=lat;this.lon=lon;}
|
|
32343
|
+
++this.num;};p.PolygonArea.prototype.AddEdge=function(azi,s){var t;if(this.num){t=this._geod.Direct(this.lat,this.lon,azi,s,this._mask);this._perimetersum.Add(s);if(!this.polyline){this._areasum.Add(t.S12);this._crossings+=transitdirect(this.lon,t.lon2);}
|
|
32344
|
+
this.lat=t.lat2;this.lon=t.lon2;}
|
|
32345
|
+
++this.num;};p.PolygonArea.prototype.Compute=function(reverse,sign){var vals={number:this.num},t,tempsum;if(this.num<2){vals.perimeter=0;if(!this.polyline)
|
|
32346
|
+
vals.area=0;return vals;}
|
|
32347
|
+
if(this.polyline){vals.perimeter=this._perimetersum.Sum();return vals;}
|
|
32348
|
+
t=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask);vals.perimeter=this._perimetersum.Sum(t.s12);tempsum=new a.Accumulator(this._areasum);tempsum.Add(t.S12);vals.area=AreaReduceA(tempsum,this._area0,this._crossings+transit(this.lon,this._lon0),reverse,sign);return vals;};p.PolygonArea.prototype.TestPoint=function(lat,lon,reverse,sign){var vals={number:this.num+1},t,tempsum,crossings,i;if(this.num===0){vals.perimeter=0;if(!this.polyline)
|
|
32349
|
+
vals.area=0;return vals;}
|
|
32350
|
+
vals.perimeter=this._perimetersum.Sum();tempsum=this.polyline?0:this._areasum.Sum();crossings=this._crossings;for(i=0;i<(this.polyline?1:2);++i){t=this._geod.Inverse(i===0?this.lat:lat,i===0?this.lon:lon,i!==0?this._lat0:lat,i!==0?this._lon0:lon,this._mask);vals.perimeter+=t.s12;if(!this.polyline){tempsum+=t.S12;crossings+=transit(i===0?this.lon:lon,i!==0?this._lon0:lon);}}
|
|
32351
|
+
if(this.polyline)
|
|
32352
|
+
return vals;vals.area=AreaReduceB(tempsum,this._area0,crossings,reverse,sign);return vals;};p.PolygonArea.prototype.TestEdge=function(azi,s,reverse,sign){var vals={number:this.num?this.num+1:0},t,tempsum,crossings;if(this.num===0)
|
|
32353
|
+
return vals;vals.perimeter=this._perimetersum.Sum()+s;if(this.polyline)
|
|
32354
|
+
return vals;tempsum=this._areasum.Sum();crossings=this._crossings;t=this._geod.Direct(this.lat,this.lon,azi,s,this._mask);tempsum+=t.S12;crossings+=transitdirect(this.lon,t.lon2);crossings+=transit(t.lon2,this._lon0);t=this._geod.Inverse(t.lat2,t.lon2,this._lat0,this._lon0,this._mask);vals.perimeter+=t.s12;tempsum+=t.S12;vals.area=AreaReduceB(tempsum,this._area0,crossings,reverse,sign);return vals;};})(geodesic.PolygonArea,geodesic.Geodesic,geodesic.Math,geodesic.Accumulator);cb(geodesic);})(function(geo){if('object'==='object'&&module.exports){module.exports=geo;}else if(typeof undefined==='function'&&undefined.amd){undefined('geographiclib-geodesic',[],function(){return geo;});}else {window.geodesic=geo;}});
|
|
32355
|
+
} (geographiclibGeodesic_min$1));
|
|
32356
|
+
return geographiclibGeodesic_min$1.exports;
|
|
32357
|
+
}
|
|
32358
|
+
|
|
32359
|
+
var geographiclibGeodesic_minExports = requireGeographiclibGeodesic_min();
|
|
32360
|
+
var GeographicLib = /*@__PURE__*/getDefaultExportFromCjs(geographiclibGeodesic_minExports);
|
|
32361
|
+
|
|
32216
32362
|
// Export modules for use with custom require() function
|
|
32217
32363
|
window.modules = {
|
|
32218
32364
|
'iconv-lite': iconvLite,
|
|
32219
32365
|
'idb-keyval': idbKeyval,
|
|
32220
32366
|
'@placemarkio/tokml': tokml,
|
|
32221
32367
|
'@tmcw/togeojson': togeojson,
|
|
32368
|
+
'geographiclib-geodesic': GeographicLib,
|
|
32222
32369
|
mproj,
|
|
32223
32370
|
flatbush: Flatbush,
|
|
32224
32371
|
kdbush: KDBush,
|
package/www/page.css
CHANGED
|
@@ -338,9 +338,9 @@ div.alert-box {
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
/*#file-selection-btn.inline-btn {
|
|
342
342
|
padding: 2px 4px 3px 3px;
|
|
343
|
-
}
|
|
343
|
+
}*/
|
|
344
344
|
|
|
345
345
|
/* --- File catalog --------------- */
|
|
346
346
|
|
|
@@ -531,7 +531,7 @@ div.alert-box {
|
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
.info-box h3 {
|
|
534
|
-
font-size:
|
|
534
|
+
font-size: 19px;
|
|
535
535
|
line-height: 1.1;
|
|
536
536
|
padding: 0;
|
|
537
537
|
margin: 0 0 0.4em 0;
|
|
@@ -543,9 +543,9 @@ div.alert-box {
|
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
.info-box h4 {
|
|
546
|
-
font-size:
|
|
547
|
-
font-weight:
|
|
548
|
-
margin:
|
|
546
|
+
font-size: 15.5px;
|
|
547
|
+
font-weight: 400;
|
|
548
|
+
margin: 5px 0 2px 0;
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
.info-box p {
|
|
@@ -1123,17 +1123,15 @@ img.close-btn:hover,
|
|
|
1123
1123
|
height: 100%;
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
|
-
.basemap-styles {
|
|
1127
|
-
margin: 0 -2px;
|
|
1128
|
-
white-space: nowrap;
|
|
1129
|
-
}
|
|
1130
1126
|
|
|
1131
|
-
.basemap-warning {
|
|
1127
|
+
p.basemap-warning {
|
|
1132
1128
|
color: #cc0000;
|
|
1129
|
+
font-size: 87%;
|
|
1130
|
+
margin-bottom: 0;
|
|
1133
1131
|
}
|
|
1134
1132
|
|
|
1135
1133
|
.basemap-note {
|
|
1136
|
-
font-size:
|
|
1134
|
+
font-size: 87%;
|
|
1137
1135
|
}
|
|
1138
1136
|
|
|
1139
1137
|
.basemap-prompt {
|
|
@@ -1146,41 +1144,24 @@ img.close-btn:hover,
|
|
|
1146
1144
|
position: absolute;
|
|
1147
1145
|
}
|
|
1148
1146
|
|
|
1149
|
-
.basemap-styles > div {
|
|
1150
|
-
display: inline-block;
|
|
1151
|
-
margin-bottom: 4px;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
.basemap-styles > div:nth-child(even) {
|
|
1155
|
-
position: relative;
|
|
1156
|
-
margin-left: 10px;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
1147
|
.basemap-style-btn {
|
|
1160
1148
|
position: relative;
|
|
1161
1149
|
border-width: 2px;
|
|
1162
|
-
border-color: #98cde2;
|
|
1163
1150
|
border-color: #bbddea;
|
|
1164
1151
|
border-style: solid;
|
|
1165
1152
|
border-radius: 6px;
|
|
1166
1153
|
}
|
|
1167
1154
|
|
|
1168
|
-
.basemap-style-btn img {
|
|
1169
|
-
display: block;
|
|
1170
|
-
width: 108px;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1155
|
div.basemap-style-btn.active {
|
|
1174
|
-
border-color: #
|
|
1156
|
+
border-color: #f7ba23;
|
|
1175
1157
|
}
|
|
1176
1158
|
|
|
1177
|
-
.basemap-
|
|
1159
|
+
.basemap-style-btn:not(.disabled) {
|
|
1178
1160
|
cursor: pointer;
|
|
1179
|
-
border-color: #f7e286;
|
|
1180
1161
|
}
|
|
1181
1162
|
|
|
1182
|
-
.basemap-style-
|
|
1183
|
-
|
|
1163
|
+
.basemap-buttons:not(.disabled) .basemap-style-btn:hover:not(.active) {
|
|
1164
|
+
border-color: #f7e286;
|
|
1184
1165
|
}
|
|
1185
1166
|
|
|
1186
1167
|
.basemap-overlay-buttons {
|
|
@@ -1201,7 +1182,6 @@ div.basemap-style-btn.active {
|
|
|
1201
1182
|
margin: 3px;
|
|
1202
1183
|
overflow: hidden;
|
|
1203
1184
|
display: inline-block;
|
|
1204
|
-
/*border-width: 1px;*/
|
|
1205
1185
|
}
|
|
1206
1186
|
|
|
1207
1187
|
.basemap-overlay-buttons.disabled > div {
|
|
@@ -1214,6 +1194,63 @@ div.basemap-style-btn.active {
|
|
|
1214
1194
|
width: 90px;
|
|
1215
1195
|
}
|
|
1216
1196
|
|
|
1197
|
+
.add-basemap-menu input[type=text] {
|
|
1198
|
+
width: 222px;
|
|
1199
|
+
margin-top: 3px;
|
|
1200
|
+
margin-bottom: 4px;
|
|
1201
|
+
padding: 2px;
|
|
1202
|
+
font-size: 12px;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.add-basemap-menu .menu-section {
|
|
1206
|
+
margin-top: 7px;
|
|
1207
|
+
margin-bottom: 6px;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.added-basemaps {
|
|
1211
|
+
margin-bottom: 4px;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.added-basemaps > div {
|
|
1215
|
+
position: relative;
|
|
1216
|
+
cursor: pointer;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.added-basemaps img.close-btn {
|
|
1220
|
+
position: absolute;
|
|
1221
|
+
cursor: pointer;
|
|
1222
|
+
width: 14px;
|
|
1223
|
+
height: 14px;
|
|
1224
|
+
padding: 0;
|
|
1225
|
+
top: 3px;
|
|
1226
|
+
right: 0px;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
.basemap-list-item.active img.off-icon {
|
|
1230
|
+
display:none;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.basemap-list-item:not(.active) img.on-icon {
|
|
1234
|
+
display:none;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.basemap-list-item img.off-icon {
|
|
1238
|
+
opacity: 0.3;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.basemap-list-item:hover img.off-icon {
|
|
1242
|
+
opacity: 0.7;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.added-basemaps img {
|
|
1246
|
+
width: 14px;
|
|
1247
|
+
height: 14px;
|
|
1248
|
+
padding-top: 2px;
|
|
1249
|
+
padding-right: 2px;
|
|
1250
|
+
vertical-align: top;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
|
|
1217
1254
|
.mapbox-improve-map {
|
|
1218
1255
|
display: none;
|
|
1219
1256
|
}
|