高斯投影到等角圆锥投影变换C++源代码
一、 设计目的:
加深理解投影地图投影变换的实质,掌握高斯—克吕格投影和等角圆锥投影,掌握二者投影之间的关系
二、 设计内容:
1编程实现由高斯投影反算;
2由反算出的经纬度来确定等角圆锥投影的常数;
3准确计算出点在等角圆锥投影的坐标。
三、 方法与步骤:
1、理解公式中每个字母的含义;
2、按照高斯克吕格投影公式进行编译,程序代码如下:
#include "iostream.h"
#include "math.h"
int main()
{
int L[4],B[4],C[3],D[3],L0;
double l,N,a0,a4,a6,a3,a5,x,y,BB,P,b,Z,Bf,b2,b3,b4,b5,Nf,LL,xx,yy;
cout<<"请依次输入坐标x,y(m):"<<endl;
cin>>xx>>yy;
毕业论文http://www.751com.cn/ 论文网http://www.751com.cn/
+(293622+(2350+22*cos(b)*cos(b))*cos(b)*cos(b))*cos(b)*cos(b))*(1.0E-10)*sin(b)*cos(b);
Nf=6399698.902-(21562.267-(108.973-0.612*cos(Bf)*cos(Bf))*cos(Bf)*cos(Bf))*cos(Bf)*cos(Bf);
Z=yy/(Nf*cos(Bf));
b2=(0.5+0.00336975*cos(Bf)*cos(Bf))*sin(Bf)*cos(Bf);
b3=0.333333-(0.1666667-0.001123*cos(Bf)*cos(Bf))*cos(Bf)*cos(Bf);
b4=0.25+(0.161612+0.005617*cos(Bf)*cos(Bf))*cos(Bf)*cos(Bf);
b5=0.2-(0.1667-0.00878*cos(Bf)*cos(Bf))*cos(Bf)*cos(Bf);
BB=Bf*3600*180/3.141592654-(1-(b4-0.147*Z*Z)*Z*Z)*Z*Z*b2*180*3600/3.141592654;
LL=L0*3600+(1-(b3-b5*Z*Z)*Z*Z)*Z*180*3600/3.1415926;
cout<<"反算结果为:"<<endl;
C[0]=int(BB/3600);
C[1]=int((BB-C[0]*3600)/60);
C[2]=int(BB-C[0]*3600-C[1]*60);
cout<<"B="<<C[0]<<"度"<<C[1]<<"分"<<C[2]<<"秒"<<endl;
D[0]=int(LL/3600);
D[1]=int((LL-D[0]*3600)/60);
D[2]=int(LL-D[0]*3600-D[1]*60);
cout<<"L="<<D[0]<<"度"<<D[1]<<"分"<<D[2]<<"秒"<<endl;
}
四:成果:
1、 运行结果如图:1260