本文整理汇总了Python中session.Session.get_WCS_VERSION_SUPPORTED方法的典型用法代码示例。如果您正苦于以下问题:Python Session.get_WCS_VERSION_SUPPORTED方法的具体用法?Python Session.get_WCS_VERSION_SUPPORTED怎么用?Python Session.get_WCS_VERSION_SUPPORTED使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session.Session
的用法示例。
在下文中一共展示了Session.get_WCS_VERSION_SUPPORTED方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_axis_labels
# 需要导入模块: from session import Session [as 别名]
# 或者: from session.Session import get_WCS_VERSION_SUPPORTED [as 别名]
def get_axis_labels(self):
"""
Returns the axis labels as a list
:rtype list[str]
"""
try:
service_call = self.wcs_service + "?service=WCS&request=DescribeCoverage&version=" + \
Session.get_WCS_VERSION_SUPPORTED() + "&coverageId=" + self.coverage_id
response = urllib.urlopen(service_call).read()
return response.split("axisLabels=\"")[1].split('"')[0].split(" ")
except Exception as ex:
raise RuntimeException("Could not retrieve the axis labels. Check that the WCS service is up and running.")
示例2: exists
# 需要导入模块: from session import Session [as 别名]
# 或者: from session.Session import get_WCS_VERSION_SUPPORTED [as 别名]
def exists(self):
"""
Returns true if the coverage exist, false otherwise
:rtype bool
"""
try:
service_call = self.wcs_service + "?service=WCS&request=DescribeCoverage&version=" + \
Session.get_WCS_VERSION_SUPPORTED() + "&coverageId=" + self.coverage_id
response = urllib.urlopen(service_call).read()
if 'exceptionCode="NoSuchCoverage' in response:
return False
else:
return True
except Exception as ex:
raise RuntimeException("Could not check if the coverage exists. "
"Check that the WCS service is up and running.")