Questions tagged [arcgis-python-api]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
17 views

Overwriting Feature Layer on ArcGIS Online using ArcGIS Python API

I get a generic error "Job Failed" when using the below code to try and overwrite a feature layer on ArcGIS Online: shp_fp = 'E:\folder\shapefile.shp' feat_id = 'q3p094rupqe9vntowe98w98eyt0w'...
1
vote
0answers
31 views

Updating Portal Item Thumbnail ONLY if it is has not been changed yet using ArcGIS Python API

Using Python, is it possible to check if the thumbnail for a Portal Item is the default thumbnail? I want to update thumbnails if they have not been updated yet. I know I can update thumbnails using ...
0
votes
0answers
9 views

Removing rows limitation when making feature layer query using ArcGIS Python API

I have a fairly big spatiotemporal dataset located at a server, which gets additional 1000 rows every 10 seconds for like two moths already. I am concerned to download and process this data day by day,...
0
votes
0answers
14 views

How to save result of arcgis.learn.prepare_data (ArcGIS Pro)

After running 'Export training data for deep learning' tool in ArcGIS Pro, named as 'training_folder', I did data augmentation on the 'training_folder' using arcgis.learn.prepare_data. Then, I would ...
0
votes
0answers
24 views

ArcGIS Python Overwrite AGOL Feature Class with Spatially Enabled Dataframe

To sum it up, I've accessed an AGOL Feature Class, converted the point layer to a Spatially Enabled DataFrame (SEDF), and made the edits to the attributes that I needed. I have the Dataframe I want, ...
0
votes
0answers
33 views

Python: Unexpected area results after converting lat/long coordinates to wkid:3857

My end-goal is to be able to calculate the areas of small polygons (between 1000 and 5000 sq ft) with lat/long coordinates. I am having some unexpected results when doing this and decided to switch to ...
0
votes
0answers
11 views

{"showLabels": True} not displaying labels on Hosted FeatureLayer [closed]

I am updating a layer when adding it to the map and {"showLabels":True} should simply load labels for the renderer according to the labellingInfo class. What is more confusing, is after you'...
1
vote
0answers
95 views

Script using Python API and Windows task scheduler

I have a Python script that uses the Python API to logging into the server, stop geocode services, rebuild locators and start services. I'm using task scheduler on a server machine where other Python ...
1
vote
1answer
76 views

Upload GeoJSON files to ArcGIS Online content

I would like to upload local GeoJSON files with Python automatically to ArcGIS Online. Now I have to upload them one for one, which takes quite some time. So I looked into the ArcGIS API for Python. I ...
1
vote
1answer
57 views

Back-up Feature Services with a script

Goal: I want to create copies of feature services and save them in a FGDB in a network folder on my machine. The overall purpose of the script is to have back-ups of my authoritative feature services ...
2
votes
0answers
62 views

Connecting Python to get data from Survey123 and show it on Web AppBuilder

I am downloading a survey data from survey123.com by using GIS services however I am not able to create a widget on webapp to show it on ArcGIS webapp. I am not familiar with ArcGIS but here is the ...
0
votes
0answers
26 views

Query point-intersection layer values with ArcGIS webmap (Python REST API)

I've created a webmap with ArcGIS. It has about 7 layers of information that are valuable to an app I am building. Is there any way to query intersecting layer values if I provide coordinates? For ...
0
votes
0answers
19 views

Finding available options when adding layer to the WebMap() model through ArcGIS Python API?

I'm trying to find available options I can use when adding a layer to WebMap() in the ArcGIS API. The esri examples don't expand on all the available options and when looking at the API reference ...
1
vote
1answer
39 views

ArcGIS : You do not have permissions to use this resource. (Error Code: 401)

I am trying to query Demographic data using ArcGIS Python API and the following is my code to do the same. from arcgis.gis import GIS from arcgis.geoenrichment import Country, enrich, BufferStudyArea ...
0
votes
1answer
28 views

Using ArcGIS Python API to consume standalone ArcGIS REST API

I have access to a ArcGIS REST API service running on a standalone, unfederated ArcGIS Server. (Not AGOL or ArcGIS Enteprise) ie (https://xxxx.xxxxx.com/arcgis/rest/services/xxxxxx/xxxxMap/MapServer) ...
1
vote
0answers
24 views

ArcGIS Python API - feature renderer faild in AGOL

I am trying to save a feature service in AGOL using ArcGIS Python API with symbols. I use the same symbols in a map widget and the features appear correctly but when I save the feature as a feature ...
0
votes
1answer
42 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
46 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
36 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 ...
1
vote
1answer
116 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
39 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
131 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
59 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 ...
2
votes
0answers
90 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
42 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 ...
3
votes
1answer
98 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
97 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
558 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
48 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
73 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
66 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 ...
1
vote
1answer
99 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
43 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
75 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
218 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
1answer
144 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
242 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
46 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 ...
5
votes
1answer
354 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
251 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
84 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
48 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
128 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
58 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
308 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
1k 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
110 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
183 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 ...