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

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
1answer
33 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 ...
0
votes
0answers
19 views

Capturing Layer Errors When Loading WebMap using ArcGIS API for Python?

Using ArcGIS Python API 1.6.2 (Python 3.7) with Jupyter Notebook, is it possible to capture the popup, "Error. The layer, <..some layer..>, cannot be added to the map."? Essentially: from ...
0
votes
0answers
36 views

Adding new layout to ArcGIS Pro project?

I'm trying to create a script to update extents of the ArcGIS portal items according to the actual extents of the participating data layers. My idea is to create a local copy of the web map, zoom to ...
1
vote
1answer
27 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
33 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
0answers
31 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 ...
0
votes
0answers
17 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
44 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
46 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
19 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
17 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
45 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
66 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
52 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 ...
3
votes
1answer
597 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
35 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
455 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 ...
5
votes
1answer
465 views

Using the arcpy Python library with hosted feature service layers from ArcGIS Online?

Is it possible to use the arcpy library with hosted feature service layers from ArcGIS Online? I am aware of the ArcGIS API for Python, but the API lacks many of arcpy's features. In my case, I'd ...
1
vote
2answers
35 views

Getting Exent of Queried Results using ArcGIS Python API?

Im trying to use the ArcGIS Python API to query a few results and gather the extent, I can query the results fine but as soon as I try to extract the extent I retrieve empty results. Using one of the ...
0
votes
1answer
271 views

How to search the folder's items in ArcGIS On Line using the ArcGIS API for Python

I want to have a list of the items inside a folder created by my user in AGOL, I want to use the ArcGIS API for Python. so far I have found this: import sys from arcgis import gis import os ...
0
votes
0answers
59 views

How to get Borough names using ArcGIS API for Python through geocoding?

I'm new to ArcGIS API for Python. Is it possible to do do geocoding of an area, specifically New York City and get all the boroughs' names? i.e.: Geocode request for all boroughs in New York city. ...
1
vote
2answers
370 views

Setting basemap layers of WebMap using ArcGIS Python API?

Using the ArcGIS Python API, I've create a WebMap and two Layers (one containing features, the other containing labels): cbmt = WebMap() cbmt_geometry_layer = Layer(url = <url of geometry layer>...
1
vote
0answers
166 views

Uploading mxd to ArcGIS Online with Python?

I need to create a Python script to upload an MXD to AGOL. I have created an script in arcpy to create a service definition file (*.sd) from the mxd. I have not been able to upload the sd to AGOL ...
1
vote
0answers
87 views

Authentication Error 499 using ArcGIS API for Python?

Using the ArcGIS API for Python, when I create my GIS object: gis = GIS(config["agol"]["agol_gis_url"], config["agol"]["agol_gis_user"], config["agol"]["agol_gis_pass"]) I can verify that it ...
0
votes
0answers
326 views

Profile FileNotFoundError: [WinError 2]

I've been working with ArcGIS module in python trying to connect to the portal in an intelligent manner. I tried to create a profile so that I wouldn't have to leave my username and password to the ...
3
votes
1answer
248 views

Update field properties of a layer definition with ArcGis Python API

We have a fields in a large amount of AGOL hosted feature layers that we want to make un-editable and others that we do not want visible. Rather than going into the service definition for each and ...
1
vote
0answers
432 views

How to include maps in Jupyter notebook HTML export?

I'm running the 1.4.2 version of the ArcGIS Python API. In a Jupyter Notebook, I create a map like: lowes = "Arkansas USA Lowe's" lowes_map = gis.map("AR, US", 6) lowes_map ...and get my output. I ...
3
votes
1answer
418 views

Using ArcPy and ArcGIS API for Python together?

I am having trouble with how I am supposed to use both ArcPy and ArcGIS API for Python. ArcPy is only in Python 2 and ArcGIS API for Python is in ArcGIS Pro and is Python 3. I don't know how to set my ...
1
vote
1answer
82 views

Displaying 3rd party FeatureSet geometries on jupyter notebook webmap using ArcGIS Python API

How can I add all geometries included in a FeatureSet to a web map? Trying to add geometries (i.e., shapes) to a Jupyter notebook web map (see code sample below). Adding features from the ArcGIS ...
1
vote
0answers
81 views

Finding closest feature to given address in ArcGIS API for Python?

I'd like to find the closest open space (i.e. a park, square, playground) from a City of Boston MapServer using Python's ArcGIS package. I'd like to use arcgis.features.use_proximity.find_nearest() ...
1
vote
0answers
286 views

Retrieving layers from items of type Web Mapping Application from ArcGIS Portal using ArcGIS API for Python?

I'm serializing portal data so two instances of arcgis portal can be compared and the serialized data can be searched for specific keywords. More specifically, I need to retrieve all layers (and their ...
1
vote
1answer
157 views

ArcGIS API for Python Delete Multiple Features

Can you help me with my code below to delete/send multiple ObjectIDs to a delete parameter? Currently the code just finds one record and send that Object ID to the delete paramter, but id like to be ...
3
votes
1answer
84 views

Using ArcPy to retrieve maps posted on an ArcGIS portal?

I'm using ArcPy and python 3.5 to connect to a few different instances of ArcGIS portal. The goal is to produce a report listing the maps, layers, and datasources that each portal instance has to ...
2
votes
1answer
156 views

Creating Tile Service in ArcGIS Online Python API

I'm trying to create a tile layer via the ArcGIS API for Python. When creating a tile layer in AGOL (manually) they have you specify a range of scales for the zoom level (e.g. 1:1000 or 1:4000). ...
1
vote
0answers
90 views

Can ArcGIS Python API automate functionality provided in Web AppBuilder?

I was feeling adventurous the other day and I decided to dive into ArcGIS Pro and the new ArcGIS Python API. I watched some training videos and since I've been working with ArcGIS Online a lot, I ...
0
votes
1answer
1k views

Difference between ArcPy and ArcGIS API for Python? [duplicate]

Could someone explain, from a high level overview, the difference between ArcPy and the new ArcGIS API package in Python?
1
vote
0answers
203 views

how to plot lat lon data to a map using jupyter notebook?

import arcgis from arcgis.gis import GIS from arcgis.features import SpatialDataFrame ago_gis = GIS() search_subset = ago_gis.content.search("Hong Kong Topographic Map") subset_item = search_subset[...
1
vote
0answers
161 views

Cannot plot map on ArcGIS python API?

I do not have ArcGIS desktop. And I have installed the ArcGIS Python API. And I tried the following: import arcgis from arcgis.gis import GIS from arcgis.mapping import WebMap gis = GIS() map1 = gis....
6
votes
1answer
1k views

Replacing ArcPy with ArcGIS API for Python?

Today I found out about the ArcGIS API for Python. I was wondering if you could use this to (eventually) replace ArcPy? Recently I have been doing analyses that require cloud based solutions. When ...
0
votes
1answer
298 views

ArcGIS Python API FeatureLayer query by buffered point

I am really running into some problems with the Python API, I am trying to query a feature layer and return all results that fall within a certain distance of a supplied point. According to the docs ...