Beijing54坐标系——Y坐标(6位数和8位数)区别

今天用ArcGIS处理了两份CAD数据,提取里面的要素到shp中,结果闹了个大乌龙。
两家企业是同一片区域的,都是使用的北京54坐标系,按理说x、y坐标应该相差不大。直接提取出shp后,因为不知道中央子午线是多少度,所以未定义坐标系,结果在地图上看到两家根本不在一块区域,y坐标还好都是7位数,x坐标一个6位数一个8位数。跑到CAD里面看了看,确实是这样没错(CAD的测量坐标的Y坐标就是一个6位数,一个8位数)

(注意:arcgis显示的xy坐标和CAD的测量坐标是反着的,测量坐标里面的y坐标就是经度上的,对应arcgis的x坐标)
刚开始还以为是不是因为不是使用同一个经度带,经过尝试,还是不行。后来上网一查才发现,原来测量坐标的y坐标还分两种,一种是6位的,不加带号,一种是8位的,前两位是带好。明白了之后又在想怎么定义坐标系,让ArcGIS能自动识别8位的前两位是带号呢,通过查看arcgis中Beijing54的坐标系,我恍然大悟了。
先来说说Beijing54坐标系是如何计算中央子午线的吧。


已知一个地方的经纬度,首先确定您的坐标系统是3度带还是6度带投影
公式推算:
6度带中央子午线计算公式:
当地经度/6=N;中央子午线L=6 * N (带号)
当没有除尽,N有余数时,中央子午线L=6*N - 3

3度带中央子午线计算公式:
当地经度/3=N;中央子午线L=3 X N

我国的经度范围西起 73°东至135°,可分成
六度带十一个(13号带————23号带),各带中央经线依次为(75°、81°、……123°、129°、135°);

三度带二十二 个(24号带————45号带)。各带中央经线依次为(72°、75°、……132°、135°);

六度带可用于中小比例尺(如 1:250000)测图,三度带可用于大比例尺(如 1:10000)测图,城建坐标多采用三度带的高斯投影。


在我的数据里,8位数的y坐标的前两位是“40”,因此可以知道是40号带,由于在中国境内,所以可以确定的3度带投影。根据上面的计算公式,可以计算出中央子午线L=3x40=120°。
接下来就是到arcgis里面定义坐标系了,在"投影坐标系=>Gauss Kruger=>Beijing 1954"中可以看到下面这两种形式的坐标系,第一幅图:6位数不加带号的定义这个坐标系;第二幅图:8位数加带号的定义这个坐标系。
6位数不加带号的定义这个坐标系 8位数加带号的定义这个坐标系
定义完后,地图打开就正常了。>-_-<

