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


Python FeatureLayer.updateFeature方法代码示例

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


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

示例1: FeatureLayer

# 需要导入模块: from arcrest.agol import FeatureLayer [as 别名]
# 或者: from arcrest.agol.FeatureLayer import updateFeature [as 别名]
    securityinfo['referer_url'] = None
    securityinfo['token_url'] = None
    securityinfo['certificatefile'] = None
    securityinfo['keyfile'] = None
    securityinfo['client_id'] = None
    securityinfo['secret_id'] = None

    shh = securityhandlerhelper.securityhandlerhelper(securityinfo=securityinfo)
    if shh.valid == False:
        print shh.message
    else:
        fl= FeatureLayer(
            url=url,
            securityHandler=shh.securityhandler,
            proxy_port=proxy_port,
            proxy_url=proxy_url,
            initialize=True)

        out_fields = ['objectid']
        for fld in fieldInfo:
            out_fields.append(fld['FieldName'])

        resFeats = fl.query(where=sql,
                            out_fields=",".join(out_fields))
        for feat in resFeats:

            for fld in fieldInfo:
                feat.set_value(fld["FieldName"],fld['ValueToSet'])

        print fl.updateFeature(features=resFeats)
开发者ID:BrunoCaimar,项目名称:ArcREST,代码行数:32,代码来源:update_features.py

示例2: FeatureLayer

# 需要导入模块: from arcrest.agol import FeatureLayer [as 别名]
# 或者: from arcrest.agol.FeatureLayer import updateFeature [as 别名]
    securityinfo['keyfile'] = None
    securityinfo['client_id'] = None
    securityinfo['secret_id'] = None   
   
    shh = securityhandlerhelper.securityhandlerhelper(securityinfo=securityinfo)
    if shh.valid == False:
        print shh.message
    else:
        fl= FeatureLayer(
            url=url,
            securityHandler=shh.securityhandler,
            proxy_port=proxy_port,
            proxy_url=proxy_url,
            initialize=True)
        
        features = []
        json_string={'geometry': 
                        {
                            'y': 1885855.2531960313, 
                            'x': 1034495.0035156211}
                        ,
                     'attributes': 
                     {  'NAME': 'NameChange', 
                        'OBJECTID': 1
                     }}

        features.append(Feature(json_string=json_string))
      
       
        print fl.updateFeature(features=features)
开发者ID:knu2xs,项目名称:ArcREST,代码行数:32,代码来源:update_rows_to_service_from_dict.py


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