User:Jcreer/SMS:Toolbox
Starting with version 13.2 , SMS includes a general purpose toolbox that allows the SMS process to interact with external python scripts. In SMS 13.2 this is a beta feature. For this version, the user accesses the toolbox by right clicking on the "Project" item at the top of the tree in the "Project Explorer" and selecting "Toolbox". This bring up the SMS toolbox dialog.
SMS Toolbox
Tools in the toolbox allow the user to operate on data in an SMS interactive session as well as data in external files. Each tool in the toolbox links to a python script that produces a specific output. Example output from a tool could include, but are not limited to:
- a graphic or plot.
- a report (document or spreadsheet) for a specified analytical process.
- a new geometry item in SMS.
- a new dataset in SMS.
- a new data file.
Tools Tab
Available tools in the SMS Tool dialog are divided into categories, typically based on the type of output or the type of arguments used in the tool. Currently these categories include:
- Datasets (Will replace the dataset toolbox. Currently has 10 tools)
- Rasters (Will replace right click commands on rasters. Currently has 5 tools)
- UGrids (Applies to meshes, scatter sets and Ugrids. Currently has 3 tools)
(Jeff - eventually we want a wiki article for each tool in the toolbox that is created or managed by Aquaveo. These tools should be listed in an expandable list for each category and include a link to the tool's wiki article.)
Tools are discovered by SMS at run time from an installation area on the host machine. This allows users to develop and share custom python scripts that can operate on data in an SMS project.
(Jeff- we are working on a document that describes how a user would add a custom script. We should have a link to that document here.)
History Tab
The toolbox maintains a history of all tools invoked for a session of SMS. Eventually this history will be recorded so that it includes all tools invoked for this project.
The history section includes the tool and the date/time the tool was invoked. By double clicking on an entry in the history tab, the tool is launched. The input fields are populated with the arguments that were used in the previous invocation of the tool. These inputs can be changed for the new invocation of the tool.
Dataset Tools
Angle Convention
This tool converts between angle conventions. The tool has the following options:
- Input scalar dataset
- Input angle convention
- Cartesian
- Meteorologic
- Oceanographic
- Output angle convention
- Cartesian
- Meteorologic
- Oceanographic
- Output dataset name
Canopy Coefficient
This tool computes a canopy coefficient from a landuse raster. The tool has the following options:
- Input landuse raster
- Interpolation option
- Node location
- Area around node
- Target grid
- Landuse raster type
- NLCD
- C-CAP
- Other
- Output canopy coefficient dataset
Compare Datasets
This tool compares two datasets. The tool has the following options:
- Dataset 1 – Select the first dataset to compare.
- Inactive values option – From the drop-down menu, select the desired approach for handling inactive values in the dataset.
- "Use specified value for inactive value" – A specified value will replace inactive values.
- "Inactive values result in an inactive value" – Inactive values will be left as inactive in the comparison dataset.
- Specified value – Enter a value that will be used for inactive values.
- Dataset 2 – Select the second dataset to compare. This has the same options available for dealing with inactive dataset.
- Output dataset name – Enter the name of the new comparison dataset.
Directional Roughness
TheLanduse Raster to Directional Roughness tool converts a landuse raster (NLCD, C-CAP, etc.) to a directional roughness dataset. The tool has the following options:
- Input landuse raster
- Method
- "Linear"
- "Sector"
- Total distance
- Weighted distance
- Target grid
- Landuse raster type
- NLCD
- C-CAP
- Other
- Default wind reduction value
- Output wind reduction dataset
Geometry Gradient
This tool computes geometry gradient datasets. The tool has the following options:
- Input dataset – Select the dataset to use in the gradient computations.
- Gradient vector – Select to create a gradient vector dataset.
- Gradient magnitude – Select to create a gradient magnitude dataset.
- Gradient direction – Select to create a gradient direction dataset.
- Output gradient vector dataset name – Enter the name for the new gradient vector dataset.
- Output gradient magnitude dataset name – Enter the name for the new gradient magnitude dataset.
- Output gradient direction dataset name – Enter the name for the new gradient direction dataset.
Landuse Raster to Mannings N
This tool converts a landuse raster (NLCD, C-CAP, etc.) to a Mannings N dataset. The tool has the following options:
- Input landuse raster
- Landuse raster type
- NLCD
- C-CAP
- Other
- Target grid
- Landuse to Mannings N mapping table
- Select File
- Default Mannings N option
- Constant
- Dataset
- Default Mannings N dataset
- Subset mask dataset
- Output Mannings N dataset
Map Activity
This tool builds a dataset with values from one dataset and activity from another.
Scalar to Vector
This tool converts scalar datasets to vector datasets.
Smooth Datasets
This tool smooths datasets by limiting slope or area.
Smooth Datasets by Neighbor
This tool smooths datasets by averaging nodal neighbors.
Vector to Scalar
This tool converts vector datasets to scalar datasets.
Raster Tools
Blend Raster to Edges
This tool blends the secondary raster into the edges of the primary raster. The tool has the following options:
- Primary raster – Use the drop-down to select the raster that will be used as the primary raster.
- Secondary raster – Use the drop-down to selec the raster that will be designated as the secondary raster.
- Blend width along edge – Where the edges of the primary and secondary rasters meet, the edges will be blended to the width specified with this option.
- Output raster – Provide a name for the new blended raster.
Clip Raster from Elevations
This tool clips a raster where the raster elevations are above or below an elevation raster. The tool has the following options:
- Raster to clip – This option designates the raster which will have elevation values clipped by the elevation raster.
- Elevation raster – This option selects the elevation raster to use.
- Clip elevations above or below elevations raster – Once the raster to clip and elevation raster have been specified, the tool can either clip elevation values either above or below the elevation raster's values.
- "Clip elevations above" &nash; This option removes values that are above the elevation values of the elevation raster.
- "Clip elevations below" – This option removes values that are below the elevation values of the elevation raster.
- Output raster – Enter the name for the new clipped raster.
Interpolate Priority Rasters
This tool interpolates multiple rasters to a UGrid with priority. Each source is added to the list in priority order. If a value is not obtained when interpolating from the highest priority source, the tool looks for a value in the next source until either a value is found or all sources are exhausted. The tool has the following options:
- Grid – This option allows you to select the geometry that will receive the interpolated rasters.
- Default value option –
- "Constant"
- "Dataset"
- "Raster data"
- Output dataset name – Allows setting the name of the new interpolated raster.
- Raster 1 – Select the raster that will be given highest priority during the interpolation process.
- Raster 2 – Select the raster that will be given the next highest priority during the interpolation process.
- Raster n – Additional rasters may be selected and given priority in the order they are selected.
Merge Elevation Rasters
This tool merges two or more elevation rasters with priority. The tool has the following options:
- Raster 1 – Select the first elevation raster to be merged. This raster will be given the highest priority during the merge.
- Blend distance – Enter a distance for the edges of the raster to be blended when merged with another raster. This option can be set for each raster being merged.
- Raster 2 – Select second raster to be merged. This raster will have the next highest priority.
- Raster n – Adidtional rasters can be added to the merge with lowering priority.
- Merged raster – Enter a name for the new merged raster.
UGrid to Raster
This tool converts a UGrid into a raster. The tool has the following options:
- Dataset – From the drop-down menu, select that dataset to convert to a raster.
- Pixel size – Enter the pixel resolution size for the new raster.
- Null value
- Extrapolation width
- Output raster – Enter the name for the new raster.
UGrid Tools
Convert to Voronoi UGrid
This tool converts a UGrid to a Voronoi UGrid.
Merge Ugrids
The tool merges two UGrids.
Smooth UGrid
This tool smooths a UGrid.