ArcGIS API for Python Blog

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Other Boards in This Place


Latest Activity

(32 Posts)
Clubdebambos
MVP Regular Contributor

Have you been utilising the ArcGIS API for Python version 2.4.0 and attempting to update a WebMap? If your WebMap contains tables, you are more than likely experiencing an issue when you call the Map object update() method and  your table(s) become corrupt and unable to use in the WebMap. The table entry on the WebMap homepage says it is a SubtypeGroupTable and not a Table.

 

 

Read more...

more
2 0 155
Clubdebambos
MVP Regular Contributor

The ArcGIS API for Python is a powerful Python library that allows users to interact with and automate tasks in ArcGIS Online (or Portal). The API is excellent for programmatically creating, maintaining, and updating webmaps in ArcGIS Online. If you maintain multiple WebMaps and their extents are important, then this blog post is for you. I once had to maintain hundreds of WebMap and the extents would always be moved, saved, and overridden. A scheduled script or a script ran as needed can update hundreds of WebMaps in minutes.

Read more...

more
4 2 173
Clubdebambos
MVP Regular Contributor

In this blog post we will explore the capabilities of the ArcGIS API for Python to create a new Hosted Feature Service and add a Feature Layer. By using the Feature Layer definition we can set the Feature Layer geometry type, the fields, and optionally the symbology and popup. The aim of this blog post is to help define the minimum viable Feature Layer definition in order to successfully add a new Feature Layer to a Feature Service.

Read more...

more
3 3 609
JoeGuziStarkCountyOH
Frequent Contributor

This Jupyter Notebook prompts the user for a layer to replace, and a layer to replace it with, then it loops through all of the web maps the user has access to and replaces the layers. Check it out, I hope it helps...

ArcGIS Online Replace Layer in a Web Map 

more
1 1 581
ShareUser
Esri Community Manager

Yes, the whole internet, in either direction, with optional analysis on the way.  What's not to like?

Read more...

more
0 1 739
Clubdebambos
MVP Regular Contributor

Data can often be provided as a Shapefile with an accompanying file containing the attribute information, or surplus attributes to compliment those in the Shapefile, such as a CSV for example. The ArcGIS API for Python provides no method to add a Shapefile and CSV together in a zipped folder, and publish as a Hosted Service containing a Feature Layer and a Table. These have to be added and published separately. This Blog post will take a published Table and add as a Table to a Feature Service containing a Feature Layer. A relationship will be created between the Feature Layer and the Table. While this can be achieved by publishing via ArcGIS Pro, here, we will use the ArcGIS API for Python only. 

Read more...

more
17 10 5,995
MehdiPira1
Esri Contributor

Introduction

Smartsheet is a dynamic workspace that empowers teams to manage projects, automate workflows, and rapidly build new solutions. Smartsheet uses spreadsheets, referred to as sheets, as the basis of everything it does, but the difference between Smartsheet and spreadsheet programs like Microsoft Excel or Google Sheets is that Smartsheet has all sorts of collaboration functionality incorporated into it.

Read more...

more
13 7 6,783
AndresCastillo
MVP Alum

snippets to manage a web map with the ArcGIS API for Python

Read more...

more
1 6 2,494
AndresCastillo
MVP Alum

ArcGIS API for python User.items() method says it takes dictionary from the folders property, but the folders property says it returns a list:
 
AndresCastillo_0-1617215088337.png

 

AndresCastillo_1-1617215096675.png

 

 

the folders property actually returns a list of dictionaries:
 
 
AndresCastillo_2-1617215109102.png

more
0 0 1,446
IhabHassan
Esri Contributor

Recently I came across ESRI web course Update Real-Time Data with Python, and it walks through a tutorial on how to built what is called "feed routine". The idea is basically is to read latest version of certain feature-set from a JSON file shared and accessed through a URL, and feed that into your system, which in this case is a hosted feature layer. 

In this blog, I wanted to focus on the function "deployLogic" which takes places after reading the latest JSON data and converting it to ESRI file-geodatabase. This function demonstrate really important workflow on how to update the data of hosted feature layer, while keeping the hosted layer item id - as a Portal for ArcGIS or AGOL item. I didn't find similar workflow explained in the published documentation for ArcPy or API for Python, and I believe it can be accommodated to be used with more complex scenarios.

I will try to summarize the function logic in the following bullets:

  • Using 7zip sub-process, extract the hosted layer service definition file
  • Browse to the extracted folder, reach the underlying source file gdb, and delete it
  • Copy the fresh file-geodatabase that was created in previous step to the extracted service definition folder
  • Using 7zip, compress the service definition folder into a new service definition file with '.sd' extension, not '.zip'
  • Using "FeatureLayerCollectionManager" instance, update the hosted layer using the new service definition file


The simplicity of this workflow is that it avoids republishing the service using ArcGIS Pro project, so you won't need to go through something like "getWebLayerSharingDraft" from a Map object, and worry about setting the needed flags "overwriteExistingService", etc.. I find this really easy shortcut, and it will get the job done.

Update Real-Time Data with Python

Update Real-Time Data with Python

Update Real-Time Data with Python

more
7 2 2,477
217 Subscribers