J'ai rencontré de nombreux utilisateurs qui ont demandé la possibilité de télécharger les services de fonctionnalités hébergés ArcGIS Online et les services de fonctionnalités/cartes ArcGIS Server. Voir l'outil ci-joint pour faire exactement cela. L'outil vous permettra également de télécharger les pièces jointes des services de fonctionnalités hébergés ArcGIS Online. J'espère que les utilisateurs trouveront cela utile et pratique.<\/P>
<\/P>
Mise à jour 10\/08\/17:<\/STRONG> L'outil téléchargera désormais les domaines de valeurs codées dans la géodatabase. De plus, consolidation des versions 2x et 3x en un seul outil. L'outil peut être exécuté depuis ArcGIS Pro ou ArcGIS Desktop.<\/P>Mise à jour 13\/11\/17: <\/STRONG>L'outil prend désormais en charge l'utilisation d'une clause where pour interroger le service.<\/P>Mise à jour 14\/03\/17:<\/STRONG> Mise à jour vers un script unique pour ArcMap\/Pro utilisant le module requests<\/P>Mise à jour 17\/01\/19:<\/STRONG> Merci à Adam Eversole<\/A> d'avoir signalé que la fonctionnalité de cet outil peut désormais être prise en charge par l'outil Feature Class to Feature Class<\/A> d'ArcGIS Pro :<\/P><\/P><\/BODY><\/HTML>
<\/P><\/BODY><\/HTML>
Jake Skinner i have created a group, add the shared the two main layers that we are having issues with. You should have been invited to join the group. Both the layers were working Sunday and Monday, now only one is working.
eeg_admin the tool executed successfully for only the e_a_kc_gy_inspection service. The other service may have been corrupted some how. I would recommend downloading the entire service, and then re-upload to ArcGIS Online to see if this fixes the issue.
I have added spatial filter https://github.com/nicogis/DownloadService
Hello, I am running into this error. I am using ArcMap 10.4 in a Citrix Environment.
Executing: DownloadService true false https://services1.arcgis.com/KbxwQRRfWyEYLgp4/ArcGIS/rest/services/BLM_UT_Cultural_Sites_Hosted/FeatureServer/1 # true false # # T:\UT\GisData\ut\so\projects\UT_AGOL\BLM\UASF.gdb\Sites_Mobile true #Start Time: Tue Apr 03 14:51:26 2018Running script DownloadService...Failed script DownloadService...
Traceback (most recent call last): File "T:\UT\GisData\ut\so\projects\UT_AGOL\BLM\ConfigFiles\DownloadServicewithAttachments.py", line 1, in <module> import arcpy, requests, json, os, math, sys, linecache, shutilImportError: No module named requests
Failed to execute (DownloadService).Failed at Tue Apr 03 14:51:26 2018 (Elapsed Time:
'requests' is not built in module so you need install it.
In Windows you can make pip install requests
Scott Kichman you can install the requests module with the following steps:
1. Open a command prompt as an administrator
2. Navigate to the Scripts folder in your python installation directory. Ex:
3. You can then run the following command:
pip install requests
After this installs see if the tool executes successfully.
Hello all, thank you for the help. I unfortunately am working in a Citrix
environment with our ArcGIS deployment and do not have administrative
access to the servers.
Could you possibly write those procedures out as I can then forward this
through our help remedy system that they install the correct module.
We are still using ArcGIS 10.4
Thank you!
Thank you so much for creating this tool. Is there anyone who can show me what their parameters look like when the tool is set up?
Daniel Huneycutt if you scroll through the comments you'll see some screen shots. Ex:
skichman@blm.gov_BLM_EGIS not sure what you mean by write the procedures out. I would just copy the steps in my comment and forward to an administrator for your ArcGIS environment.
Sorry, I meant like the backside of the tool.
dhuneyc what version of ArcGIS Desktop are you using? The zip file should come with a toolbox with all of these parameters already filled in.
Thanks Jake, I want sure if there was anything different to be done across
a citrix farm,,the module will have to be installed on every server correct?
I am using 10.3. When I unzipped it all I got was the script and a toolbox with no tool.
dhuneyc try re-downloading the tool again. I saved the toolbox as a 10.3 version.
Thanks for this very useful service. When extracting an AGOL service I noticed that when I used a service other than the 0 index, the attachments were still being downloaded for only the 0 index layer, so in the python script (line 502) i changed 'layers' : '0' to 'layers' : '1' and then it worked for the layer index 1 layer:
if getAttachments == 'true': # Create Replica to retrieve attachments arcpy.AddMessage("\nRetrieving Attachments\n") crUrl = baseURL[0:-7] + 'createReplica' crValues = {'f' : 'json', 'layers' : '1',
Hi,
using ArcgIS 10.2 desktop and python 2.7.3 installed under C:\Python27\ArcGIS10.2 (as part of ArcGIS desktop installation) and when try to run getting
C:\Python27\ArcGIS10.2
**** Messages when running the tool*****
Executing: Script true true https://services6.arcgis.com/FAgEZRLybpkpIX4O/ArcGIS/rest/services/BornTestV4/FeatureServer/0 true # # # C:\....\Test\Test.gdb\test # #Start Time: Wed Apr 11 09:29:00 2018Running script Script...
Traceback (most recent call last): File "C:\Durmus\Projects\MobilityReportCard\2018\DownloadServicewithAttachments.py", line 1, in <module> import arcpy, requests, json, os, math, sys, linecache, shutilImportError: No module named requests
Failed to execute (Script).Failed at Wed Apr 11 09:29:00 2018 (Elapsed Time: 0.05 seconds)
*****
I installed requests and all its dependencies (Dependent packages) using the same process described at: Install requests in python - YouTube
and tested using in the same python environment -2.7.3 using Using the Requests Library in Python (samples from this website and some web URL) and it appears to be working just fine (see below)
However, as seen above, the download python script is error out indicating requests module missing etc. (not sure whether this is the real issue)
and my script properties dialog box below
and parameter specifications are below (screenshots)
Note above Output feature class is specified as feature class (even though table indicated to be selected and can be downloaded using the tool) and associated required/optional settings are done for all parameters.
and trying to download the following service https://services6.arcgis.com/FAgEZRLybpkpIX4O/ArcGIS/rest/services/BornTestV4/FeatureServer/0 into the point feature class (pre-created in file geodatabase)
and getting requests module missing error message right at the start?
Filed with ESRI support, support suggested to check with Script author directly (and indicated will internally route this issue with ESRI author)
Any suggestions/resolutions?
And does this tool download all features regardless of the feature limitations that may be set up in the service (1000 by default) and can download data from the services that are not REST-based (OpenGIS Standards such as WMS etc.)
in C:\Python27\[ArcGISx6410.2 or ArcGIS10.2]\Lib\site-packages have you the folder 'requests' ?
Yes this tool download all features/rows (if your where is empty)
No, only from Rest Esri.
agency22 thank you for finding that! I went ahead and updated the code so that it will pull the correct attachments.
I'm a bit confused. Can this tool be run from ArcGIS Online? Can python scripts be run from ArcGIS Online?
No, this tool cannot be run from ArcGIS Online. The purpose of this tool is to provide the ability to download a services data so that you have a local copy (i.e. a feature class in a File Geodatabase).
Thanks for the quick reply.
It sure would be nice to have the ability to run Python scripts from ArcGIS Online.
You have this ability in Web AppBuilder. You can add python scripts to a toolbox in ArcMap/Pro, execute it, and then publish as a Geoprocessing Service to ArcGIS Server. Web AppBuilder has a Geoprocessing widget that allows you to execute Geoprocessing Services.
I am having the same issue with 10.3, but it works in my Pro instance and with my coworkers 10.5.
Trying to understand. For Web AppBuilder, I need to have ArcGIS Server (which we don't have) to run Python code. Here's what I would like to do in ArcGIS Online: Client A uploads a csv file or a table. Client A then pushes a button to run Python code which does all the heavy lifting, including geocoding from any coordinate system and any projection (not necessarily lon, lat), data cleaning, error checking, etc. No HTML. No Javascript. And no ArcGIS server. Is that doable?
Most of this functionality is available with ArcGIS Online:
CSV, TXT, and GPX files—ArcGIS Online Help | ArcGIS
Got it resolved working with ESRI analyst, issue turned out to be the version of the tool that is compatible with 10.2 (Good to have some compatibility document on this together with the tool to help users out).
Another question, in the case of multiple layers combined in a single service (feature or map service with multiple layers) is there any plan (or currently existing version) to download all service related layers (instead of specifying layer links individually)
error 000840: the value is not a string hidden
jhead@lakeworth can you post a screen shot of how you have the tool setup?
Can someone here help my with the following error? I am beyond excited to have found this Download Service, and can't wait to get it implemented into some new workflows.( Full Disclosure: I'm not particularly Py savy)
Error Adding Field: FILE: Z:\00706-0002\2018.04.16.Smoke Testing\DownloadServicewithAttachments.py, LINE: 575
"arcpy.AddField_management(fc, "GlobalID_Str", "TEXT")": Failed to execute. Parameters are not valid.
ERROR 000313: The length of Field Name must not be larger than 10
Failed to execute (AddField).
ArcGIS Desktop 10.5.1.7333 (Standard License)
Many thanks,
Jonathan
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.