Skip to main content

All Questions

Tagged with
1 vote
2 answers
938 views

for a in b.layers: The object is not iterable

I am trying to list all the feature services using the below code, from arcgis.gis import GIS gis = GIS(url='https://pythonapi.playground.esri.com/portal', username='arcgis_python', password='...
Aravinth's user avatar
0 votes
1 answer
99 views

Iterating variable through a string

I am working with ArcGIS, but this should be applicable to any situation with an iterator and a string. I have pairs of images which I want to run through this function, which have the same name and ...
calmacc's user avatar
0 votes
1 answer
986 views

ExecuteError: ERROR 000561: Relationship invalid for selected layers. Failed to execute (SelectLayerByLocation)

I am working on a code where nhl players in my nhlroster.shp feature class need to play only one of these three positions: leftFeild, rightFeild, Center and all the players must be born in sweden. I ...
Jessica Lambert's user avatar
-1 votes
2 answers
291 views

Sequential ID generator python ArcGIS

Hello stackoverflow community, I only have 2 months of experience with python but decided to challenge myself with a project for a class and eventually incorporate it to my job. I work with ArcGIS and ...
Iran F's user avatar
  • 1
1 vote
1 answer
2k views

ArcGIS script is buffering all features each time through the loop -- why?

I have a polygon shapefile with several records. I need to buffer each of those individually and create a new buffered polygon shapefile for each. I have written the following standalone script in ...
Nic's user avatar
  • 186
2 votes
1 answer
267 views

Why wont my python while loop stop?

I've got a loop that is supposed to select features and keep looping until it is no longer selecting new features arcpy.SelectLayerByLocation_management("antiRivStart","INTERSECT","polygon") ...
whatahitson's user avatar
1 vote
2 answers
2k views

Can I set a python while loop to run until nothing changes?

I have written a python script in ArcGIS that selects features that intersect. It needs to keep repeating until all relevant features are selected. At this point the selection will stop changing. Is ...
whatahitson's user avatar
0 votes
3 answers
1k views

Create new layer by looping throgh unique attribute values

I´m trying to make a loop through the unique values of a field of a shapefile. the field is named AGLOMERADOS and I want to loop throgh them. Once i have this list i want to start selecting by ...
Jota's user avatar
  • 13
0 votes
1 answer
611 views

Rookie python: how to interact layers with a nested loop

I've dealing with the code below with such a long time. I have to show in a raster image the result of calculating the cost of the electricity for a solar plant. The thing is that I have to interact a ...
tom's user avatar
  • 125
3 votes
2 answers
2k views

arcgis union python error

Trying to loop through multiple spatial extents to create 17 unions of 4 different layers. I'm running ArcGIS Desktop 10.0, ArcInfo (advanced). Gridnums = range(1,18) for i in Gridnums: #...
RichT's user avatar
  • 304
1 vote
2 answers
3k views

Loop on Select_Analysis tool (Python and ArcGIS 9.3)

First, I'm new in Python and I work on Arc GIS 9.3. I'd like to realize a loop on the "Select_Analysis" tool. Indeed I have a layer "stations" composed of all the bus stations of a city. The layer ...
Julien's user avatar
  • 629
1 vote
1 answer
672 views

Iterate a command of a ArcGIS extension: batch using Python

I am trying to iterate in ArcGIS for a number of shapefiles a function, which is loaded as a small extension (one single function in the extension): http://www.jennessent.com/arcgis/conefor_inputs.htm ...
Nigel Clerici's user avatar