TPI Tool Bathymetric Low¶
This tool maps bathymetric low features from bathymetry data using a Topographic Position Index (TPI) [Weiss, 2001] based method. Negative TPI usually indicates bathymetric low location.
The followings are the key steps of this tool:
Calculate TPI from the input bathymetry raster using the TPI Circle Radius parameter
Calculate the TPI threshold using this equation (1), where c is the TPI STD Scale parameter, mean_TPI and STD_TPI are the mean and standard deviation statistics of the TPI raster. The TPI threshold should always have a negative value
(1)¶\[TPI\_threshold = mean\_TPI - c * STD\_TPI\]Select locations that have TPI values smaller than the TPI threshold
Convert the selected areas into polygons
Remove the polygons with areas smaller than the Area Threshold parameter to obtain the final set of bathymetric low features as output
The TPI radius should be large enough to capture the largest bathymetric low features in the dataset. For example, for a 5m resolution bathymetry raster, a radius of 50 cells should be used to capture any bathymetric low features that is smaller than 500m in length. Users should also experiment the TPI STD Scale and the Area Threshold parameters to obtain an optimal output solution.
1from arcpy import env
2from arcpy.sa import *
3arcpy.CheckOutExtension("Spatial")
4
5# import the python toolbox
6arcpy.ImportToolbox("C:/semi_automation_tools/User_Guide/Tools/BathymetricLow.pyt")
7
8env.workspace = 'C:/semi_automation_tools/testSampleCode/Gifford.gdb'
9env.overwriteOutput = True
10
11# specify input and output parameters of the tool
12inBathy = 'gifford_bathy'
13outTPI = 'gifford_tpi10'
14outFeat = 'tpi10_1std_300000m2_BL'
15areaT = '300000 SquareMeters'
16tpiRadius = 10
17tpiSTD = 1.0
18tempWorkspace = 'C:/Users/u56061/Documents/ArcGIS/Projects/UserGuide/UserGuide.gdb'
19
20# execute the tool
21arcpy.BathymetricLow.TPIToolLow(inBathy,outTPI,outFeat,areaT,tpiRadius,tpiSTD,tempWorkspace)