POST
|
Thank you! @mehdi Pira It worked perfectly. Smiling really big!
... View more
06-26-2020
02:01 PM
|
2
|
0
|
2952
|
POST
|
Thank you for your response Mehdi Pira! Can you clarify what ' #' stands for in the Intersect statement? Thank you Again - Kathy
... View more
06-26-2020
10:48 AM
|
0
|
1
|
2952
|
POST
|
Hi, I'm hopping for some help as I work through the process of writing a piece of code to produce an output of polygon intersects. My shape file contains many polygons which I would like to determine if any of them intersect and if they do add that intersect results to a new shape file. The code I used is below. I'm getting and error which is shown in a pic below. Ultimately I'd like to have a single output shape file containing all intersect results. If you know a more efficient way or know how to make what I have work I am all ears! I have attached a sample of the polygons. Many thanks for your attention! I'm limited to using ArcMap 10.7 and python 2.7 ``` import arcpy from arcpy import env import os ##Set working directory and workspace wk_dir = os.getcwd() env.workspace = wk_dir ##Assign feature class and working fields fc = wk_dir + '\\CBT_Composite.gdb\\example_polys' fields = ['RecordID', 'SHAPE@'] ##Assign output file path and name out = wk_dir + '\\output.gdb\\A' ##print fc_path + fc with arcpy.da.SearchCursor(fc, fields) as cursor: for row in cursor: record = '{0}'.format(row[0]).split('.')[0] polygon = row[1] for row2 in cursor: if row2 != row: arcpy.Intersect_arc(row2[1], polygon, out +record) ```
... View more
06-25-2020
04:12 PM
|
0
|
4
|
3055
|
Title | Kudos | Posted |
---|---|---|
2 | 06-26-2020 02:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|