-
Copier des pièces jointes d’une couche d’entités à une autre dans les notebooks AGOL
Bonjour ! J’ai deux couches — Trees et RemovedTrees — dans une couche d’entités hébergée, et j’essaie de créer un script dans les notebooks AGOL (Python 3 Standard-14.0) qui interrogera la couche Trees pour repérer les arbres marqués comme retirés et les copier dans la couche RemovedTrees. Tout fonctionne, sauf pour les…
-
Utiliser ArcGIS API for Python pour configurer le formulaire d’une couche de carte Web à partir de sa fenêtre contextuelle ?
Toutes les fenêtres contextuelles de mes couches de carte Web sont configurées de manière optimale, car cette opération est effectuée automatiquement avec arcpy et CIM, avant la publication automatique des couches depuis ArcGIS Pro vers AGOL, à l’aide du même script arcpy qui configure les fenêtres contextuelles. Dans le…
-
Débutant avec l’API Python : besoin d’aide pour la syntaxe !
Je débute avec l’API Python et j’ai besoin d’aide pour modifier un Notebook. Le code est ci-dessous. La ligne 42 n’a aucun effet sur le jeu de données cible et je n’arrive pas à comprendre pourquoi. J’espère avoir inclus suffisamment d’éléments du Notebook pour que quelqu’un puisse déduire mon erreur. Il se passe pas mal…
-
Exportation des données sur les bogues et les améliorations
Existe-t-il un moyen d’exporter les données de la page « Bogues et améliorations » via une API ou un processus automatisé ?
-
Est-il possible de modifier des entités avec une authentification par clé API ?
J’essaie de configurer un script Python qui s’authentifie auprès d’AGOL avec une clé API et met à jour une couche d’entités (suppression, ajout). Je peux accéder à la couche d’entités, mais lorsque j’essaie de la tronquer, j’obtiens une erreur 403 : Exception: L’utilisateur n’est pas autorisé à accéder à ce service.…
-
Mise à jour des valeurs d’attributs d’une couche d’entités hébergée avec ArcPy ou l’API ArcGIS pour Python ?
Bonjour, Je travaille dans un notebook Python sous ArcGIS Pro et je souhaite mettre à jour les valeurs d’attributs d’un sous-ensemble de ma couche d’entités. J’envisage deux approches. J’ai identifié les entités dont je souhaite mettre à jour les valeurs d’attributs en utilisant d’abord SelectLayerByAttribute, puis…
-
Publish reference feature service to enterprise
Hi All, I'm trying to replicate the process normally done in Pro, using Publish Web Layer referencing registered data but instead using Python. I can create a new hosted feature service from data stored in out SDE database but I don't want to host the data I want to reference data in our SDE database, as running the…
-
Layer.calculate occasionally hangs
I have a python script that runs every hour or so as a windows scheduled task and does some updates to an ArcGIS Online hosted feature layer using the layer.calculate function. Every so often (once every couple of days) it hangs. The layer it hangs on only has 1600 records and the query reduces that to 26 records so it…
-
spatial.join renvoie silencieusement 0 lignes si un point a des coordonnées 'NaN' (moteur arcpy)
Décrire le bug Un point avec des coordonnées 'NaN' fait que spatial.join renvoie 0 lignes sans erreur lorsque arcpy est le moteur de géométrie. full_extent renvoie également nan. Avec shapely comme moteur, les mêmes données génèrent une erreur. Les requêtes ESRI REST Service peuvent retourner 'NaN' dans les géométries.…
-
Merci à la communauté Python API - v2.4.4
Avec la sortie de ArcGIS API for Python 2.4.4, nous souhaitons adresser un grand merci à notre communauté. Vos retours et votre participation active sont ce qui façonne véritablement l'évolution de ce produit. Pour ceux qui découvrent l'écosystème, notre dépôt public GitHub est votre référence pour des exemples, tutoriels…
-
Impossible d'extraire les entités supprimées du service d'entités
Bonjour à tous, J'essaie de créer un notebook qui me montrera toutes les entités supprimées d'une couche d'entités hébergée et les placera dans un spatial data frame pour révision, l'idée étant que nous puissions extraire de ce SDF plus tard si nécessaire. J'ai exactement le même script créé sur notre environnement…
-
Compter les points dans des polygones avec l’API ArcGIS pour Python
https://youtu.be/Wtrsev5v30E L’analyse spatiale consiste souvent à répondre à une question qui semble toute simple : Combien d’entités se trouvent dans chaque zone ? Combien de biens immobiliers se trouvent dans chaque district ? Combien d’arbres y a-t-il dans chaque parc ? Combien d’incidents se sont produits dans chaque…
-
Activer la méthode FeatureLayer.calculate() dans l'ArcGIS API for Python pour accepter les expressions Arcade afin de calculer les valeurs d'attribut.
Limitation actuelle La méthode FeatureLayer.calculate() prend actuellement en charge le calcul des valeurs de champ en utilisant des expressions SQL ou des valeurs scalaires. Cependant, il n'existe pas de moyen direct d'appliquer une expression Arcade via cette méthode. Cela crée un vide pour les flux de travail qui…
-
Impossible d'authentifier le jeu de données ArcGIS Online pour une utilisation dans l'outil de géotraitement Arpy
J'ai un service d'entités hébergé sur arcgis.com qui n'est pas partagé publiquement et j'ai besoin de lire les données depuis un script python. Le script ci-dessous fonctionnait sans problème jusqu'à récemment. Je reçois maintenant une erreur 000732 ("Le jeu de données n'existe pas ou n'est pas pris en charge") lorsque…
-
Automating ArcGIS Notebooks
Hello, for context I am currently developing a way to have records automatically added to a "Master Results Table". I am using a feature layer in AGOL that has tasks enabled through Field Maps Designer. Within the EsriTask workflow, the field team will be required to complete a Survey123 form. There is n many Survey123…
-
FeatureLayer.query() giving Exception - TypeError: '>=' not supported between instances of 'int' and 'NoneType'
While querying Feature Layer getting Exception as <em><strong>"</strong></em><em>TypeError: '>=' not supported between instances of 'int' and 'NoneType' "</em> But the same outStatistics value and where clause is working fine in the REST end point in the browser, and giving the expected result. <em> </em> // Below code is…
-
FeatureLayer.query() not returning a feature set
Hello, I am looking to create a spatially enabled dataframe from a FeatureSet with the ArcGIS API for Python. I have always: * Created a FeatureLayer object * Used .query(where="whatever") to return a feature set, * Used the .sdf property to create the dataframe. Today the sdf property doesn't work, .query() is returning a…
-
clone_items() fails cloning hosted feature layer
First, a couple bullets with some basic information * ArcGIS Pro version: 3.6.3 * Source: ArcGIS Enterprise organization * Target: ArcGIS Online organization * Cloning between same source/target organizations worked previously with another Feature Layer Collection. I'm trying to clone a Feature Layer with a Survey123 point…
-
Update feature geometry?
I have a script that is supposed to replace the geometry of a polygon with a new polygon constructed by reading some of its fields (minX, minY, maxX, maxY). I can do this with traditional arcpy, but I'm running into issues when trying to do it with the arcgis module. Specifically, I either get no edits to the geometry if I…
-
What is wrong with this code?
Good afternoon, I am trying to overwrite an AGOL hosted feature class with API Python and testing it from ArcGIS Pro Notebook. I am able to load the zipped FGDB in AGOL and overwrite the hosted feature class manually. When I try to do the same thing with my program, selecting the same zipped FGDB, I get the following error…
-
Which cell tag to use for AGOL Notebook parameters: injected-parameters or parameters?
The docs list two different cell tags to use when setting up a Notebook to use external parameters. In one place they say to use injected-parameters but in another they say to use parameters. After some experimentation I think parameters is correct when I'm calling the Notebooks from arcgis.notebook.execute_notebook(), but…
-
Expose ArcGIS Online Required and Suggested Metadata Elements Scores to API for Python
My organization is attempting to create an automated process using the API for Python to check items in our organization against our customized publishing guidelines (i.e., summary, tags, categories, etc). Our process is similar to this example, but much more in-depth and linked to a live dashboard to monitor…
-
Error on code that was working three weeks ago: (gis.content.get(item_id)).layers[0] ("module 'arcgis.layers' has no attribute '_ogc' ")
I am calling in a layer from an item ID by using the arcgis module "layers". If I just pull in the item using gis.content.get(item_id), the item shows up fine. When I try to get to the layers though, I get the error module 'arcgis.layers' has no attribute '_ogc' . This was working for a long time, and is my go-to method…
-
FeatureLayerCollection.replicas.create always returns the correct tables but 0 records in the tables
Hi there. I have a python script that attempts to export a hosted feature service as a file geodatabase using the python api's featurelayercollection.replicas.create() method. I am running python 3.11.10 and arcgis api 2.3.0 The service details: - One feature layer (id: 0, geometry type: point) with attachments - One…
-
Issue with the Tutorial: "Classify land cover to measure shrinking lakes"
Classify land cover to measure shrinking lakes | ArcGIS API for Python | Esri Developer The code extracting the sentinel fata in this tutorial is not working for me. sentinel2016 = gis.content.get("a264d1eaa8bd4ff2a0a1e27b59daa7d3") sentinel2017 = gis.content.get("ea192d03d1324c62a2cb91e26e3a0ece") These Item IDs do not…