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