ArcGIS Pro tool to batch erase multiple fire perimeters and then merge them into a single shapefile.
Created a Python Script for use in an ArcGIS Pro Toolbox
1. Adds a new field to each fire perimeter polygon shapefile and fills in the date of the fire perimeter into each row; then
2. Erases multiple polygons from each other in descending date order (previous date polygon used as erase feature) and then merges those polygons into a single shapefile.
Problem
Producing daily growth wildfire perimeters is a cumbersome task. The National Interagency Fire Center produces daily fire perimeter polygon shapefiles for every major wildfire in the US. These files, among many others, are uploaded to their FTP site. Each daily fire perimeter polygon encompasses the entire fire perimeter from the ignition date to the date in which the perimeter is mapped (using satellite data). To create a daily spread wildfire map, the previous day’s perimeter polygon would need to be erased from the current day’s polygon. If you are mapping an active fire, this process is short and only done daily. If you want to do similar mapping for older fires in order to perform an analysis that involves fire spread area and rates, this could mean erasing the previous day’s perimeter 30 times for a fire that lasted 30 days. The individual daily fire polygons could be used individually or combined to create a single shapefile. The fire perimeter polygons do not have a date field in the attribute table, so this field would need to be added to every fire perimeter shapefile and corresponding dates populated before erasing and merging, or there would be no way to symbolize the fire spread by date.
Example: Cameron Peak Fire – Ignition 8/15/20 The Cameron Peak Fire in Colorado has over 50 separate perimeter polygon shapefiles. In order to create a fire progression shapefile, each polygon shapefile would have to be erased in reverse chronological order to get the daily burn polygons, then merged into a single shapefile.
The individual fire perimeter shapefiles downloaded from the NIFC FTP site and put into a folder will naturally line up in date order given the naming schema used by NIFC. 20201003_2205_CameronPeak_HeatPerimeter.shp 20201008_2055_CameronPeak_HeatPerimeter.shp 20201013_2003_CameronPeak_HeatPerimeter.shp
Goal
The goal of the tool would be to be able to put all fire perimeter polygon shapefiles into a folder, then select, or select from ArcGIS Pro map table of contents; add a new field called 'Date' to each fire perimeter shapefile and populate the rows with the date (YYYYMMDD) from the date at the beginning of each file name; erase each polygon with the previous date polygon as the erase feature, append a standard moniker such as '_eraseYYYYMMDD' to the end of each output shapefile using the date from the name of the erase feature file name, then merge the initial fire perimeter shapefile with the erased shapefiles with '_eraseYYYYMMDD' into a merged polygon fire perimeter file.
I needed to create Zonal Statistics for 100 vegetation index rasters and then export them to an Excel file so that I could create charts and graphs representing how vegetation changed over time. I created a python script to batch process the rasters and create separate Excel files for each with the name of the zone data file and individual raster file combined for easy identification and processing.