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>
jskinner-esristaff
You should be able to see that group, I added you automatically so hopefully you can see it. Let me know if you need anything else. Thank you!
Amanda Opp I can't seem to figure out why the tool is failing on this service. The features download, but it fails on the attachments. One workaround you can do is add the hosted feature service to ArcMap and create a local copy for editing.
Jake Skinner<https://community.esri.com/people/jskinner-esristaff?et=notification.mention>
I wasn’t even able to get the features to download so that is progress. I will take another shot at it and let you know if I come up with any solutions. Thank you for your help Jake!
It finally worked. Your tool is perfect, the problem was with my Arcgis! I just had to repair it in the control panel... Thanks you're brilliant!
Jake Skinner
I am trying to use your tool on two sets of data that come from Survey123. Both forms are feature services. I am able to download just the features but get the same error on both for the attachment portion. Would you take a look at it and let me know if there is a fix for this if you have time? I will share it with my test group so you can see it. Thanks!
amandaopp I was able to get this working. It appears Survey123 creates the GlobalID field as 'globalid' rather than 'GlobalID'. I updated the tool to check for this, it should now work.
I literally tried every version of GLOBALID but that! Thank you for getting back to me and helping with this.
Have you thought about having the ability to sync the data over to SQL like the Survey123 guys script does? I tried using that script for other HFS but it fails. A sync to SQL is more handy then just a download.
https://community.esri.com/groups/survey123/blog/2016/12/14/migrating-data-from-the-survey-feature-service-to-an-enterprise-geodatabase
For Survey123 use their sync script. Sync right to SQL versus the whole thing everytime
I tried giving a SQL db as the output location. It does add the records but also said it failed with this error
Error Copying Features: FILE: PATH\Download Service with Attachments.py, LINE: 260 "arcpy.Append_management(fs, outputFC)": ERROR 000466: C:\Users\hidden\AppData\Local\Temp\arcF24\mx987E9D92D4E54932AA9208308B7A60DC.gdb\ScratchRecordSet does not match the schema of target PATH\WorkingGIS.sde\WorkingGIS.DBO.LaGrandeSurvivalTreesFailed to execute (Append).
Also will it wipe and reload all each time?
Thanks
Hi there Doug,
Thanks for the information! I never thought of doing that. I will give it a try. Are you using the script for Survey123 Data with attachments? Can you set it up to automate? Thank you for the tip!
Yep easy to script just call the toolbox.
Replaced my path with the word PATH
Yes it handles attachments just fine.
import arcpy
syncToolbox = r"PATH\SyncFeatureService.tbx"
arcpy.ImportToolbox(syncToolbox)
# sde destination - where the HFS data will be copied TOsdeDest = r"PATH\WorkingGIS.sde"
# all FCs from the HFS will get this prefix in the SQL DBsdeTablePrefix = "s123"
# URL to the HFS for the survey to syncurlHFS = "http://services2.arcgis.com/PATH/arcgis/rest/services/service_STUFF/FeatureServer"
userName = "UN HERE"passWord = "PASS HERE"
# Run the toolboxarcpy.SyncFeatureService(sdeDest, sdeTablePrefix, urlHFS, "US/Pacific", "https://www.arcgis.com", userName, passWord)
print arcpy.GetMessages()
# Clean up memory otherwise it will not run twice in a rowarcpy.Delete_management("in_memory")
I did notice that there are 3,425 records but the script tries to do 4000 to 5000 for some reason. It is a table.
Hi, Jack Skinner
I'm new for using ArcMap 10.1, Could you guide me how to install "Download Service" (Your Attachment) in ArcMap 10.1 ? Really hope your help
Regards,
Yusrul
Hi All,
i produce a manual for this tool, hope this will help.
you can find it in the following link:
File sharing and storage made simple
Best,
Rawan
Hi Rawan Saleh,
Thanks for sharing the manual book of download service, but when i try
connect folder to download service that has been extracted, the script of
download service was not appeared on download service toolbox.
depending of that, can you help me to solve this problem??
Best Regards,
Amri
try to download the tool from the below link:
best,
It was still can not appear the script of download service and i attach
screen shot of the problem
Please help me to fix this problem. thanks
Thank you for this tool. I have successfully gotten it to work with AGOL Hosted Feature layers that are shared publicly, however, whenever I try to use the tool on a Feature Service that is either shared to a group, or not shared at all, using the credentials of the owner (which is also an admin)... it keeps spitting out this error.
I've run it on 10.5 and 10.3 desktop with the same issue.
Can I share it to a group and add your AGOL account to see if you can re-produce the error on your end? It is a hosted feature layer that was created from an existing ArcGIS Server feature service. I used the feature service as a template, but it is 100% a hosted feature layer.
Any help would be appreciated!
naalexandrou it looks like you're not adding the layer index (/0) to the URL. For example 'http://services3.arcgis.com/AWDwYUpli8WqpWxQ/arcgis/rest/services/Public_Tree_Request/FeatureServer/0'
I forgot to when I ran it quickly to grab a screen shot for my post.... I've been adding the layer index.
naalexandrou feel free to invite my user account (jskinner_CountySandbox) to a Group and I can take a look.
jskinner-esristaff ... okay, I just did. Thank you for you help
Nick Alexandrou I was not able to reproduce this. Here is how I had the tool setup:
Make sure you have the latest version of this tool downloaded.
That's so strange.... I have Version 18 downloaded. I'm wondering if there is something corrupt in my Python install. I've recently moved to 10.5 and maybe something got fudged?
Hi,
I'm very grateful for this tool, and it works great.
That being said, is there something I'm missing, or it can only download a Shapefile version of the feature service, and not a FGDB?
I'm getting the error (error exporting service to FGDB), but still really need to download a FGDB. I'm losing info (domain for precoded menus) while importing a Shapefile...
Does anybody now what causes the initial error on Online?
Thanks!
naalexandrou I would try running the tool from another machine to see if you are running into the same issue.
OBVYamaska this tool can download to a File Geodatabase, however it will not maintain the domains. These will need to be recreated.
Hi Jake,
How can this be done? I don't see any option about the type of output file...
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.