1 |
- define(["exports","./Cartesian4-b0ddc4ba","./Check-7b2a090c","./when-b60132fc","./buildModuleUrl-8cce5713","./Math-31e539c2"],(function(t,i,a,e,n,h){"use strict";function s(t,i,a){if(0===t)return i*a;var e=t*t,n=e*e,h=n*e,s=h*e,r=s*e,o=r*e,u=a;return i*((1-e/4-3*n/64-5*h/256-175*s/16384-441*r/65536-4851*o/1048576)*u-(3*e/8+3*n/32+45*h/1024+105*s/4096+2205*r/131072+6237*o/524288)*Math.sin(2*u)+(15*n/256+45*h/1024+525*s/16384+1575*r/65536+155925*o/8388608)*Math.sin(4*u)-(35*h/3072+175*s/12288+3675*r/262144+13475*o/1048576)*Math.sin(6*u)+(315*s/131072+2205*r/524288+43659*o/8388608)*Math.sin(8*u)-(693*r/1310720+6237*o/5242880)*Math.sin(10*u)+1001*o/8388608*Math.sin(12*u))}function r(t,i){if(0===t)return Math.log(Math.tan(.5*(h.Math3D.PI_OVER_TWO+i)));var a=t*Math.sin(i);return Math.log(Math.tan(.5*(h.Math3D.PI_OVER_TWO+i)))-t/2*Math.log((1+a)/(1-a))}var o=new i.Cartesian3,u=new i.Cartesian3;function l(t,a,e,n){i.Cartesian3.normalize(n.cartographicToCartesian(a,u),o),i.Cartesian3.normalize(n.cartographicToCartesian(e,u),u);var l=n.maximumRadius,d=n.minimumRadius,M=l*l,c=d*d;t._ellipticitySquared=(M-c)/M,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=i.Cartographic.clone(a,t._start),t._start.height=0,t._end=i.Cartographic.clone(e,t._end),t._end.height=0,t._heading=function(t,i,a,e,n){var s=r(t._ellipticity,a),o=r(t._ellipticity,n);return Math.atan2(h.Math3D.negativePiToPi(e-i),o-s)}(t,a.longitude,a.latitude,e.longitude,e.latitude),t._distance=function(t,i,a,e,n,r,o){var u=t._heading,l=r-e,d=0;if(h.Math3D.equalsEpsilon(Math.abs(u),h.Math3D.PI_OVER_TWO,h.Math3D.EPSILON8))if(i===a)d=i*Math.cos(n)*h.Math3D.negativePiToPi(l);else{var M=Math.sin(n);d=i*Math.cos(n)*h.Math3D.negativePiToPi(l)/Math.sqrt(1-t._ellipticitySquared*M*M)}else{var c=s(t._ellipticity,i,n);d=(s(t._ellipticity,i,o)-c)/Math.cos(u)}return Math.abs(d)}(t,n.maximumRadius,n.minimumRadius,a.longitude,a.latitude,e.longitude,e.latitude)}function d(t,a,n,o,u,l){var d,M,c,_=u*u;if(Math.abs(h.Math3D.PI_OVER_TWO-Math.abs(a))>h.Math3D.EPSILON8){M=function(t,i,a){var e=t/a;if(0===i)return e;var n=e*e,h=n*e,s=h*e,r=i*i,o=r*r,u=o*r,l=u*r,d=l*r,M=d*r,c=Math.sin(2*e),_=Math.cos(2*e),g=Math.sin(4*e),p=Math.cos(4*e),f=Math.sin(6*e),P=Math.cos(6*e),D=Math.sin(8*e),v=Math.cos(8*e),O=Math.sin(10*e);return e+e*r/4+7*e*o/64+15*e*u/256+579*e*l/16384+1515*e*d/65536+16837*e*M/1048576+(3*e*o/16+45*e*u/256-e*(32*n-561)*l/4096-e*(232*n-1677)*d/16384+e*(399985-90560*n+512*s)*M/5242880)*_+(21*e*u/256+483*e*l/4096-e*(224*n-1969)*d/16384-e*(33152*n-112599)*M/1048576)*p+(151*e*l/4096+4681*e*d/65536+1479*e*M/16384-453*h*M/32768)*P+(1097*e*d/65536+42783*e*M/1048576)*v+8011*e*M/1048576*Math.cos(10*e)+(3*r/8+3*o/16+213*u/2048-3*n*u/64+255*l/4096-33*n*l/512+20861*d/524288-33*n*d/512+s*d/1024+28273*M/1048576-471*n*M/8192+9*s*M/4096)*c+(21*o/256+21*u/256+533*l/8192-21*n*l/512+197*d/4096-315*n*d/4096+584039*M/16777216-12517*n*M/131072+7*s*M/2048)*g+(151*u/6144+151*l/4096+5019*d/131072-453*n*d/16384+26965*M/786432-8607*n*M/131072)*f+(1097*l/131072+1097*d/65536+225797*M/10485760-1097*n*M/65536)*D+(8011*d/2621440+8011*M/1048576)*O+293393*M/251658240*Math.sin(12*e)}(s(u,o,t.latitude)+n*Math.cos(a),u,o);var g=r(u,t.latitude),p=r(u,M);c=Math.tan(a)*(p-g),d=h.Math3D.negativePiToPi(t.longitude+c)}else{var f;if(M=t.latitude,0===u)f=o*Math.cos(t.latitude);else{var P=Math.sin(t.latitude);f=o*Math.cos(t.latitude)/Math.sqrt(1-_*P*P)}c=n/f,d=a>0?h.Math3D.negativePiToPi(t.longitude+c):h.Math3D.negativePiToPi(t.longitude-c)}return e.defined(l)?(l.longitude=d,l.latitude=M,l.height=0,l):new i.Cartographic(d,M,0)}function M(t,a,h){var s=e.defaultValue(h,n.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new i.Cartographic,this._end=new i.Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e.defined(t)&&e.defined(a)&&l(this,t,a,s)}Object.defineProperties(M.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),M.fromStartHeadingDistance=function(t,i,a,s,r){var o=e.defaultValue(s,n.Ellipsoid.WGS84),u=o.maximumRadius,l=o.minimumRadius,c=u*u,_=l*l,g=Math.sqrt((c-_)/c),p=d(t,i=h.Math3D.negativePiToPi(i),a,o.maximumRadius,g);return!e.defined(r)||e.defined(s)&&!s.equals(r.ellipsoid)?new M(t,p,o):(r.setEndPoints(t,p),r)},M.prototype.setEndPoints=function(t,i){l(this,t,i,this._ellipsoid)},M.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},M.prototype.interpolateUsingSurfaceDistance=function(t,i){return d(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},M.prototype.findIntersectionWithLongitude=function(t,a){var n=this._ellipticity,s=this._heading,r=Math.abs(s),o=this._start;if(t=h.Math3D.negativePiToPi(t),h.Math3D.equalsEpsilon(Math.abs(t),Math.PI,h.Math3D.EPSILON14)&&(t=h.Math3D.sign(o.longitude)*Math.PI),e.defined(a)||(a=new i.Cartographic),Math.abs(h.Math3D.PI_OVER_TWO-r)<=h.Math3D.EPSILON8)return a.longitude=t,a.latitude=o.latitude,a.height=0,a;if(h.Math3D.equalsEpsilon(Math.abs(h.Math3D.PI_OVER_TWO-r),h.Math3D.PI_OVER_TWO,h.Math3D.EPSILON8)){if(h.Math3D.equalsEpsilon(t,o.longitude,h.Math3D.EPSILON12))return;return a.longitude=t,a.latitude=h.Math3D.PI_OVER_TWO*h.Math3D.sign(h.Math3D.PI_OVER_TWO-s),a.height=0,a}var u,l=o.latitude,d=n*Math.sin(l),M=Math.tan(.5*(h.Math3D.PI_OVER_TWO+l))*Math.exp((t-o.longitude)/Math.tan(s)),c=(1+d)/(1-d),_=o.latitude;do{u=_;var g=n*Math.sin(u),p=(1+g)/(1-g);_=2*Math.atan(M*Math.pow(p/c,n/2))-h.Math3D.PI_OVER_TWO}while(!h.Math3D.equalsEpsilon(_,u,h.Math3D.EPSILON12));return a.longitude=t,a.latitude=_,a.height=0,a},M.prototype.findIntersectionWithLatitude=function(t,a){var n=this._ellipticity,s=this._heading,o=this._start;if(!h.Math3D.equalsEpsilon(Math.abs(s),h.Math3D.PI_OVER_TWO,h.Math3D.EPSILON8)){var u=r(n,o.latitude),l=r(n,t),d=Math.tan(s)*(l-u),M=h.Math3D.negativePiToPi(o.longitude+d);return e.defined(a)?(a.longitude=M,a.latitude=t,a.height=0,a):new i.Cartographic(M,t,0)}},t.EllipsoidRhumbLine=M}));
|