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>
Hi Jake,
Awesome! The tool works fine when i use a desktop with version 10.3
installed , but for version 10.4 it does not work, i get the following
error:
Is the tool constrained to version 10.3 and below?
Wesley
I tried fixing the proxy but getting the following attached error:
Kindly advise here:
Thanks Jake, will have a look at it tomorrow and let you know if outcome. Cheers!
Sent from my iPhone
Wesley Koros you may want to take a look at the following:
Using an HTTP PROXY - Python - Stack Overflow
Hi Jake
I've just tried to using this awesome tool, how can I handle proxy connexion issue. Kindly help
EA1, if you are using Web Tier authentication you will need to bypass your web adaptor to download the service. Ex:
https://ags1.esri.com:6443/arcgis/rest/services/Parcels/MapServer/0
Hi Jake, I appear to be having the exact same issue as Dave Tenney. The tool works if I turn off security using ArcGIS Server security. Once I use security I get the message: URL is incorrect. Or, Service is secure, please enter username and password. Were you able to resolve the issue that Dave Tenney had??
Thanks,
Eric
Hi Louis - If it helps I started testing a bare-bones method below (ArcGIS Pro 1.4) to download simple AGS FS records. I was anxious to see the process work with Pro/Python 3.4 because this is how we update many of our regional base layers from partnering agencies. As our test case was simple, the code below accounts for none of the error checking, case types, or number-of-records-handling that Jake's tool provides (which we use in production).
*Note: Even when the source AGS services' max record count is set above 1k I found that the process can bomb depending upon the combination of number of features, number of fields, etc. In my case the largest number of features I downloaded in one go was 10k parcels. Its likely that you'll have to account for a > 1k record set somehow (Jakes' tool accounts for this). But in one test I simply split the records: One url for the 1st half, One url for the 2nd half of the records...merged after.
I tried it on the service below and it appears to work. Click supported operations:'query' at bottom of page to ui-build json query (url).
https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0
In Pro python window (below):
localfc = r'C:\LocalFolder\Local.gdb\wwctrees' url = 'Insert your resulting url from json format Query (GET) here'fs = arcpy.FeatureSet() fs.load(url) arcpy.CopyFeatures_management(fs, localfc)
HTH
-Nick
FYI on this script from the Survey123 guys. It syncs to SQL.
https://community.esri.com/groups/survey123/blog/2016/12/14/migrating-data-from-the-survey-feature-service-to-an-enterprise-geodatabase
Thanks for looking into it jskinner-esristaff. I'll test with some other services. I believe we will be upgrading to 10.5 after the first service pack is released.
Patrick McKinney I believe this may be something specific with the service. I tested your service and the features stop downloading after 100,000, but I don't receive an error. I tested with a service (100,635 features) I published to ArcGIS Server and was able to successfully download it. I am also using ArcGIS Server 10.5, and I noticed you are using 10.3.1. If you would like to try the data I used, you can download it from here.
I sent you an invite. To provide some background, our regional public safety Task Force is looking into updating our regional datasets from each county using web services. This tool is very promising if we can get all records from services.
Thanks for looking into it,
Patrick
pankajjamwal does not currently support downloading domains or subtypes. You will need to recreate the subtypes for the feature class.
pmckinneyccpa can you share the service to a AGOL Group and invite me to the group to take a look. My AGOL username is jskinner_CountySandbox.
Thanks for this tool. I was able to use this tool but I am not able to download the Subtypes from the feature services. I have 6 subtypes (Taxon- Herp, Bird, Plant, Invert, Mammals, Fish) in GDB but after using this tool I got integer instead of Taxon names as shown below.
Any help would be highly appreciated.
I encountered an issue where the tool doesn't appear to work on Map Services from ArcGIS Server with over 100,000 records. The tool copied features up to 100,000, but then failed. I'm using a version of the tool I downloaded on July 20, 2015 (not sure if there have been changes since).
Error message:
Traceback (most recent call last): File "F:\Scripts\ArcGIS Desktop\Export Feature Service\Download Service with Attachments.py", line 170, in <module> fs.load(fsURL) File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\arcobjects\arcobjects.py", line 175, in load return convertArcObjectToPythonObject(self._arc_object.Load(*gp_fixargs(args)))RuntimeError: RecordSetObject: Cannot open table for Load
Failed to execute (DownloadService).Failed at Fri Dec 16 13:53:27 2016 (Elapsed Time: 17 minutes 39 seconds)
sure thing
dtenney I would need to take a look at the service URL. If you would like, you can send me a personal message with the URL and a username/password I could use.
we are using the server built-in security...
Dave Tenney how do you have the service secured, using Active Directory or ArcGIS Server Built-In? If you are using Active Directory, do you know if the authentication tier is at the Web Server or GIS Server? It may be helpful to include a screen shot of ArcGIS Server Manager > Security tab. Ex:
jskinner-esristaff
it appears to be a public vs secure service issue.
i briefly made my service public and the tool ran great. the minute i returned it back to private the tool fails...any thooughts?
im am sure that i am giving the correct un/pw
dave
RawansSaleh this tool will only work with map/feature services.
Generating Token
URL is incorrect. Or, Service is secure, please enter username and password.
Completed script DownloadService...Failed to execute (DownloadService).Failed at Wed Dec 07 14:15:53 2016 (Elapsed Time: 4.24 seconds)
im not really sure why its saying the URL is incorrect, the service is secure and i provided the appropriate un/pw.
Hi All,
Could i use this tool to extract an orthophoto services?
Best
Rawan
feature class (countywide roads) downloads very fast. so it seems that the tool may not like the view that is published.
thanks for your help
Dave Tenney, it should not take that long. Couple things to try:
1. Does downloading a service based on a feature class, rather than a view, take as long?
2. Try downloading a service from another resource, i.e.:
https://sampleserver6.arcgisonline.com/arcgis/rest/services
Finally got it to work...
one question...
We have a service that is published to arcgis server.
1) view is created in arcgis desktop from a sql database connection
2) view shows QC errors that are populated within the sql database as client updates data
3) the created view is then published to arcgis server for the client to view.
our current test service only has 7 features in it and the download service tool took almost 6minutes to download those 7 features. is it normal for it to take that long? our real world service will have 100s if not 1000s of features, see the problem?
thanks
i do not, it is however a secured service so i am prompted to enter my un/pw, which is the same as i enter into the tool.
are there any known issues with secured services or any known issues with Desktop Version issues?
Dave
dtenney when you enter the REST URL to the service in a web browser, do you receive a warning that the web site is not trusted?
running into SSL issue with this tool, see image below.
running 10.2.2
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.