在状态平面投影和long/lat之间转换

stateplane的Python项目详细描述


pystateplane

获取地理坐标的本地状态平面投影,然后 在坐标和本地状态平面之间自动转换 投影。

包括50个州,华盛顿特区,波多黎各, 美属萨摩亚、关岛和美属维尔京群岛。

查找本地状态机系统:

importstateplane# Returns the EPSG value for this (lon, lat)stateplane.identify(-73.2,43.2)# 32145# Return a short name for the projectionstateplane.identify(-88.2,41.2,'short')# 'IL_E'# Speed up the process by specifying a state FIPS codestateplane.identify(-88.2,41.2,'short',statefp='17')# 'IL_E'# Speed up the process even more by specifying a county FIPS code# These two calls are equivalentstateplane.identify(None,None,'short',countyfp='36005')stateplane.identify(None,None,'short',statefp='36',countyfp='005')# 'NY_LI'stateplane.identify(-80.1,36.2,fmt='short')# 'NC'# returns the FIPS code of the projectionstateplane.identify(-80.1,36.2,fmt='fips')'3200'

转换为本地状态平面的(东距,北距):

stateplane.from_lonlat(-80.1,36.2)(510673.2830651368,272340.60789450357)stateplane.from_lonlat(-75.2,40.2)(817080.8169336573,99364.28495057777)stateplane.identify(-75.2,40.2,fmt='short')'PA_S'

安装

假设你有pip,运行:

pip install stateplane

或者,下载存储库并运行:

python setup.py install

功能

状态平面。标识(lon,lat,fmt=none,statefp=none)

来自_lat lon(lat,lon,epsg=none,fips=none,abbr=none,statefp=none,countyfp=none)

from_lon lat(lon,lat,epsg=none,fips=none,abbr=none,statefp=none,countyfp=none)

对于这些函数,epsgfipsabbr可以用于 指定投影。statefp参数可用于指定 两位数的州(或地区)FIPS代码,结果是 有效的检查。使用countyfp指定五位数的县FIP 代码。或者,结合statefp,使用三位数的县 茎。

到拉特隆(东距,北距,epsg=none,fips=none,abbr=none)

到_lonlat(东距,北距,epsg=none,fips=none,abbr=none)

对于这些函数,至少是epsgfips和^{tt3}中的一个$ 必须提供。

注意事项

这个模块实际上只是一个很好的 pyproj库。通过执行 本机转换。我们很乐意接受拉取请求。

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

推荐PyPI第三方库


热门话题
java SimpleFramework和工厂方法   Java适当地处理异常   java单例类不起作用   java小程序和Swing在eclipse中不显示组件   多个键上的java Redisson FastRemove不起作用   java验证请求正文不等于模式   在Java中从URL读取数据   eche RecyclerView项的java Set自定义字体   string Java如何从Date获取HH:mm:ss   当Java应用程序落后于负载均衡器时,在某些URL上强制使用SSL   使用esapi时发生java错误   java使用流根据第二个列表中的值更新一个列表中的对象   组织。openqa。硒。Java中的NoTouchElementException WebDriver?   从JSON字符串Java创建CSV文件