Questions tagged [arcgis-python-api]

ArcGIS Python API for working with ArcGIS Online and Portal for ArcGIS

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Installing ArcGIS Python API with deep learning dependencies [duplicate]

I am a GIS guy and do not know much about deep learning and AI. How can I start using ArcGIS Python API to do GeoAI ?
-2
votes
1answer
24 views

updates parameter is invalid an item with the same key-has already been added

original_feature = [f for f in self.all_features if f.attributes['objectid'] == objectid][0] feature_to_be_updated = deepcopy(original_feature) # # some modification in between to attributes of ...
0
votes
0answers
10 views

How to get the job status of gis.item.export or make it execute synchronously?

I'm using the ArcGIS API for Python to export a feature service to a FGDB and then download it. My problem is that the export function appears to be asynchronous even though I set wait=True. The ...
0
votes
0answers
16 views

“The submitted field shape_length does not exsists in the table” error while using ArcGIS API for Python, clone_items to clone dashboard

I am cloning a dashboard from an ArcGIS Online account to a Portal using the clone_item function found in ArcGIS API for Python. The most common error I get is: The submitted field "shape_length&...
4
votes
1answer
83 views

Enable Popups for each layer in webmap using ArcGIS API for Python

I am looking to use the ArcGIS API for Python to enable popups for each layer in a webmap. I found Configure Popup Attributes Programmatically with ArcGIS API for Python on GeoNet which addresses how ...
1
vote
1answer
62 views

How can I use UpdateCursor in AGOL layers?

