Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
30ab3b9
Enclosed __version__ number in single quotes
Hornbydd Jun 20, 2018
78209d3
Updated isLicensed() function
Hornbydd Jun 20, 2018
abd4e41
Updated isLicensed() function
Hornbydd Jun 20, 2018
8354e38
Updated Item Description XML files
Hornbydd Jun 20, 2018
8a886fd
Resolved realization ID error
Hornbydd Jun 20, 2018
dc3a933
Improved module comments, messaging & error trapping
Hornbydd Aug 24, 2018
45e79c4
Updates to Item Description
Hornbydd Aug 24, 2018
2bad09a
Improvements to core toolbox code
Hornbydd Aug 24, 2018
9d42d3c
Images used in Item Descriptions
Hornbydd Aug 28, 2018
db065a6
Updates to Item Descriptions
Hornbydd Aug 28, 2018
ecc233a
Updated core Toolbox code
Hornbydd Aug 28, 2018
e54fdfe
Added postFIXConfinement function
Hornbydd Sep 4, 2018
97fac16
Updated Confinement Tool and Item Description
Hornbydd Sep 5, 2018
3c2099f
Updated ConfiningMargins Module
Hornbydd Sep 5, 2018
ef1b07c
Added prepConfinementOutput function to clean up output
Hornbydd Sep 6, 2018
614c129
GeoData Toolbox containing many tools
Hornbydd Nov 6, 2018
2851b03
Updated code to pass through which bank side
Hornbydd Nov 6, 2018
e6ba794
Updated code to enable bank side information
Hornbydd Nov 6, 2018
3f172e5
New tools added
Hornbydd Nov 14, 2018
2fe271c
New valley cross section tool added
Hornbydd Nov 19, 2018
09f87fc
Latest version with hole finding tool
Hornbydd Nov 27, 2018
272be1d
Added error trapping and warning
Hornbydd Nov 27, 2018
f17f8cc
Contains new partitioning tools
Hornbydd Nov 29, 2018
022a860
Stream Power Index added
Hornbydd Dec 7, 2018
a66764c
Additional Stream Power Index related tools added
Hornbydd Dec 18, 2018
a8b9286
Initial upload of UC1476 Help File
Hornbydd Jan 4, 2019
15ec668
Here is version 1 of help file
Hornbydd Jan 4, 2019
07d0d42
Now has workflow page
Hornbydd Jan 7, 2019
9e7e437
Now has workflow page
Hornbydd Jan 7, 2019
f1a90d3
The slide used to create image map in Help file
Hornbydd Jan 7, 2019
8121c22
Updated help file
Hornbydd Feb 12, 2019
8ab79a4
Delete CHM file
Hornbydd Feb 12, 2019
da4a76d
New tools added and general changes to toolbox
Hornbydd Feb 12, 2019
4e7ab37
Uploaded various help file related documents
Hornbydd Apr 30, 2019
cbf57bd
Created a readme file
Hornbydd May 20, 2019
347bce0
Update README - The help file appears empty.txt
Hornbydd May 20, 2019
5c9d4fd
Update README - The help file appears empty.txt
Hornbydd May 20, 2019
5320691
Minor spelling corrections fixed
Hornbydd May 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions Bankfull_Channel.pyt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import arcpy
from arcpy.sa import *

__version__ = 0.0.1
__version__ = '0.0.1'

class Toolbox(object):
def __init__(self):
Expand Down Expand Up @@ -131,7 +131,23 @@ class BankfullChannelTool(object):

def isLicensed(self):
"""Set whether tool is licensed to execute."""
return True
# Code added by DDH on 20/6/18
if arcpy.ProductInfo() in ["ArcView","ArcEditor","ArcInfo"]:
if arcpy.ProductInfo() in ["ArcView","ArcEditor"]:
if arcpy.CheckExtension("Spatial") == "Available":
# Spatial Analyst extension available so check it out as an
# Arcview/Spatial combination is valid to allow the Polygon
# to raster tool to execute.
arcpy.CheckOutExtenstion("Spatial")
else:
# Extension not available so tool will not work
return False
else:
# Advance licensed machine
return True
else:
# No valid desktop license
return False

