3
\ begingroup美元

我有一个问题大圈在笛卡尔坐标的计算:

有可能计算点沿着大圆UTM坐标,即给定两个点P1 (easting1 northing1)和P2 (easting2 northing2)有一个公式得到沿着测地线连接两个锚点(没有转换成地理坐标和背部)?

任何帮助都是赞赏!谢谢!

\ endgroup美元
1
  • 1
    \ begingroup美元 注意,对于大多数应用程序,一个大圆,你会跨越多个UTM区。 \ endgroup美元
    - - - - - -半日西蒙
    2019年4月10日,在38

1回答1

3
\ begingroup美元

UTM坐标系统,是一种横轴墨卡托投影分离在latitud经度乐队和限制程度的扭曲与投影仍然很少。同时,UTM坐标系统正形投影。因此,它保留了角度。这意味着在UTM区内,一条直线在UTM投影是一个很好的近似大圆在相对较短的距离,可以发现在UTM区。如果你不需要伟大的准确性,您可以跟踪直线在P1和P2之间。

下面的图显示了一条直线的最大偏差从一个大圆。在这种情况下P1红点在赤道和经度3°E,和最大偏差计算所有点显示盒6°x6°。

在这里输入图像描述

而小几百公里的距离内的分歧仍然存在,但更大的分歧可以找到更大的距离,特别是如果P1和P2在不同UTM区。

如果应用程序需要更大的距离,你不应该使用UTM投影。或者,如果您的应用程序需要更多的准确性在距离适合UTM投影,可以计算出大圆轨迹,但我不知道任何直接的公式。

我用什么,我知道这不是你要求的,是一些Matlab函数转换与UTM坐标,另一个在地理坐标计算大圆跟踪:

函数(纬度、经度)= greatCircle (P1, P2, N) % greatCircle计算点沿大圆弧线连接点P1 % % P1和P2, P2格式:[纬度,经度]% N:沿大圆弧线lat1点数= P1 (1);lon1 = P1 (2);lat2 = P2 (1);lon2 = P2 (2);lon12 = lon2-lon1;a1 = atan2d (cosd (lat2)。*信德(lon12), (cosd (lat1) *信德(lat2)信德(lat1) * cosd (lat1)。* cosd (lon12)));% a2 = atan2d (cosd (lat1)。*信德(lon12), (-cosd (lat2) *信德(lat1) +信德(lat2) * cosd (lat1)。* cosd (lon12)));a0 = atand(信德(a1)。* cosd (lat1)。/√((cosd (a1)。^ 2) +(信德(a1)。^ 2)。*(信德(lat1)。^ 2)));sigma01 = atan2d(罐内(lat1) cosd (a1));sigma12 = atan2d (√(cosd (lat1) *信德(lat2)信德(lat1) * cosd (lat2) * cosd (lon12)) ^ 2 + (cosd (lat2) *信德(lon12)) ^ 2),(信德(lat1) *信德(lat2) + cosd (lat1) * cosd (lat2) * cosd (lon12))); sigma02=sigma01+sigma12; lon01=atan2d(sind(a0)*sind(sigma01),cosd(sigma01)); lon0=lon1-lon01; sigma=linspace(sigma01,sigma02,N); lat=atan2d(cosd(a0)*sind(sigma),sqrt(cosd(sigma).^2+sind(a0)^2*sind(sigma).^2)); lon=wrapTo360(atan2d(sind(a0)*sind(sigma),cosd(sigma))+lon0); end

和转换:

