Timeline for Polygon found with search cursor, but not update cursor
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 18, 2015 at 21:07 | comment | added | AJSmyth | Using ArcGIS 10.2.2 | |
Jun 18, 2015 at 18:26 | vote | accept | AJSmyth | ||
Jun 17, 2015 at 18:38 | comment | added | Aaron♦ | What version of ArcGIS are you using? | |
Jun 17, 2015 at 18:35 | answer | added | AJSmyth | timeline score: 0 | |
Jun 17, 2015 at 18:16 | history | edited | AJSmyth | CC BY-SA 3.0 |
added 287 characters in body
|
Jun 17, 2015 at 17:19 | comment | added | AJSmyth | I've confirmed that there are no duplicate ids in either feature class. RegionIDs are all unique. When I use A arcpy.da.SearchCursor(), it finds everything. When I change only that call and nothing else to arcpy.da.UpdateCursor(), it doesn't find everything. I will try normal cursors as fatih_dur suggests. Thanks everyone. | |
Jun 15, 2015 at 23:19 | comment | added | fatih_dur |
Could you comment out the del updated_rid_dict[row[0]] part and report the count, please? If it turns to correct (i.e., 594), then @Hornbydd's first comment reflects your problem, RegionID may not be necessarily unique. Otherwise, you can test normal cursors (arcpy.SearchCursor, etc.) to see if the issue persists.
|
|
Jun 15, 2015 at 22:36 | comment | added | Michael Stimson | where is cursor.UpdateRow(row)? where are you copying/replacing the 'to' geometry, all I see is del updated_rid_dict[row[0]], shouldn't there be row[1] = something? Is your 'to' feature class slightly broken? is that why you're trying to fix it? Perhaps a repair geometry could help.. | |
Jun 15, 2015 at 22:16 | comment | added | Hornbydd | Another thing I would do is run your update cursor on both datasets, not updating just pulling out the ID values and compare just to see if it is doing some weirdness to the values? | |
Jun 15, 2015 at 22:13 | comment | added | Hornbydd | You talk about UID's but the field you pull out is RegionID. May be you have many rows belonging to the same region and this would be the discrepancy. Basically regionID is not a unique number. | |
Jun 15, 2015 at 22:08 | history | edited | Hornbydd | CC BY-SA 3.0 |
General formatting
|
Jun 15, 2015 at 20:41 | history | asked | AJSmyth | CC BY-SA 3.0 |