fc = "fishnet" rows = arcpy.UpdateCursor(fc) for row in rows: geom = row.shape row.LowerX = geom.extent.XMin row.UpperX = geom.extent.XMax row.LowerY = geom.extent.YMin row.UpperY = geom.extent.YMax rows.updateRow(row) del row, rows
Hi Wade,one way you could go is with field calculator:1. create fields for centroidX/centroidY of the grids, calculate geometry for them.2. create fields for UpperY, LowerY, LeftX, RightXin field calculator you can then calculate each field:UpperY = centroidY + (gridheight*0.5)LowerY = centroidY - (gridheight*0.5)LeftX = centroidX - (gridwidth*0.5)RightX = centroidX + (gridwidth*0.5)
Here is an example that may help: fc = "fishnet" rows = arcpy.UpdateCursor(fc) for row in rows: geom = row.shape row.LowerX = geom.extent.XMin row.UpperX = geom.extent.XMax row.LowerY = geom.extent.YMin row.UpperY = geom.extent.YMax rows.updateRow(row) del row, rows
Going to try the python code above
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.