I'm all new to Python, and 'Im stuck with a problem: Is it possible to use UpdateCursor on Feature Layers in AGOL? I am trying something like this: from arcgis.gis import GIS gis = GIS("https://...
1
vote
1answer
25 views

Why is the arcgis.geometry.buffer method failing on supposed empty geometries?

I am attempting to buffer some output after querying a feature service using the arcgis API for Python: from arcgis.gis import GIS from arcgis.features import FeatureLayerCollection from arcgis....
1
vote
1answer
22 views

Using 3rd party PASCAL_VOC in arcgis.learn prepare_data() method

Has anyone had luck using the prepare_data method with data not exported from the Export Training Data tool in ArcGIS Pro? The documentation suggests prepare_data will take PASCAL_VOC_rectangles from ...
0
votes
1answer
54 views

arcgis.learn show_batch() index error and lr_find() runtime error while using pointcnn for LiDAR segmentation

I am trying to segment vegetation from LiDAR point cloud using PointCNN on Jupyter notebook. But I am getting Index Error on running show_batch() and runtime error on running lr_find() while using ...
1
vote
0answers
40 views

Creating a for loop to publish multiple CSVs as feature services? [closed]

I have multiple CSVs that I want to publish them each as unique feature services. Instead of publishing them one at a time, I'm trying to find the correct syntax to create a for loop. This is the ...
3
votes
3answers
117 views

Installing ArcGIS Python API with ArcGIS Pro

I am new to the world of ArcGIS and I come from a data science background. I recently installed ArcGIS Pro with a Single User license from my organization. I would like to use it with the Python API ...
-1
votes
1answer
214 views

Publish file geodatabase to ArcGIS Online using ArcGIS API for Python

I am reading in the documentation it should be possible to publish a local file geodatabase as a hosted feature layer to ArcGIS Online. I have been trying different things, but that job keeps failing. ...
1
vote
0answers
36 views

Add empty layers to Feature Service with ArcGIS Python API

I would like to create a number of Feature Services. Each Feature Service should contain 15-20 layers. There is no data yet, as I would like to create these for data collection with ArcGIS Collector. ...
2
votes
0answers
79 views

ArcGIS API for Python not plotting Spatially Enabled Dataframe

I'm using Python 3.6.8, Pandas 0.25.3, and ArcGIS API for Python 1.6.2. I'm pulling data from an API and viewing it in a pandas dataframe using a Jupyter Notebook. The data has several attributes ...
2
votes
1answer
78 views

Adding data using Python from ArcGIS Online/ArcGIS REST Services directory to a ArcMap MXD

I want to update over 100 MXDs by adding 4/5 ArcGIS Online/ArcGIS REST Services directory layers. I am unsure whether this is possible using Python and can only find documentation on how to access ...
0
votes
1answer
58 views

Cannot log in with different ArcGIS Portal user account using ArcGIS Python API

I have an ArcGIS Portal log in account (viewer account) in an enterprise GIS infrastructure and want to use the ArcGIS Python API to connect with a separate admin account to be able to produce reports ...
1
vote
1answer
5k views

TypeError: cannot unpack non-iterable NoneType object on Spatial Join

I'm working with two spatial dataframes and am trying to do a spatial join on the two. parcels_sdf -- a frame with around ~370,000 real estate parcels. subdivisions_sdf -- a frame with all ...
1
vote
1answer
23 views

Querying County Open data endpoint and filtering by radius

I'm using python's requests and arcgis libraries for to query an open data endpoint for my county GIS data. I'm trying to query the recent sales data within a 2 mile radius of an address. I've ...
1
vote
1answer
129 views

Publishing a web tile layer on ArcGIS Online with python

I have a tiff layer in an ArcGIS Pro project. I would like to publish it on my ArcGIS Online portal, with Arcpy. I try to publish it as a Web Tile Layer, but could be another layer type, if anyone has ...
0
votes
0answers
17 views

How to update Portal for ArcGIS system properties using ArcGIS API for Python

I'd like to update the Portal system properties using the Python API. The documentation seems to indicate that it can be done. However, making an assignment to System.properties doesn't appear to ...
1
vote
0answers
42 views

Change Dashboard's map with ArcGIS Python API

Is it possible to change the map used in a Dashboard with the ArcGIS Python API? I know it can be done manually by changing the map's id in the ArcGIS Online Assistant, but I would like to do this ...
0
votes
1answer
286 views

Getting KeyError: groups from ArcGIS API for Python

I am working on ArcGIS Notebooks from arcgis.gis import GIS from IPython.display import display agol_gis = GIS("https://*********.maps.arcgis.com/home/") agolSiteAdmin = agol_gis.users.get('siteadmin'...
0
votes
3answers
318 views

Getting all users in ArcGIS Online organization?

I want to return a list of all users in my ArcGIS Online (AGOL) organization. However, the result returned in gis.users.search() appears limited to 100 users. Is there any way to return all users or ...
0
votes
0answers
38 views

Updating enterprise feature class using ArcGIS API for Python

I have created a Python script that will turn some CSVs to features in a GDB and I am trying to get the feature class on my local machine to overwrite the feature on our enterprise portal. I have ...
1
vote
1answer
83 views

Does ArcGIS API for Python use ArcPy internally?

Today I read a GIS SE user opinion in Using Geometry.distance_to() in ArcGIS API for Python that: it appears that ArcGIS API for Python uses ArcPy internally This surprised me because I do not ...
1
vote
1answer
148 views

Using Geometry.distance_to() in ArcGIS API for Python

I'm calculating distances between points in arcpy or ArcGIS API for Python, and am probably doing something wrong. Hopefully, someone can show me what. Take this as an interactive session with ...
1
vote
1answer
234 views

Calculating distance in feet between points in a Pandas Dataframe [closed]

I am pulling my data from an AGOL feature service using the arcgis python api. I pull the data into a spatial dataframe then merge it in various ways in pandas, do various column calculations, move ...
0
votes
0answers
11 views

ArcGIS API for Python edit attributes deletes map view

Currently I have a working script that searches for points within a layer that meets two conditions. It then edits a attribute. The script works well, however as soon as I run it, any point which the ...
1
vote
1answer
42 views

Download zip file from ArcGIS Online

from arcgis.gis import GIS import sys import urllib.request as req from pathlib import Path from zipfile import ZipFile import os import trace import urllib.request as req Zip_Loc = r'C:\Folder' ...
0
votes
0answers
32 views

Return URL of a query on a feature layer using arcgis API

I am familiarizing myself with the arcgis API for Python, and I would like to view the query I perform on a feature layer as a URL: from arcgis.features import FeatureLayer from arcgis.geometry ...
1
vote
1answer
330 views

Converting Lat,Long to XY in ArcGIS API for Python?

I am working on a Alexa skill where I get the user's location (Lat, Long) from the device. Since my skill only applies to a specific city (Boston, USA), I am using the ArcGIS reverse_geocode to ...
0
votes
1answer
49 views

Getting list of applications where “xyz” ArcGIS service is used?

Suppose i have xyz service, and which applications(web map, web app builder, arcgis online) uses this service. xyz=http://aaa.bbbbb.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%...
0
votes
0answers
49 views

Downloading ArcGIS Online Feature Service to local Geodatabase using ArcPy? [duplicate]

I want to grab some feature services from ArcGIS Hub and put them on a GDB on my local PC. Here's the code that I've got so far: import arcpy # Set project directory proj_dir = 'C:\\Users\\rhard2\\...
2
votes
1answer
565 views

No module named 'arcgis' for import GIS

I have ArcGIS API for Python installed and when I use below line, am getting error as ModuleNotFoundError: No module named arcgis from arcgis.gis import GIS Please refer to Image
0
votes
0answers
48 views

ArcGIS Python API Plotting ValueError: setting an array element with a sequence

Got a pandas spatial df using ArcGIS python API. The data is read in via pd.DataFrame.spatial.from_featureclass()–i.e., a shapefile. Once loaded, df has a SHAPE column, as you see here. Next, ...
0
votes
2answers
209 views

Copying feature service to local geodatabase using ArcPy and ArcGIS API for Python?

I am trying to export/copy a feature service to a local geodatabase where I can work on it locally. I have provided the code below. I keep getting an "Object: Error in executing tool" for the last ...
1
vote
1answer
196 views

Extract domain from ArcGIS Online feature service using Python API

I have a feature service with several coded value domains that I'm accessing as a spatially enabled dataframe using the python API. As far as I can tell, the dataframe only holds the code for each ...
1
vote
0answers
104 views

Importing/downloading symbology from ArcGIS Online using ArcPy?

I am currently attempting to create a script to download shapefiles from ArcGIS Online to my local drive before adding it to an aprx project and thereafter uploading it to a ArcGIS portal/enterprise. ...
2
votes
2answers
198 views

ArcGIS API for Python: Parameter Invalid - Item with the same key has already been added

I'm trying to update an ArcGIS Online (AGOL) feature layer using an updated local CSV file (the steps for this process are detailed in this Sample Notebook). I am using Jupyter Notebook to handle all ...
1
vote
0answers
35 views

How to populate an item's tables list for a ArcGIS API for Python Map Service Item?

I am trying to obtain a specific table from a Map Service item, however the table list is empty. The layers list correctly reports back 5 layers. My code snippet below: search_result = gis....
2
votes
2answers
145 views

Programmatically determining version of ArcGIS API for Python?

I would like to obtain the version of ArcGIS API for Python for logging/diagnostic purposes. Is there a way to determine this before a connection is made? I know that once I have the GIS object, I ...
0
votes
1answer
199 views

Batch uploading PDF files to ArcGIS Online?

I am trying to upload multiple pdf files to ArcGIS Online content all at once. Is there is a script that I can use to add content to ArcGIS Online?
2
votes
0answers
21 views

Function execution hangs if connection to Internet is lost

I am trying to update feature layer. I am updating the records in a loop. The problem is in the case Internet connection lost. It get stuck in the edit_features() function. I have to ctrl+c to stop ...
1
vote
1answer
60 views

Publishing error from ArcGIS API for Python?

I was trying to upload a CSV file on ArcGIS with Python. I wrote the code : import pandas as pd from arcgis import GIS import os import datetime import shutil URL = "https://www.arcgis.com/" gis = ...
0
votes
1answer
93 views

Adding features with attribution to Feature Service using Jupyter Notebooks and ArcGIS Python API?

I want to have a user add points by clicking on a map in a Jupyter Notebook and those points get pushed to a feature service. I'm able to accomplish that task, but I would like the user to be able ...
1
vote
0answers
166 views

AGOL Python Api - Modify Symbology of a Feature Layer

I want to modify the JSON properties of a Feature Layer hosted online to display a certain field in symbology. I am able to access the JSON properties, even the property itself but when I call an ....
0
votes
1answer
199 views

Generating Queried CSV from shapefile using ArcGIS API for Python?

I'm trying to create a csv from a query of a feature layer hosted in ArcGIS Online. The csv only needs to contain one field, where the query is met, geometry is not needed. I'm having issues getting ...
6
votes
1answer
2k views

How to update a hosted feature service on ArcGIS Online using the Python API for ArcGIS Pro?

I'm trying to follow the steps in the Esri blog post Updating your hosted feature services with ArcGIS Pro and the ArcGIS API for Python but am running into an error. To test this I published a ...
1
vote
0answers
56 views

Preserving data types when publishing to ArcGIS Online using ArcGIS Python API?

I have a Python script which does some data manipulation using Pandas dataframes, then outputs to CSV. The CSVs are then published to AGOL using the ArcGIS Python API, overwriting the existing ...
2
votes
1answer
2k views

Updating hosted feature layers on AGOL using the ArcGIS Python API?

I previously asked Adding data to a feature layer on ArcGIS Online using arcrest and arcresthelper.featureservicetools? regarding the most current process for establishing and then automating feature ...