POST
|
Using this code, I managed to upgrade the different attributes containing my feature service, but not update the feature layer.
In the data_path, I've written the path where the file is updated. However, when I run the code does not update the layer.
from arcgis.gis import *
gis = GIS("url", "username", "password")
data = "C:\\xc\\Data\\Shps\\states_21basic.zip"
shpfile = gis.content.add({}, data)
#and then to publish it:
shpfile.publish()
shpPublisher = "url my service"
shpPublisher = gis.content.search('states_21basic')[0]
shpPublisher
#Now I'd like to update my feature service
data_path = " C:\\xc\\Data\\Shps_Update\\states_21basic.zip "
item_properties = {
"description":"Change description",
"title":"states_21basic", #the same title
"tags":"hello, byebye",
"type":"shapefile",
"typeKeywords":"shapefile",
"data":"file/zip"
}
shpPublisher.update(item_properties, data=data_path)
display(shpPublisher)
... View more
10-10-2016
01:03 AM
|
0
|
0
|
193
|
POST
|
How can I update my layers in ArcGIS Online using Python? From the platform I can upload one to one by overwrite tool. However, I'd like to know if there is some way by python to automate this task. At first, I've tried to update a shapefile in this way, but I want to update several shapefiles: from arcgis.gis import *gis = GIS("url", "username", "password")data = "C:\\xc\\Data\SDs\\states_21basic.zip"shpfile = gis.content.add({}, data) and then to publish it: shpfile.publish()
... View more
10-07-2016
01:12 AM
|
0
|
1
|
925
|
POST
|
Hi, I'd like to update all data layer using the python's API, exactly as does overwrite in the GUI of AGOL. Thanks
... View more
10-05-2016
01:02 AM
|
0
|
0
|
837
|
POST
|
Hi, we frequently use de 'overwrite' function in AGOL interface in order to update a feature service content, based on a .shp or .csv original file. We now would need to perform this same function using the Arcgis API for python. Can you please specify what modules, classes functions are needed. A sample code would be greta. Please note we need to update / overwrite from a file (shape, csv) not a .mxd or geodatase. Thanks a lot in advanced!
... View more
09-22-2016
07:15 AM
|
3
|
6
|
6400
|
POST
|
From the online interface arcgis, I would like to know if there is any way to upload multiple feature class with the overwrite tool. Thanks
... View more
09-22-2016
12:59 AM
|
0
|
1
|
968
|
Title | Kudos | Posted |
---|---|---|
3 | 09-22-2016 07:15 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|