I am not normally a programmer myself, but I've used ESRI's model builder and exported models to python scripts that can be executed as part of a batch file. It's not too hard to do, but I don't see a standard toolbox to use and may need to be handled by python.Basically I need to build a model to trigger ESRI's "Calculate Geometry" function, returning results in decimal degrees or DMS. I don't see any toolboxes to serve that purpose. After searching online, all I can find are python scripts using the CalculateValue toolbox to return the X-Y values. But they're returned in feet and I need to have decimal degrees.I found a script that looked like what I needed, but it required the Defense Mapping extension in order to use it, which I don't have. Any easy answers?
import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "Mains" rows = arcpy.UpdateCursor(fc, "", "Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj") for row in rows: geom = row.shape row.Area_DD = geom.area rows.updateRow(row) del row, rows
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.