函数[x, y, utmzone] = deg2utm(纬度、经度、黑龙江)% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % [x, y, utmzone] = deg2utm(纬度、经度)% %描述:函数将纬度/经度向量转换为UTM坐标(WGS84)。%一些代码已经从UTM提取。Gabriel Ruiz马丁内斯m函数。输入% %:%纬度:纬度向量。度。+ ddd。ddddd WGS84 %经度:经度向量。度。+ ddd。ddddd WGS84 % %输出:% x, y, utmzone。见示例1例% %:% Lat = (40.3154333; 46.283900; 37.577833; 28.645650; 38.855550; 25.061783]; % Lon=[-3.4857166; 7.8012333; -119.95525; -17.759533; -94.7990166; 121.640266]; % [x,y,utmzone] = deg2utm(Lat,Lon); % fprintf('%7.0f ',x) % 458731 407653 239027 230253 343898 362850 % fprintf('%7.0f ',y) % 4462881 5126290 4163083 3171843 4302285 2772478 % utmzone = % 30 T % 32 T % 11 S % 28 R % 15 S % 51 R % % Example 2: If you have Lat/Lon coordinates in Degrees, Minutes and Seconds % LatDMS=[40 18 55.56; 46 17 2.04]; % LonDMS=[-3 29 8.58; 7 48 4.44]; % Lat=dms2deg(mat2dms(LatDMS)); %convert into degrees % Lon=dms2deg(mat2dms(LonDMS)); %convert into degrees % [x,y,utmzone] = deg2utm(Lat,Lon) % % Author: % Rafael Palacios % Universidad Pontificia Comillas % Madrid, Spain % Version: Apr/06, Jun/06, Aug/06, Aug/06 % Aug/06: fixed a problem (found by Rodolphe Dewarrat) related to southern % hemisphere coordinates. % Aug/06: corrected m-Lint warnings %------------------------------------------------------------------------- % Argument checking % error(nargchk(2, 3, nargin)); %2 arguments required CHuso=true; if nargin==3 CHuso=false; end n1=length(Lat); n2=length(Lon); if (n1~=n2) error('Lat and Lon vectors should have the same length'); end % Memory pre-allocation % x=zeros(n1,1); y=zeros(n1,1); utmzone(n1,:)='60 X'; % Main Loop % for i=1:n1 la=Lat(i); lo=Lon(i); sa = 6378137.000000 ; sb = 6356752.314245; %e = ( ( ( sa ^ 2 ) - ( sb ^ 2 ) ) ^ 0.5 ) / sa; e2 = ( ( ( sa ^ 2 ) - ( sb ^ 2 ) ) ^ 0.5 ) / sb; e2cuadrada = e2 ^ 2; c = ( sa ^ 2 ) / sb; %alpha = ( sa - sb ) / sa; %f %ablandamiento = 1 / alpha; % 1/f lat = la * ( pi / 180 ); lon = lo * ( pi / 180 ); if CHuso Huso = fix( ( lo / 6 ) + 31); end S = ( ( Huso * 6 ) - 183 ); deltaS = lon - ( S * ( pi / 180 ) ); if (la<-72), Letra='C'; elseif (la<-64), Letra='D'; elseif (la<-56), Letra='E'; elseif (la<-48), Letra='F'; elseif (la<-40), Letra='G'; elseif (la<-32), Letra='H'; elseif (la<-24), Letra='J'; elseif (la<-16), Letra='K'; elseif (la<-8), Letra='L'; elseif (la<0), Letra='M'; elseif (la<8), Letra='N'; elseif (la<16), Letra='P'; elseif (la<24), Letra='Q'; elseif (la<32), Letra='R'; elseif (la<40), Letra='S'; elseif (la<48), Letra='T'; elseif (la<56), Letra='U'; elseif (la<64), Letra='V'; elseif (la<72), Letra='W'; else Letra='X'; end a = cos(lat) * sin(deltaS); epsilon = 0.5 * log( ( 1 + a) / ( 1 - a ) ); nu = atan( tan(lat) / cos(deltaS) ) - lat; v = ( c / ( ( 1 + ( e2cuadrada * ( cos(lat) ) ^ 2 ) ) ) ^ 0.5 ) * 0.9996; ta = ( e2cuadrada / 2 ) * epsilon ^ 2 * ( cos(lat) ) ^ 2; a1 = sin( 2 * lat ); a2 = a1 * ( cos(lat) ) ^ 2; j2 = lat + ( a1 / 2 ); j4 = ( ( 3 * j2 ) + a2 ) / 4; j6 = ( ( 5 * j4 ) + ( a2 * ( cos(lat) ) ^ 2) ) / 3; alfa = ( 3 / 4 ) * e2cuadrada; beta = ( 5 / 3 ) * alfa ^ 2; gama = ( 35 / 27 ) * alfa ^ 3; Bm = 0.9996 * c * ( lat - alfa * j2 + beta * j4 - gama * j6 ); xx = epsilon * v * ( 1 + ( ta / 3 ) ) + 500000; yy = nu * v * ( 1 + ta ) + Bm; if (yy<0) yy=9999999+yy; end x(i)=xx; y(i)=yy; utmzone(i,:)=sprintf('%02d %c',Huso,Letra); end

