The Stack Overflow podcast is back! Listen to an interview with our new CEO.
4

Take a look at some of the identity functions in rgeos such as gTouches, gIntersects, gContains, gRelate, gWithin, ect... At their most basic, these functions can return a Boolean that will allow you to perform the equivalent of a spatial select. To control output, take a close look at the function(s) arguments and experiment a bit with outputs from ...


2

I suspect "InstallationID" isn't a field in your table. Double check the field name. >>> curs = arcpy.SearchCursor ("Meters_RandomSel_geocoded") >>> row = curs.next () >>> row.getValue ("fgfdgdfgfd") Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\...


2

Use the SAGA tool Clip raster with polygon. This tool can be found in the Processing Toolbox. Click the round green arrow button next to the Polygons layer. This button toggles the option to Iterate over this layer, creating a separate output for every feature in the layer.


1

Thanks to the suggestion from @ziggy, I realized you can preform geometry operations on features outside of an arcpy.da.Cursor by storing the '@SHAPE' attribute in python. You then simple pull in a geometric "Method" - in this case shape1['@SHAPE'].touches(shape2['@SHAPE']). So the code ended up looking like this, which compared to my original, is ...


1

Make use of a spatial join instead of selecting each feature one at a time. This will give you a table with your main fields and your service fields based on the indicated spatial relationship. This eliminates the need for multiple spatial selections as well as multiple cursor initiations, both of which take a lot of time. arcpy.SpatialJoin_analysis ("...


Only top voted, non community-wiki answers of a minimum length are eligible