本文整理汇总了Python中portalpy.Portal.feature_collection_templates方法的典型用法代码示例。如果您正苦于以下问题:Python Portal.feature_collection_templates方法的具体用法?Python Portal.feature_collection_templates怎么用?Python Portal.feature_collection_templates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portalpy.Portal
的用法示例。
在下文中一共展示了Portal.feature_collection_templates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: portal_info_plus
# 需要导入模块: from portalpy import Portal [as 别名]
# 或者: from portalpy.Portal import feature_collection_templates [as 别名]
def portal_info_plus():
portal = Portal('http://portaldev.esri.com')
print portal.info()
pprint(portal.properties())
pprint(portal.languages())
pprint(portal.regions())
pprint(portal.basemaps(['title']))
pprint(portal.color_sets(['title']))
pprint(portal.featured_items(['title']))
pprint(portal.featured_items_homepage(['title']))
pprint(portal.feature_collection_templates(['title']))
pprint(portal.symbol_sets(['title']))
pprint(portal.gallery_templates(['title']))
pprint(portal.webmap_templates(['title']))
示例2: main
# 需要导入模块: from portalpy import Portal [as 别名]
# 或者: from portalpy.Portal import feature_collection_templates [as 别名]
def main(argv=None):
portal = Portal('http://portaldev.esri.com')
template_name = 'Map Notes'
file_gdb_path = 'C:/Temp/MapNotes.gdb'
# Retrieve the layer definitions (schemas) for the specified
# feature collection template
template_id = portal.feature_collection_templates(q=template_name)[0]['id']
template = portal.item_data(template_id, return_json=True)
template_schemas = [layer['layerDefinition'] for layer in template['layers']]
# Create the file GDB with feature classes for each schema
create_file_gdb(file_gdb_path, template_schemas)
# Get all webmaps, pull out features that match the template schemas, and
# then load them into the corresponding feature classes in the file GDB
for webmap in portal.webmaps():
for template_schema in template_schemas:
features = webmap.features([template_schema])
if features:
load_features(file_gdb_path, template_schema['name'], features)