本文整理汇总了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
示例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'