函数(纬度、经度)= utm2deg (yy, xx utmzone) % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(纬度、经度)= utm2deg (x, y, utmzone) % %描述:函数向量的UTM坐标转化为纬度/经度向量(WGS84)。%一些代码已经从UTMIP提取。Gabriel Ruiz马丁内斯m函数。输入:% % % x, y, utmzone。% %输出:% Lat:纬度向量。度。+ ddd。ddddd WGS84 %经度:经度向量。度。+ ddd。ddddd WGS84 % %示例1:% x = [458731; 407653; 239027; 230253; 343898; 362850]; % y=[4462881; 5126290; 4163083; 3171843; 4302285; 2772478]; % utmzone=['30 T'; '32 T'; '11 S'; '28 R'; '15 S'; '51 R']; % [Lat, Lon]=utm2deg(x,y,utmzone); % fprintf('%11.6f ',lat) % 40.315430 46.283902 37.577834 28.645647 38.855552 25.061780 % fprintf('%11.6f ',lon) % -3.485713 7.801235 -119.955246 -17.759537 -94.799019 121.640266 % % Example 2: If you need Lat/Lon coordinates in Degrees, Minutes and Seconds % [Lat, Lon]=utm2deg(x,y,utmzone); % LatDMS=dms2mat(deg2dms(Lat)) %LatDMS = % 40.00 18.00 55.55 % 46.00 17.00 2.01 % 37.00 34.00 40.17 % 28.00 38.00 44.33 % 38.00 51.00 19.96 % 25.00 3.00 42.41 % LonDMS=dms2mat(deg2dms(Lon)) %LonDMS = % -3.00 29.00 8.61 % 7.00 48.00 4.40 % -119.00 57.00 18.93 % -17.00 45.00 34.33 % -94.00 47.00 56.47 % 121.00 38.00 24.96 % % Author: % Rafael Palacios % Universidad Pontificia Comillas % Madrid, Spain % Version: Apr/06, Jun/06, Aug/06 % Aug/06: corrected m-Lint warnings %------------------------------------------------------------------------- % Argument checking % error(nargchk(3, 3, nargin)); %3 arguments required n1=length(xx); n2=length(yy); n3=size(utmzone,1); if (n1~=n2 || n1~=n3) error('x,y and utmzone vectors should have the same number or rows'); end c=size(utmzone,2); if (c~=4) error('utmzone should be a vector of strings like "30 T"'); end % Memory pre-allocation % Lat=zeros(n1,1); Lon=zeros(n1,1); % Main Loop % for i=1:n1 if (utmzone(i,4)>'X' || utmzone(i,4)<'C') fprintf('utm2deg: Warning utmzone should be a vector of strings like "30 T", not "30 t"\n'); end if (utmzone(i,4)>'M') hemis='N'; % Northern hemisphere else hemis='S'; end x=xx(i); y=yy(i); zone=str2double(utmzone(i,1:2)); sa = 6378137.000000 ; sb = 6356752.314245; % e = ( ( ( sa ^ 2 ) - ( sb ^ 2 ) ) ^ 0.5 ) / sa; e2 = ( ( ( sa ^ 2 ) - ( sb ^ 2 ) ) ^ 0.5 ) / sb; e2cuadrada = e2 ^ 2; c = ( sa ^ 2 ) / sb; % alpha = ( sa - sb ) / sa; %f % ablandamiento = 1 / alpha; % 1/f X = x - 500000; if hemis == 'S' || hemis == 's' Y = y - 10000000; else Y = y; end S = ( ( zone * 6 ) - 183 ); lat = Y / ( 6366197.724 * 0.9996 ); v = ( c / ( ( 1 + ( e2cuadrada * ( cos(lat) ) ^ 2 ) ) ) ^ 0.5 ) * 0.9996; a = X / v; a1 = sin( 2 * lat ); a2 = a1 * ( cos(lat) ) ^ 2; j2 = lat + ( a1 / 2 ); j4 = ( ( 3 * j2 ) + a2 ) / 4; j6 = ( ( 5 * j4 ) + ( a2 * ( cos(lat) ) ^ 2) ) / 3; alfa = ( 3 / 4 ) * e2cuadrada; beta = ( 5 / 3 ) * alfa ^ 2; gama = ( 35 / 27 ) * alfa ^ 3; Bm = 0.9996 * c * ( lat - alfa * j2 + beta * j4 - gama * j6 ); b = ( Y - Bm ) / v; Epsi = ( ( e2cuadrada * a^ 2 ) / 2 ) * ( cos(lat) )^ 2; Eps = a * ( 1 - ( Epsi / 3 ) ); nab = ( b * ( 1 - Epsi ) ) + lat; senoheps = ( exp(Eps) - exp(-Eps) ) / 2; Delt = atan(senoheps / (cos(nab) ) ); TaO = atan(cos(Delt) * tan(nab)); longitude = (Delt *(180 / pi ) ) + S; latitude = ( lat + ( 1 + e2cuadrada* (cos(lat)^ 2) - ( 3 / 2 ) * e2cuadrada * sin(lat) * cos(lat) * ( TaO - lat ) ) * ( TaO - lat ) ) * ... (180 / pi); Lat(i)=latitude; Lon(i)=longitude; end

我希望有帮助。

\ endgroup美元
3
  • \ begingroup美元 你确定大圈行UTM情节?我知道这是对恒向线行但肯定不是之外的任何一个大圆子午线吗?维基百科说:“在地图上直线(恒向线行),除了穴位或赤道,不对应于大圈” \ endgroup美元
    - - - - - -bweise
    2019年4月11日,在剩
  • 1
    \ begingroup美元 @bweise视情况而定。解释您的应用程序。如果你担心厘米精度,然后直线UTM并不大圈。否则他们UTM区域内是一个很好的近似。比UTM墨卡托是不一样的,因为UTM区域薄足以让失真小,他们只是6°宽,这是约660公里。 \ endgroup美元
    - - - - - -卡米洛·Rada
    2019年4月11日13:26
  • 1
    \ begingroup美元 @bweise看到编辑。我添加了信息的错误如果你使用直线,和一个解决方案来计算大圆跟踪但转换成地理。如果有直接的公式,你可能会有更好的运气问在地理信息系统。 \ endgroup美元
    - - - - - -卡米洛·Rada
    2019年4月11日18:10

你的答案

通过点击“发布你的答案”,你同意我们服务条款并承认您已阅读并理解我们的隐私政策的行为准则

不是你要找的答案?浏览其他问题标记问你自己的问题