当前位置: 首页>>代码示例>>Python>>正文


Python WebFeatureService.getcapabilities方法代码示例

本文整理汇总了Python中owslib.wfs.WebFeatureService.getcapabilities方法的典型用法代码示例。如果您正苦于以下问题:Python WebFeatureService.getcapabilities方法的具体用法?Python WebFeatureService.getcapabilities怎么用?Python WebFeatureService.getcapabilities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在owslib.wfs.WebFeatureService的用法示例。


在下文中一共展示了WebFeatureService.getcapabilities方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getODRL

# 需要导入模块: from owslib.wfs import WebFeatureService [as 别名]
# 或者: from owslib.wfs.WebFeatureService import getcapabilities [as 别名]
def getODRL(serviceURL):
    wfs = WebFeatureService(serviceURL)
    wfs.getcapabilities()    

    candidateURLs = re.findall(r'(https?://[^\s]+)', wfs.identification.accessconstraints)
    for url in candidateURLs:        
        response = urllib2.urlopen(url)
        response_text = response.read()
        if is_valid_protocol(response_text):
            return response_text
    # If we are here, there is not any valid ODRL XML in any of the URLs in Access Constraints
    return None
开发者ID:IAAA-Lab,项目名称:odrl-ogc-cache-policies,代码行数:14,代码来源:ODRL_Paper.py

示例2: WebFeatureService

# 需要导入模块: from owslib.wfs import WebFeatureService [as 别名]
# 或者: from owslib.wfs.WebFeatureService import getcapabilities [as 别名]
# coding=utf-8
from owslib.wfs import WebFeatureService
# pokud nefunguje na pripojeni https, pouzijeme http
url = 'http://gis.nature.cz/arcgis/services/UzemniOchrana/Natura2000/MapServer/WFSServer'
aopk = WebFeatureService(url)

capabilities = aopk.getcapabilities()
print (capabilities.geturl())

print (u'{}\n{}\n{}\n{}\n{}'.format(aopk.provider.name,
                                    aopk.identification.title,
                                    aopk.identification.keywords[0],
                                    aopk.identification.fees,
                                    aopk.identification.abstract))

for rec in aopk.contents:
    print (rec)

url='http://gis.nature.cz/arcgis/services/UzemniOchrana/ChranUzemi/MapServer/WFSServer'
chranena_uzemi_wfs = WebFeatureService(url)
for rec in chranena_uzemi_wfs.contents:
    print (rec)

identifier = u'ChranUzemi:Zonace_velkoplošného_zvláště_chráněného_území'
print (chranena_uzemi_wfs.contents[identifier])
    
print ('{}\n{}'.format(chranena_uzemi_wfs.contents[identifier].boundingBox,
                       chranena_uzemi_wfs.contents[identifier].crsOptions))

# getfeature nepodporuje UTF-8, ani zakodovani timto zpusobem nemusi fungovat
identifier = 'ChranUzemi:Zonace_velkoplo\xc5\xa1n\xc3\xa9ho_zvl\xc3\xa1\xc5\xa1t\xc4\x9b_chr\xc3\xa1n\xc4\x9bn\xc3\xa9ho_\xc3\xbazem\xc3\xad'
开发者ID:GISMentors,项目名称:geopython-zacatecnik,代码行数:33,代码来源:owslib-wfs-example.py


注:本文中的owslib.wfs.WebFeatureService.getcapabilities方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。