def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
Expand Down Expand Up @@ -159,9 +175,8 @@ class BankfullChannelTool(object):
p[6].valueAsText,
p[7].valueAsText,
p[8].valueAsText)

return

return

class PrecipitationToRasterTool(object):
def __init__(self):
Expand Down Expand Up @@ -329,7 +344,7 @@ def main(network, drarea, precip, valleybottom, output, MinBankfullWidth, dblPer
#smooth for final bunkfull polygon
arcpy.AddMessage("smoothing final bankfull polygon")
arcpy.SmoothPolygon_cartography(datasets['bankfull_dissolve'], output, "PAEK", "10 METERS") # TODO: Expose parameter?

# Todo: add params as fields to shp.

if deleteTemp == "True":
Expand All @@ -343,6 +358,4 @@ def main(network, drarea, precip, valleybottom, output, MinBankfullWidth, dblPer

if __name__ == "__main__":
import argparse


#main()
1 change: 1 addition & 0 deletions Confinement_Toolbox.ConfinementProjectTool.pyt.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<metadata xml:lang="en"><Esri><CreaDate>20180620</CreaDate><CreaTime>14334900</CreaTime><ArcGISFormat>1.0</ArcGISFormat><ArcGISstyle>INSPIRE Metadata Directive</ArcGISstyle><SyncOnce>TRUE</SyncOnce><ModDate>20180620</ModDate><ModTime>17063800</ModTime><scaleRange><minScale>150000000</minScale><maxScale>5000</maxScale></scaleRange><ArcGISProfile>INSPIRE</ArcGISProfile><DataProperties><itemProps><imsContentType export="False"></imsContentType></itemProps></DataProperties></Esri><tool name="ConfinementProjectTool" displayname="Create a New Confinement Project" toolboxalias="" xmlns=""><arcToolboxHelpPath>c:\program files (x86)\arcgis\desktop10.6\Help\gp</arcToolboxHelpPath><parameters><param name="projectName" displayname="Project Name" type="Required" direction="Input" datatype="String" expression="projectName"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Provide a name for your&lt;/SPAN&gt;&lt;SPAN&gt; project&lt;/SPAN&gt;&lt;SPAN&gt;. This needs to be computer friendly so must not have spaces in the name.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param><param name="projectFolder" displayname="Project Folder" type="Required" direction="Input" datatype="Workspace" expression="projectFolder"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Select a location for where your project will be stored. Input and output files will also be stored here. This is the "master" location.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param><param name="boolNewFolder" displayname="Create New Project Folder?" type="Optional" direction="Input" datatype="Boolean" expression="{boolNewFolder}"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Tick this on and a new sub folder with the project name with be created, all inputs and outputs are stored in here.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param><param name="metaOperator" displayname="User Name (Operator)" type="Optional" direction="Input" datatype="String" expression="{metaOperator}"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Provide a user name, initials are preferred.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param><param name="metaRegion" displayname="Region" type="Optional" direction="Input" datatype="String" expression="{CRB}"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Specify the Region of the data for the project. This is limited to CRB (Columbia River Basin) for now&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param><param name="metaWatershed" displayname="Watershed (HUC 8 Name)" type="Optional" direction="Input" datatype="String" expression="{metaWatershed}"><dialogReference>&lt;DIV STYLE="text-align:Left;"&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;Specify the Watershed of the project&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</dialogReference></param></parameters></tool><dataIdInfo><idCitation><resTitle>Create a New Confinement Project</resTitle></idCitation><dataLang><languageCode value="eng"/></dataLang><dataChar><CharSetCd value="004"/></dataChar><themeKeys xmlns=""><keyword>Geomorphology</keyword></themeKeys><tpCat><TopicCatCd value="012"/></tpCat></dataIdInfo><distInfo><distributor><distorFormat><formatName>ArcToolbox Tool</formatName></distorFormat></distributor></distInfo><mdHrLv><ScopeCd value="005"/></mdHrLv><mdLang><languageCode value="eng"/></mdLang><mdChar><CharSetCd value="004"/></mdChar><mdDateSt>20180620</mdDateSt></metadata>
Loading