与大地测量和地理空间数据相关的算法和结构集

geo-p的Python项目详细描述


与大地测量学相关的一组算法和结构。在

美国石油学会

你知道吗地理球体

函数到球体上

geo.sphere.近似距离

defapproximate_distance(point1,point2):

近似计算距离 (围绕中点展开三角函数)

geo.sphere.haversine_距离

^{pr2}$

计算两点之间的哈弗斯线距离(见https://en.wikipedia.org/wiki/Haversine_formulahttps://www.math.ksu.edu/~dbski/writings/haversine.pdf

对于小距离来说在数值上更好

地球球体距离

defdistance(point1,point2):

计算大圆距离(见https://en.wikipedia.org/wiki/Great-circle_distance

地球球体方位

defbearing(point1,point2):

计算两点间的初始方位 (见http://www.movable-type.co.uk/scripts/latlong.html

geo.sphere.final_方位角

deffinal_bearing(point1,point2):

计算两点之间的最终轴承(初始轴承+180)

geo.sphere.目的地

defdestination(point,distance,bearing):

给定一个起点、初始方位角和距离,这将 计算终点和最终轴承行程 沿着(最短距离)大圆弧。(见http://www.movable-type.co.uk/scripts/latlong.htm

geo.sphere.近似目的地

defapproximate_destination(point,distance,theta):

geo.sphere.from 4326_至3857

deffrom4326_to3857(point):

重新投影点爱普生:4326(https://epsg.io/4326)到爱普生:3857(https://epsg.io/3857)(参见http://wiki.openstreetmap.org/wiki/Mercator)在

Spherical Mercator:
E = R*(λ - λo) N = R*ln(tan(π/4+φ/2))

geo.sphere.from 3857_至4326

deffrom4326_to3857(point):

重新投影点爱普生:3857(https://epsg.io/3857)到爱普生:4326(https://epsg.io/4326)(参见http://wiki.openstreetmap.org/wiki/Mercator)在

Reverse Spherical Mercator:
λ = E/R + λo φ = π/2 - 2*arctan(exp(-N/R))

你知道吗地球椭球体

椭圆体上的函数

地球椭球体距离

defdistance(point1,point2,ellipsoid=WGS84):

用vincenty公式计算距离 (见https://en.wikipedia.org/wiki/Vincenty’s_formulae

从4326_到3395的地球椭球体

deffrom4326_to3395(point,ellipsoid=WGS84):

重新投影点爱普生:4326(https://epsg.io/4326)到爱普生:3395(https://epsg.io/3395)(参见https://en.wikipedia.org/wiki/Mercator_投影)在

Ellipsoidal Mercator:
E = a*(λ - λo) N = a*ln(tan(π/4+φ/2)*((1-e*sin(φ))/(1+e*sin(φ)))**e/2)

从geo椭球到椭圆体

deffrom3395_to4326(point,ellipsoid=WGS84):

重新投影点爱普生:3395(https://epsg.io/3395)到爱普生:4326(https://epsg.io/4326)(参见https://en.wikipedia.org/wiki/Mercator_投影)在

Reverse Ellipsoidal Mercator:
λ = E/a + λo φ = π/2 + 2*arctan(exp(-N/a)*((1-e*sin(φ))/(1+e*sin(φ))**e/2))

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
隐写术中随机lsb位的java访问   java如何使用GZIP压缩Http Post正文   java Mockito的when()不是stubing超类的方法   java安卓:片段中的Setter&在recycleServiceAdapter中获取字符串   用JDBC进行简单的客户端中间件仿真   JavaF:param返回null?   Java413语音错误   java获取子文档中的数据   启用持久性的java嵌入式HornetQ无法使用编程配置启动   运行spring引导jar工件时出现java“在METAINF/spring.factories中找不到自动配置类”错误   java如何格式化Spring引导的GET请求中的对象   swing Java填充自定义形状   Java仅在超类中处理序列化   在java应用程序中使用ftp4j库下载/上载时发生FTP错误   java准备语句作为sql参数