操作洞穴调查数据包

davies的Python项目详细描述


戴维斯

davies是一个用于处理洞穴勘测数据的python包。

它目前处于开发的早期阶段,随着它的成熟,它的接口可能会发生变化。

当前支持包括:

  • Reading of Compass Project (.MAK) and Data (.DAT) source files, as well as compiled Plot (.PLT) files.
  • Writing Compass Data (.DAT) files.
  • Reading PocketTopo exported .TXT survey files.
  • That’s it! No loop closure algorithms, no visualization or editing tools (though our examples directory contains scripts with which to build tools of this sort)

浏览Davies API documentation

罗盘测量数据的示例用法:

from davies import compass

# Parse a .DAT file
datfile = compass.DatFile.read('MYCAVE.DAT')

print len(datfile)  # number of surveys in .DAT
>> 17

print datfile.length  # total surveyed footage including splays, etc.
>> 5332.2

print datfile.included_length  # total surveyed footage after discarding excluded shots
>> 5280.0

survey = datfile['BS']  # grab a survey by its survey designation

print survey.name
>> A

print survey.date
>> 2006-09-30

print survey.length  # surveyed footage including splays, etc.
>> 5332.2

print survey.included_length  # surveyed footage after discarding excluded shots
>> 5280.0

print survey.shots[0]
>> {'FROM': 'A1', 'TO': 'A2', 'LENGTH': 16.8, 'BEARING': 158.0, 'INC': -30.0, 'LEFT': 12.0, 'RIGHT': 15.0, 'UP': 15.0, 'DOWN': 20.0}

print survey.shots[0].azm  # azimuth after averaging front and backsights, magnetic declination
155.2

此示例显示谁在您的指南针项目中调查了最多的镜头:

from davies import compass

cavers = {}

for datfilename in sys.argv[1:]:
    for survey in compass.DatFile.read(datfilename):
        for member in survey.team:
            cavers[member] = cavers.get(member, 0.0) + survey.length

for name in sorted(cavers, key=cavers.get, reverse=True):
    print "%s:\t%0.1f" % (name, cavers[name])

安装

此软件需要python 2.7。它将not与较旧的python版本一起工作,尽管它may与python 3.3+一起工作。

版本可从python包索引进行安装,请参见 installation instructions或直接运行 Mac OS X或大多数Linux发行版上的以下命令:

$> pip install davies

如果您下载了源发行版或从git存储库签出,请使用以下命令在本地安装:

$> python setup.py install

发展发生在GitHub

https://travis-ci.org/riggsd/davies.svg?branch=master

名称

“戴维斯”这个名字是献给William E. Davies, 他开创了西弗吉尼亚洞穴系统调查的先河,并于1949年创作了《西弗吉尼亚洞穴》。比尔·戴维斯 后来为马里兰州进行了全州范围的洞穴调查,担任了 国家洞穴学会,并出版了权威的美国全喀斯特地图,喀斯特工程方面。戴维斯 今天仍然是西弗吉尼亚,美国和全世界洞穴测绘者的灵感来源。

许可证

davies是根据MIT License授权的免费/开源软件, 版权所有(c)2013-2016 Myotisoft LLC.

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

推荐PyPI第三方库


热门话题
序列化反序列化java。awt。颜色>java。木卫一。InvalidClassException   java禁用多个日期范围jDateChooser   java为什么我的特例apper会被扔进泽西/灰熊?   JavaIntelliJ比较两个覆盖率数据   java什么是servletsdefault。你怎么办?   单击几下libgdx后java按钮没有响应   使用java将字符串转换为JSONArray   文件系统在java中刷新fileSystemViewer   java如何在hibernate中避免脏检查   java奇怪的问题,带有分号和“无法解决…”   java将值从子面板传递到父面板   HTML JTextPane CSS的Java FontSizeAction   java文件代码神秘地变成了一堆(0000)