### 回答1: 您好,我可以回答这个问题。以下是一个将ECEF坐标系转化为站心坐标系的Matlab程序: function [az,el,rho] = ecef2azel(lat,lon,hgt,x,y,z) % Constants a = 6378137; % Earth's semi-major axis (m) b = 6356752.3142; % Earth's semi-minor axis (m) e = sqrt(1 - (b/a)^2); % Eccentricity phi = deg2rad(lat); % Latitude (radians) lambda = deg2rad(lon); % Longitude (radians) N = a / sqrt(1 - e^2*sin(phi)^2); % Prime vertical radius of curvature X = x - cos(phi)*cos(lambda)*hgt; % ECEF X coordinate Y = y - cos(phi)*sin(lambda)*hgt; % ECEF Y coordinate Z = z + sin(phi)*hgt; % ECEF Z coordinate rho = sqrt(X^2 + Y^2 + Z^2); % Geocentric distance sin_phi_p = Z / rho; % Sine of the geocentric latitude cos_phi_p = sqrt(1 - sin_phi_p^2); % Cosine of the geocentric latitude sin_lambda = Y / sqrt(X^2 + Y^2); % Sine of the longitude cos_lambda = X / sqrt(X^2 + Y^2); % Cosine of the longitude sin_phi = sin_phi_p*cos(deg2rad(90-lat)) + cos_phi_p*sin(deg2rad(90-lat))*cos(deg2rad(lon)); % Sine of the latitude cos_phi = sqrt(1 - sin_phi^2); % Cosine of the latitude az = rad2deg(atan2(-sin_lambda,cos_lambda*sin_phi - tan(phi)*cos_phi)); % Azimuth angle (degrees) el = rad2deg(asin(sin_phi_p*sin(deg2rad(90-lat)) - cos_phi_p*cos(deg2rad(90-lat))*cos(deg2rad(lon))*cos_phi)); % Elevation angle (degrees) % Example usage lat = 37.7749; % San Francisco latitude (degrees) lon = -122.4194; % San Francisco longitude (degrees) hgt = ; % San Francisco height above sea level (m) [x,y,z] = geodetic2ecef(lat,lon,hgt); % Convert geodetic coordinates to ECEF coordinates [az,el,rho] = ecef2azel(lat,lon,hgt,x,y,z); % Convert ECEF coordinates to azimuth, elevation, and range 希望这个程序能够帮到您。 ### 回答2: 在MATLAB中,可以使用以下代码编写一个将ECEF(地心地固坐标系)转换为站心坐标系的程序: ```matlab function [enuCoordinates] = ecef2enu(ecefCoordinates, referenceLocation) % ecefCoordinates: [x, y, z] in meters % referenceLocation: [latitude, longitude, altitude] in degrees and meters % Convert reference location to ECEF coordinates [refX, refY, refZ] = geodetic2ecef(referenceLocation(1), referenceLocation(2), referenceLocation(3)); % Compute the rotation matrix from ECEF to ENU coordinates phi = deg2rad(referenceLocation(1)); lambda = deg2rad(referenceLocation(2)); rotationMatrix = [-sin(lambda), cos(lambda), 0; -sin(phi)*cos(lambda), -sin(phi)*sin(lambda), cos(phi); cos(phi)*cos(lambda), cos(phi)*sin(lambda), sin(phi)]; % Convert ECEF coordinates to ENU coordinates enuCoordinates = rotationMatrix * (ecefCoordinates' - [refX; refY; refZ]); end ``` 这是一个名为`ecef2enu`的函,它接受ECEF坐标系中的坐标和参考置(经纬度和海拔),并返回相应的站心(东北天)坐标系坐标。 下面是一个使用该函的例子: ```matlab % Define the ECEF coordinates x = 3827074.028; y = 369539.961; z = 5070608.726; % Define the reference location (Beijing) latitude = 39.9042; longitude = 116.4074; altitude = 43.0; % Convert ECEF coordinates to ENU coordinates enuCoordinates = ecef2enu([x, y, z], [latitude, longitude, altitude]); % Display the ENU coordinates fprintf('East: %.2f meters\n', enuCoordinates(1)); fprintf('North: %.2f meters\n', enuCoordinates(2)); fprintf('Up: %.2f meters\n', enuCoordinates(3)); ``` 在这个例子中,我们将ECEF坐标系中的坐标(x=3827074.028,y=369539.961,z=5070608.726)转换为以北京为参考置的站心(东北天)坐标系中的坐标。程序输出了相应的东、北、天方向的坐标。 ### 回答3: ECEF(Earth-Centered, Earth-Fixed)坐标系是一种基于地球中心的固定坐标系,在许多应用领域中常用于描述置和定。而站心坐标系是以某一观测站为原点建立的坐标系,可以用于确定目标物体在该观测站上的置。 在MATLAB中,可以使用以下代码将ECEF坐标系转换为站心坐标系: ```matlab function [azimuth, elevation, range] = ecef2station(ecef, station) % 输入参: % ecef:目标物体在ECEF坐标系中的坐标(以米为单) % station:观测站在ECEF坐标系中的坐标(以米为单) % 计算目标物体到观测站的矢量 delta = ecef - station; % 计算目标物体到观测站的方角(azimuth,单为弧度) azimuth = atan2(delta(2), delta(1)); % 计算目标物体到观测站的仰角(elevation,单为弧度) range_horiz = norm(delta(1:2)); range = norm(delta); elevation = atan2(delta(3), range_horiz); end ``` 接下来,我们以一个例子来说明如何使用该程序。设定目标物体在ECEF坐标系中的坐标为[7440000, 633600, 5279000](单:米),观测站在ECEF坐标系中的坐标为[7388000, 615500, 5240000](单:米)。我们可以使用以下代码计算转换后的站心坐标系: ```matlab ecef = [7440000, 633600, 5279000]; station = [7388000, 615500, 5240000]; [azimuth, elevation, range] = ecef2station(ecef, station); fprintf('方角(azimuth):%f°\n', rad2deg(azimuth)); fprintf('仰角(elevation):%f°\n', rad2deg(elevation)); fprintf('距离(range):%f米\n', range); ``` 运行以上代码,将得到目标物体在站心坐标系中的方角为39.5240°,仰角为20.9482°,距离为7078.5950米。 这就是用MATLAB编写的将ECEF坐标系转化为站心坐标系的程序,并且给出了一个示例。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值