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
11 views

Esri Notebook - Select and append records to table

Using Notebook editor in ArcGIS Online i want to extract from a FC table, those records with a specific data and then insert them into a separate table. I am trying the code below, but getting an &...
0
votes
1answer
13 views

Filtering by folder or authoritative maps when using gis.content.search

I use the code in Python for item in gis.content.search(query="owner:MyUsername", item_type='Feature Service') to go over the feature classes uploaded on my organization's AGOL page. I want ...
0
votes
0answers
8 views

How to do data augmentation in ArcGIS API

I got training data for my deep learning model by using export training data for deep learning tool in Arcgis Pro. I would like to do data augmentation on this training data. Could you please suggest ...
1
vote
0answers
21 views

Creating new Feature Layer from existing feature layer on ArcGIS Online using ArcGIS API for Python

I have a folder on ArcGIS Online for a city that has few layers in it. I need to create separate folders for each city and then create new feature layers using these existing layers, preferably using ...
0
votes
1answer
19 views

How to append a FeatureCollection to a hosted Feature Layer in ArcGIS Enterprise?

This question pertains to arcgis.gis in Python, for working with hosted Feature Layers in ArcGIS Enterprise. I'm using the enrich_data function to calculate a buffer polygon from my input (hosted) ...
0
votes
0answers
15 views

'MapView' object has no attribute '_preview_image_display_handler'

I am trying to extract the html code out of an ArcGIS Online map from Python. from arcgis.gis import GIS import pandas as pd g = GIS("https://www.arcgis.com", "name", "...
3
votes
0answers
50 views

Mapping .csv file using ArcGIS online with Python

I have .csv data in the format: Longitude Latitude Threat -24 45 0.5 -31 40 0.9 . . . . . . I want to visualize this data as a threat ...
0
votes
1answer
29 views

Publish CSV to Enterprise Portal as table

I'm following this help doc. https://geosaurus.maps.arcgis.com/home/item.html?id=a1db6db172bc49a8932daacc2ed3d3ac#preview I'm able to add the CSV to the Portal, but I cannot get it to publish. I need ...
1
vote
0answers
37 views

IndexError: list index out of range - item report ArcGIS API for Python

I'm quite new to Python and ArcGIS API for Python. I'm trying to create a report of all the items owned by one of my ArcGIS online organization user. For each item owned by the user I want to record ...
0
votes
0answers
19 views

Basemap function on webmap returns AttributeError: 'Item' object has no attribute 'basemap'

I am working with an ArcGIS Notebook and have the following script (see attached image as well): from IPython.display import display import arcgis from arcgis.gis import GIS from arcgis.mapping ...
2
votes
0answers
40 views

What is the correct syntax for the item.publish command to update a hosted feature layer?

Trying to use the code provided at the bottom of this entry overwrite feature class in arcgis online using python to overwrite an existing hosted feature layer in my ArcGIS Online content. I have ...
0
votes
0answers
57 views

Survey123 Python Module Feature Report Names

I am using Survey123 version 3.9 and the ArcGIS API for Python. I am successfully downloading reports, but I seem to have no control over the report file name. The test file name I am using is "...
1
vote
1answer
279 views

Convert ArcGIS Spatially Enabled Dataframe to Geopandas GeoDataFrame

I have some code that works on geopandas GeoDataFrames but due to a client requirement I suddenly have to access my input data via the ArcGIS Python library, which only allows me to access the data as ...
0
votes
0answers
37 views

Exporting MapImageLayer, however getting a blank png

I am pulling data from Wayback Imagery and attempting to export an image after making it into a arcgis.mapping.MapImageLayer. When I run my code the image it produces is blank and I'm unsure why. The ...
0
votes
1answer
56 views

Is ArcGIS API for Python or ArcREST faster than arcpy.da for editing hosted features?

I have a large hosted feature layer on ArcGIS Online of 52,000 points. I have been building the feature layer over time by simply using the Append tool in ArcGIS Pro. Now I need to update some text ...
0
votes
1answer
35 views

Using ArcGIS API for Python and Windows Authentication?

I've been trying to follow the ESRI recommended workflow to log on to Enterprise (using authentication), but it just doesn't want to work. I'm able to get the account credentials registered in ...
0
votes
1answer
45 views

Overwrite a PDF item type with ArcGIS API for Python

I'm trying to overwrite an existing PDF ArcGIS Online item using ArcGIS API for Python. props = { "type":"PDF", "title":file_name, "overwrite":True ...
3
votes
1answer
40 views

Area calculation in “Thomas Fire analysis”

I am studying this notebook: California wildfires 2017 - Thomas Fire analysis I can follow the first part of the notebook. But I have got confused in this cell to calculate the burnt area: ext = {&...
0
votes
1answer
50 views

Upload raster data using ArcGIS API for Python?

I have been using the code below to import shapefiles to ArcGIS Online. It was taken from an ArcGIS tutorial linked here: https://developers.arcgis.com/labs/python/import-data/ from arcgis.gis import ...
0
votes
0answers
90 views

Updating/overwriting multiple layers within a feature layer in ArcGIS Online from a fgdb containing all the new feature classes

I am looking for a method to upload and replace multiple layers in ArcGIS Online that are stored within a (hosted) feature layer. I have the feature classes to be used to update (and identical in ...
0
votes
0answers
65 views

Plotting polygon bounding box using ArcGIS API for Python

I have a layer of polygons and would like to be able to plot the extent boundary rectangle on a map. I have my polygons in a Spatially Enabled DataFrame (polygonSDF = poygonFeatureSet.sdf) that I can ...
0
votes
0answers
35 views

ArcMap export training data for deep learning using RCNN_Masks returns a generic error

As the title says, ArcMap returns a generic error when I try to export training data for deep learning. The error just says failed to crate raster dateset. I follow the settings from this page but ...
0
votes
0answers
74 views

ArcGIS Python API zoom_to_layer() attribute error

I am working with the ArcGIS API for Python mapping widget within the ArcGIS jupyter notebook environment. I've successfully connected to my organization's enterprise portal, grabbed content, mapped ...
0
votes
1answer
86 views

ArcGIS API for Python geometric filter of feature layer producing Runtime Error: 'geometry parameter invalid'

I am trying to select a handful of features from an Enterprise Portal feature layer using the ArcGIS API for Python. Specifically I am trying to do a spatial selection, where the selected features are ...
1
vote
1answer
168 views

Adding query layer to MapView in Jupyter Notebook returns “RuntimeError: Cannot infer layer: will not be added to map”

I am working within a Jupyter notebook, trying to display a query layer (querying a SQL database) into a map view within the notebook. I receive a Runtime Error (described below) when I try to add ...
0
votes
0answers
7 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 ?
0
votes
1answer
28 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
53 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
250 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 ...
2
votes
1answer
161 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
47 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
40 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 ...
1
vote
1answer
112 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
54 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
232 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
800 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
85 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. ...
3
votes
0answers
154 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
257 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
155 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
6k 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
26 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
286 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
1answer
125 views

How to visualize route layer on ArcPy Jupyter Notebook (ArcGIS)

I tried to visualize the route between two points using ArcPy in a Jupyter notebook. The network module is activated in my Esri account. Even though it visualizes the map I can't see the route on that ...
0
votes
0answers
36 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 ...
2
votes
0answers
68 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
567 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'...
1
vote
3answers
947 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 ...
1
vote
1answer
98 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
318 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 ...