I'm trying to create a tool that will consume National Weather Service 1 hour precipitation radar information and then classify groundcover based on amounts per area (in mm), then output the results in a comma delimited excel file. Below is some pseudocode:

Importing necessary modules

import arcpy
import os
import sys
import locale
import csv
import numpy as np

#Making sure the spatial analyst liscence has been checked out
#Defining classify
def classify:
    (set parameters)

#Setting variables
input_raster = ('input_raster')
definitions_file = ('definitions_file')
Additional_raster = ('additional_raster')

#Setting the exent of the area of interest
arcpy.env.extent = "Cache_valley_shapefile"
#Could also use extent class
arcyp.env.extent = (list_of_extents)

#Execute classification
classifiedraster = ClassifyRaster(input_raster, definitions_file, Additional_raster)

#Save locally

#Using a CSV reader/writer to get a list of precip values
def tableToCSV(input_table,FilePath_for_csv):
    Field List = arcpy.ListFields(input_table)
    Field Names = [name for field in list of fields)

#open CSV to which we will write the data
with open(FilePath_for_csv), 'wb') as csv_file:
        writer = csv.writer(csv_file)

#Specify output headers

#Closing the CSV

Is this a logical workflow?

Are there gaps in the theoretical process I need to address?

Documentation on classification with Esri products is scant.

Some of the information contained in this post requires additional references. Please edit to add citations to reliable sources that support the assertions made here. Unsourced material may be disputed or deleted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.