惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
云风的 BLOG
云风的 BLOG
小众软件
小众软件
IT之家
IT之家
T
Tailwind CSS Blog
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
美团技术团队
博客园 - 叶小钗
V
V2EX
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
罗磊的独立博客
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
月光博客
月光博客
有赞技术团队
有赞技术团队

博客园 - columbus2

用Python作GIS之五:从示例入手—example函数 用Python作GIS之四:Tkinter基本界面的搭建 用Python作GIS之三:入口程序 - stargui.py 用Python作GIS之二:STARS开发环境配置 用Python作GIS之一:介入STARS OpenBlock:针对EveryBlock.com源码的开源拓展项目 EveryBlock源代码 空间数据可视化 GeoDjango教程[3] GeoDjango教程[2] GeoDjango教程[1] 地理信息技术在现场项目的应用浅析 ESRI and SAP 防卫力量与公共安全:SAP与地理信息的集成 VRML之desk [地图投影之C实现]原数据 [地图投影之C实现]主程序 [地图投影之C实现]PARAMETE.H 关于地图投影的C程序的一些说明
[地图投影之C实现]BASIC_FU.C
columbus2 · 2013-01-19 · via 博客园 - columbus2
double Eccentricity()                             /*THE FIRST ECCENTRICITY*/
{
   double a,b,c;
   a=pow(6378245.00,2);
   b=pow(6356863.00,2);
   c=(a-b)/a;
   c=sqrt(c);
   return c;
}

#define eccentricity Eccentricity()

double Eccentricity1()                           /*THE SECOND ECCENTRICITY*/
{
   double x,y;
   x=eccentricity*eccentricity;
   y=x/(1-x);
   return sqrt(y);
}

#define eccentricity1 Eccentricity1()

double Meridian_radius(double latitude)
{
   double x,y;
   x=sin(latitude);
   x=pow((1-eccentricity*eccentricity*x*x),1.5);
   y=major_radius*(1-eccentricity*eccentricity);
   return y/x;
}

double Prim_vertical_radius(double latitude)
{
   double x;
   x=sin(latitude);
   x=pow(1-eccentricity*eccentricity*x*x,0.5);
   return major_radius/x;
}

double Parallel_radius(double latitude)
{
   double x,y;
   x=cos(latitude);
   y=Prim_vertical_radius(latitude);
   return x*y;
}

double Meridian_length(double lowest_latitude,double highest_latitude)
{
   double x,h,meridian_length=0;
   int n=10000;
   h=(highest_latitude-lowest_latitude)/n;
   for(x=lowest_latitude;x      meridian_length+=Meridian_radius(x)*h;
   return meridian_length;
}

double Parallel_length(double latitude,double lowest_longitude,double highest_longitude)
{
   return Prim_vertical_radius(latitude)*cos(latitude)*(highest_longitude-lowest_longitude);
}

double Area(double lowest_latitude,double highest_latitude,double lowest_longitude,double highest_longitude)
{
   double x=highest_longitude-lowest_longitude;
   double y=(highest_latitude+lowest_latitude)/2;
   double z=(highest_latitude-lowest_latitude)/2;
   double k=2*pow(major_radius,2)*(1-pow(eccentricity,2))*x;
   double a=1+pow(eccentricity,2)/2+3*pow(eccentricity,4)/8+5*pow(eccentricity,6)/16;
   double b=pow(eccentricity,2)/6+3*pow(eccentricity,4)/16+3*pow(eccentricity,6)/16;
   double c=3*pow(eccentricity,4)/80+pow(eccentricity,6)/16;
   double d=pow(eccentricity,6)/112;
   double area=0;
   area=k*(a*sin(z)*cos(y)-b*sin(3*z)*cos(3*y)+c*sin(5*z)*cos(5*y)-d*sin(7*z)*cos(7*y));
   return area;
}

double Radiam(double dms)                         /*CHANGE DGREE TO ARC*/
{
   double p=3.14159265358979/180;
   return dms*p;
}

double U(double latitude)                  /*IMPORTANT CONST BEGIN FROM EX2*/
{
   double a=Radiam(45),e=Eccentricity(),u;
   u=asin(e*sin(latitude));
   u=tan(a+latitude/2)/pow(tan(a+u/2),e);
   return u;
}

double U1(double latitude)            /*FOR GAMA IN MAIN OF EX4*/
{
   double x;
   x=eccentricity1*eccentricity1*cos(latitude)*cos(latitude);
   return sqrt(x);
}

double Radiam1(double x,double y,double z)          /*CHANGE D.M.S. TO ARC*/
{
   double m;
   m=x+y/60+z/3600;
   return Radiam(m);
}