Hi guys whats the best way to process a Feature services url in arcpy?
I have number of feature services (here's and example of one layer: https://services1.arcgis.com/d0ZCwU7eGKVeNiEE/ArcGIS/rest/services/MVT_Trails/FeatureServer/0 )
I am trying to process these layers, clip them to my jurisdiction and then save them in a GDB. However, arcpy does not recognize a feature service and I am getting an error.
Does anyone know what I need to do?
Assuming you want to use the service as an input for geoprocessing tools in arcpy, I would recommend using the MakeFeatureLayer_management() function:
url = r"https://services1.arcgis.com/d0ZCwU7eGKVeNiEE/ArcGIS/rest/services/MVT_Trails/FeatureServer/0" layer_name = "MVT Trails" layer = MakeFeatureLayer_management(url, layer_name).getOutput(0)
I'm not a model builder guy; if you follow what Joshua Bixby instructs me to do, you should be fine. That was my first time into the api myself...
would it be easier to use model builder instead. I've never used Arcpy API.
see this post of mine:
https://community.esri.com/thread/246363-using-arcpy-to-copy-a-portal-feature-service-to-a-fgdb-feature-class
you'll need to venture into the arcpy api....
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.