得到OGR驱动程序列表按字母顺序排列(a - z)

得到OGR驱动程序列表按字母顺序排列(a - z)
发布日期: 2016-10-06 更新日期: 1970-01-01 编辑:yubiao 浏览次数: 2251

标签:
 import ogr
cnt = ogr.GetDriverCount()
formatsList = []  # Empty List

for i in range(cnt):
    driver = ogr.GetDriver(i)
    driverName = driver.GetName()
    if not driverName in formatsList:
        formatsList.append(driverName)

formatsList.sort() # Sorting the messy list of ogr drivers

for i in formatsList:
    print i
说明:

它总是驱使我核心,命令行ogr2ogr–格式返回驱动程序“随机”名单。此代码返回按字母顺序从一个Z OGR的驱动程序列表。


Copyright © Since 2014. 开源地理空间基金会中文分会 吉ICP备05002032号

Powered by TorCMS

OSGeo 中国中心 邮件列表

问题讨论 : 要订阅或者退订列表,请点击 订阅

发言 : 请写信给: osgeo-china@lists.osgeo.org