本文整理汇总了Python中owslib.namespaces.Namespaces.get_namespaces方法的典型用法代码示例。如果您正苦于以下问题:Python Namespaces.get_namespaces方法的具体用法?Python Namespaces.get_namespaces怎么用?Python Namespaces.get_namespaces使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owslib.namespaces.Namespaces
的用法示例。
在下文中一共展示了Namespaces.get_namespaces方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: patch_well_known_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def patch_well_known_namespaces(etree_module):
from owslib.namespaces import Namespaces
ns = Namespaces()
"""Monkey patches the etree module to add some well-known namespaces."""
etree_module._namespace_map.update(ns.get_namespaces())
示例2: patch_well_known_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def patch_well_known_namespaces(etree_module):
from owslib.namespaces import Namespaces
ns = Namespaces()
"""Monkey patches the etree module to add some well-known namespaces."""
for k,v in ns.get_namespaces().iteritems():
etree_module.register_namespace(k, v)
示例3: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
"""
Returns specified namespaces using owslib Namespaces function.
"""
n = Namespaces()
ns = n.get_namespaces(
["gco", "gmd", "gml", "gml32", "gmx", "gts", "srv", "xlink", "dc"])
return ns
示例4: get_namespaces_io100
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces_io100():
n = Namespaces()
ns = n.get_namespaces(["ogc","swes","sml","xlink","xsi"])
ns["ows"] = n.get_namespace("ows110")
ns["sos"] = n.get_namespace("sos20")
ns["gml"] = n.get_namespace("gml32")
ns["om"] = n.get_namespace("om20")
ns['swe'] = 'http://www.opengis.net/swe/2.0'
ns["sams"] = "http://www.opengis.net/samplingSpatial/2.0"
ns["sf"] = "http://www.opengis.net/sampling/2.0"
return ns
示例5: patch_well_known_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def patch_well_known_namespaces(etree_module):
import warnings
from owslib.namespaces import Namespaces
ns = Namespaces()
"""Monkey patches the etree module to add some well-known namespaces."""
try:
register_namespace = etree_module.register_namespace
except AttributeError:
try:
etree_module._namespace_map
def register_namespace(prefix, uri):
etree_module._namespace_map[uri] = prefix
except AttributeError:
def register_namespace(prefix, uri):
pass
warnings.warn("Only 'lxml.etree' >= 2.3 and 'xml.etree.ElementTree' >= 1.3 are fully supported!")
for k, v in ns.get_namespaces().iteritems():
register_namespace(k, v)
示例6: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces(["ogc"])
ns[None] = n.get_namespace("ogc")
return ns
示例7: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
ns = Namespaces()
return ns.get_namespaces(["swe20"])
示例8: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
return n.get_namespaces(["sml","gml","xlink"])
示例9: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces(["atom", "dc", "gml", "gml32", "xlink"])
ns.update(add_namespaces)
ns[None] = n.get_namespace("atom")
return ns
示例10: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces(["dif","fes","gml","ogc","xs","xsi"])
ns[None] = n.get_namespace("ogc")
return ns
示例11: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces("dif")
ns[None] = n.get_namespace("dif")
return ns
示例12: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
ns = Namespaces()
return ns.get_namespaces(["om10", "swe101", "swe20", "gml311", "xlink"])
示例13: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
return n.get_namespaces()
示例14: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces(["gco","gmd","gml","gml32","gmx","gts","srv","xlink"])
ns["che"] = 'http://www.geocat.ch/2008/che'
ns[None] = n.get_namespace("gmd")
return ns
示例15: get_namespaces
# 需要导入模块: from owslib.namespaces import Namespaces [as 别名]
# 或者: from owslib.namespaces.Namespaces import get_namespaces [as 别名]
def get_namespaces():
ns = Namespaces()
return ns.get_namespaces(["swe20", "xlink", "sos20", "om20", "gml32",
"xsi", "wml2"])