-
Copiando anexos de uma camada de feições para outra em Notebooks do AGOL
Olá! Tenho duas camadas — Trees e RemovedTrees — em uma camada de feições hospedada e estou tentando criar um script nos Notebooks do AGOL (Python 3 Standard-14.0) que consulte a camada Trees em busca de árvores marcadas como removidas e as copie para a camada RemovedTrees. Consegui fazer funcionar, exceto pelos anexos,…
-
Usar a API do ArcGIS para Python para configurar o formulário de uma camada de mapa da web com base no pop-up?
Todas as camadas dos meus mapas da web têm pop-ups configurados de forma ideal, pois isso é feito automaticamente usando o arcpy com CIM antes de as camadas serem publicadas automaticamente do ArcGIS Pro no AGOL pelo mesmo script do arcpy que configura os pop-ups. No Field Maps Designer do ArcGIS Online, posso criar…
-
Iniciante na API do Python precisa de ajuda com a sintaxe!
Sou relativamente novo na API do Python e preciso de ajuda para modificar um Notebook. O código está abaixo. A linha 42 não tem efeito no conjunto de dados de destino e não consigo descobrir o motivo. Espero ter incluído partes suficientes do notebook para que alguém consiga deduzir meu erro. Há várias coisas acontecendo…
-
Exportação de dados de bugs e melhorias
Existe alguma maneira de exportar dados da página de bugs e melhorias por meio de uma API ou de um processo automatizado?
-
É possível editar feições com autenticação por chave de API
Estou tentando configurar um script em Python que se autentica no AGOL com uma chave de API e atualiza uma camada de feições (excluir, adicionar). Consigo acessar a camada de feições, mas, quando tento truncá-la, recebo um erro 403: Exceção: O usuário não tem permissão para acessar este serviço. O usuário não tem permissão…
-
Atualizando valores de atributos de uma camada de feição hospedada: ArcPy ou ArcGIS API for Python?
Olá, Estou trabalhando em um notebook Python no ArcGIS Pro e quero atualizar os valores de atributos de um subconjunto da minha camada de feição. Estou considerando duas abordagens. Identifiquei as feições cujos valores de atributos quero atualizar usando primeiro SelectLayerByAttribute e, em seguida,…
-
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 retorna silenciosamente 0 linhas se um ponto tiver coordenadas 'NaN' (engine arcpy)
Descreva o bug Um ponto com coordenadas 'NaN' faz com que spatial.join retorne 0 linhas sem erro quando arcpy é o motor de geometria. full_extent também retorna nan. Com shapely como motor, os mesmos dados geram um erro. Consultas do ESRI REST Service podem retornar 'NaN' em geometrias. Para Reproduzir Passos para…
-
Obrigado Comunidade Python API - v2.4.4
Com o lançamento do ArcGIS API for Python 2.4.4, queremos estender um enorme agradecimento à nossa comunidade. Seu feedback e participação ativa são o que realmente moldam a evolução deste produto. Para quem é novo no ecossistema, nosso repositório público no GitHub é seu ponto de referência para exemplos, tutoriais e…
-
Não foi possível extrair feições excluídas do serviço de feição
Olá a todos, Estou tentando criar um notebook que me mostre todas as feições excluídas de uma camada de feição hospedada e colocá-las em um spatial data frame para revisão, a ideia é que possamos puxar desse SDF mais tarde, se necessário. Tenho o mesmo script exato criado em nosso ambiente "sandbox" na camada hospedada…
-
Contar pontos em polígonos usando a API do ArcGIS para Python
https://youtu.be/Wtrsev5v30E A análise espacial muitas vezes envolve responder a uma pergunta aparentemente simples: Quantas feições estão localizadas em cada área? Quantos imóveis há em cada distrito? Quantas árvores há em cada parque? Quantas ocorrências aconteceram em cada limite administrativo? Quantos pontos de…
-
Habilitar o método FeatureLayer.calculate() na ArcGIS API for Python para aceitar expressões Arcade para calcular valores de atributos.
Limitação atual O FeatureLayer.calculate() atualmente suporta calcular valores de campo usando expressões SQL ou valores escalares. No entanto, não há uma forma direta de aplicar uma expressão Arcade através deste método. Isso cria uma lacuna para fluxos de trabalho que dependem do Arcade para lógica de cálculo de…
-
Incapaz de autenticar o conjunto de dados ArcGIS Online para uso na ferramenta de geoprocessamento Arpy
Eu tenho um serviço de feição hospedado no arcgis.com que não é compartilhado publicamente e preciso ler os dados a partir de um script python. O script abaixo estava funcionando sem problemas até recentemente. Agora recebo um erro 000732 ("Conjunto de dados não existe ou não é suportado") quando a ferramenta…
-
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…