I have a manual process I'm trying to automate. My question is mostly related to step 2, but I welcome any suggestion for any of the process I've described that may help me achieve my goal. Thanks in advance!
The first part is dumping raster data: Spatial Analyst Tools > Extraction > Sample >
(Step 1) I've been able to do this piece with the following code:
import arcpy from arcpy import env from arcpy.sa import * # Set environment settings env.workspace = r"c:\InputRasters" # Set local variables inRasters = ["b_inst"] locations = r"c:\Grids\50ft_Grid.shp" outTable = r"c:\TestTable" sampMethod = "NEAREST" # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial") # Execute Sample Sample(inRasters, locations, outTable, sampMethod) Environments
(Step 2) Now I need to Display the XY data and export attribute table to either a dbf or Excel spreadsheet.
This piece of code seems to be what I need, but it seems to require a .dbf file. The script from the previous step didn't output a .dbf, it output a folder called "info" containing the following files: arc.dir (1 kb), arc0000.dat (7,022 kb), arc0000.nit (1 kb), and arc0000.xml (1 kb).
(Step 3) Finally, I'm thinking I can use this technique to dump the resulting dbf to .xls