Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wschwanghart committed Jun 13, 2019
1 parent 645ae8c commit af96c91
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 39 deletions.
2 changes: 1 addition & 1 deletion @FLOWobj/multi2single.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
% with single flow directions. Otherwise, FLOWobj will be of type
% 'multi'.
% S STREAMobj (only applicable if 'minarea' is set >0 or
% channelheads are provided.
% channelheads are provided.)
%
%
% Example
Expand Down
4 changes: 4 additions & 0 deletions @GRIDobj/polygon2GRIDobj.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@
is_hole(IX_hole) = true;

% loop through features of mapping structure MS
h = waitbar(0);
for r = 1:numel(MS)
waitbar(r/numel(MS),h,...
['Please wait (' num2str(r) '/' num2str(numel(MS)) ')']);

% get coordinates
x = MS(r).X;
Expand Down Expand Up @@ -171,6 +174,7 @@
P.Z(ext(1):ext(2),ext(3):ext(4)) = FillMat;

end
close(h)
end

function [BW,ext] = getmask(r,c,siz)
Expand Down
14 changes: 12 additions & 2 deletions @STREAMobj/STREAMobj.m
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,22 @@
% STREAMobj/rmnode
%
% Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de)
% Date: 26. September, 2017
% Date: 5. June, 2019

p = inputParser;
p.FunctionName = 'STREAMobj/rmnode';
addRequired(p,'S',@(x) isa(x,'STREAMobj'));
addRequired(p,'nal',@(x) isnal(S,x) && islogical(x));
addRequired(p,'nal',@(x) isnal(S,x) || isa(x,'GRIDobj'));
parse(p,S,nal);

if isa(nal,'GRIDobj')
validatealignment(S,nal);
nal = getnal(S,nal);
nal = nal > 0;
else
nal = nal > 0;
end

if all(nal)
% do nothing
return
Expand All @@ -299,6 +307,8 @@
S.x = S.x(nal);
S.y = S.y(nal);
S.IXgrid = S.IXgrid(nal);

S = clean(S);

end

Expand Down
2 changes: 1 addition & 1 deletion @STREAMobj/nal2nal.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function nal2 = nal2nal(S2,S1,nal1,fillval)

%SETNAL
%NAL2NAL map one node-attribute list to another
%
% Syntax
%
Expand Down
106 changes: 85 additions & 21 deletions Contents.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% TopoToolbox
% Version 2.3 pre 24-Apr-2018
% Version 2.3 pre 13-Jun-2019
%
% TopoToolbox provides a set of Matlab functions that support the analysis
% of relief and flow pathways in digital elevation models. The major
Expand Down Expand Up @@ -39,37 +39,47 @@
% flowpathapp - Map, visualize and export flowpaths that start at manually set channelheads
% slopeareatool - Interactively create slope area plots and fit power laws
% topoapp - Create instance of a topoapp
% mappingapp - Map points combining river planform and profile view
%
% GRIDobj methods
%
% GRIDOBJ : Create instance of a GRIDobj
% GRIDOBJ2ASCII : write/export GRIDobj to ESRI ArcGIS ASCII file
% GRIDOBJ2GEOTIFF : Exports an instance of GRIDobj to a geotiff file
% GRIDOBJ2IM : GRIDOBJ2IM Create image from GRIDobj
% GRIDOBJ2MAT : convert GRIDobj to matrix and coordinate vectors
% GRIDOBJ2PM : combine several GRIDobj into a predictor matrix
% GRIDOBJ2POLYGON : Conversion from drainage basin grid to polygon or polyline
% ACV : Anisotropic coefficient of variation (ACV)
% ASPECT : aspect (angle of exposition) from a digital elevation model (GRIDobj)
% AGGREGATE : resampling a GRIDobj using aggregation
% ARCSLOPE : mean gradient from a digital elevation model sensu ArcGIS
% ASPECT : angle of exposition from a digital elevation model (GRIDobj)
% CASTSHADOW : cast shadow
% CELLAREA : calculate cell areas of a GRIDobj in geographic coordinate system
% CLIP : clip a GRIDobj with a polygon or another GRIDobj
% CONTOUR : contour plot of an instance of GRIDobj
% COORD2IND : convert x and y coordinates to linear index
% COORD2SUB : convert x and y coordinates to subscripts into a GRIDobj
% CREATEMASK : create a binary mask using polygon mapping
% CROP : crop an instance of GRIDobj with axis-aligned minimum bounding box
% CURVATURE : 8-connected neighborhood curvature of a digital elevation model
% DEMAREA : Calculate the corrected surface area of a DEM
% DEMPROFILE : get profile along path
% DILATE : morphological dilation
% DISTANCE : distance transform
% DIST2CURVE : labels pixels in a GRIDobj by their directed distance to a curved line
% DIST2LINE : labels pixels in a GRIDobj by their directed distance to a straight line
% DIST2LINE : labels pixels in a GRIDobj by their distance to a straight line
% DISTANCE : distance transform
% ELEVATEMINIMA : elevate regional minima in a DEM to their lowest neighbor
% ERODE : morphological erosion
% EXCESSTOPOGRAPHY : difference between actual elevations and elevations with threshold slope
% EXCESSTOPOGRAPHY : reconstruct surface with threshold-slope surface
% FILLSINKS : fill/remove pits, sinks or topographic depressions
% FILTER : edge detection using sobel filter
% FILTER : 2D-filtering of DEMs with different kernels
% FIND : Find indices of nonzero elements in GRIDobj
% FINDCOORD : Find coordinates of nonzero elements in GRIDobj
% GETCOORDINATES : get coordinate vectors of an instance of GRIDobj
% GETEXTENT : return extent of a GRIDobj
% GETOUTLINE : get or plot extent of GRIDobj
% GRADIENT8 : 8-connected neighborhood gradient and aspect of a digital elevation model
% GRADIENT8 : 8-connected neighborhood gradient of a digital elevation model
% GRIDDEDCONTOUR : plot contours on grid
% HILLSHADE : create hillshading from a digital elevation model (GRIDobj)
% HYPSCURVE : plot hypsometric curve of a digital elevation model
Expand All @@ -82,51 +92,65 @@
% INTERP : interpolate to query locations
% INTERP2GRIDOBJ : Interpolate scattered data to GRIDobj
% ISNAN : returns array elements that are NaNs as logical grid
% KSDENSITY : kernel density estimator for GRIDobj
% LATLON : returns grid lines of latitudes and longitudes
% LINE2GRIDOBJ : convert line to a grid
% LOCALTOPOGRAPHY : Local topography
% MEASURE : take interactive measurements along a polyline
% MINMAXNORM : min-max normalization with optional percent clipping
% MPOWER : overloaded power for GRIDobj
% MRDIVIDE : overloaded right division for GRIDobj
% MTIMES : overloaded multiplication for GRIDobj
% PAD : add or remove a border of pixels around a GRIDobj
% POLYGON2GRIDOBJ : convert polygon to a grid
% POSTPROCFLATS : postprocess flat terrain for visualization purpose
% PROJECTGRIDOBJ : reprojects a GRIDobj
% RECLABEL : label GRIDobj by rectangular fields
% PRCCLIP : percentile clipping
% PROJECT : transforms a GRIDobj between projected coordinate systems
% RECLABEL : labels GRIDobj by rectangular fields
% RECLASSIFY : generate univariate class intervals for an instance of GRIDobj
% REPROJECT2UTM : Reproject DEM with WGS84 coordinate system to UTM-WGS84
% RESAMPLE : resample grid to alter spatial resolution
% RESAMPLE : change spatial resolution of a GRIDobj
% ROUGHNESS : terrain ruggedness, position and roughness indices of DEMs
% SHUFFLELABEL : shufflelabel randomly relabels a label matrix
% SNAP2STREAM : snap gauges or pour points to stream raster
% SUB2COORD : convert subscripts to x and y coordinates
% SURF : surface plot for GRIDobj
% TANAKACONTOUR : Relief depiction using Tanaka contours
% TOPOSHIELDING : topographic shielding from cosmic rays
% VALIDATEALIGNMENT : validates whether instances of GRIDobj are spatially aligned
% ZSCORE : standardized z-scores for GRIDobj
%
% FLOWobj methods
%
% FLOWOBJ : Create flow direction object
% FLOWOBJ : create flow direction object
% FLOWOBJ2GRIDOBJ : create ESRI ArcGIS flow direction grid from FLOWobj
% FLOWOBJ2M : convert instance of FLOWobj to flow direction matrix
% FLOWOBJ2CELL : Return cell array of FLOWobjs for individual drainage basins
% FLOWOBJ2GRADIENT : gradient along flow direction
% DEPENDENCEMAP : upslope area for specific locations in a digital elevation model
% FLOWOBJ2CELL : return cell array of FLOWobjs for individual drainage basins
% CROP : crop an instance of FLOWobj
% DBENTROPY : entropy of drainage basin delineation
% DEPENDENCEMAP : upslope area for specific locations in a DEM
% DRAINAGEBASINS : drainage basin delineation/catchments
% DRAINAGEBASINSTATS : Zonal statistics on drainage basins
% DRAINAGEBASINSTATS : zonal statistics on drainage basins
% FIND : find indices and values of edges in the flow direction graph
% FLOWACC : flow accumulation (upslope area, contributing area)
% FLOWCONVERGENCE : compute flow convergence of a digital elevation model
% FLOWDISTANCE : flow distance in upstream and downstream direction
% FLOWPATHEXTRACT : extract linear indices of a single flowpath in a DEM
% FLOWVEC : velocity vectors from FLOWobj
% GRADIENT : gradient along flow direction
% IMPOSEMIN : minima imposition (carving) along drainage network
% IND2COORD : convert linear index to x and y coordinates
% INFLUENCEMAP : downslope area for specific locations in a digital elevation model
% ISMULTI : check if FD is multi or single flow direction
% MAPFROMNAL : map values from node-attribute list to nearest upstream grid
% MULTI2SINGLE : converts multiple to single flow direction
% SAVEOBJ : Create flow direction object
% STREAMORDER : calculate Strahler Stream Order Grid from FLOWobj
% MULTI_NORMALIZE : create flow direction object
% MULTI_WEIGHTS : create flow direction object
% QUANTCARVE : quantile carving
% SAVEOBJ : create flow direction object
% STREAMORDER : calculates a stream order GRIDobj from FLOWobj
% STREAMPOI : stream points of interest
% UPDATETOPOSORT : update topological sorting
% UPSLOPESTATS : upslope statistics of a variable based on the flow direction matrix
% VALIDATEALIGNMENT : validates whether instances of FLOWobj and GRIDobj are spatially aligned
% VERTDISTANCE2STREAM : vertical distance to streams
Expand All @@ -140,44 +164,81 @@
% STREAMOBJ2CELL : convert instance of STREAMobj to cell array of stream objects
% STREAMOBJ2LATLON : convert instance of STREAMobj to NaN-separated geographic coordinates
% STREAMOBJ2MAPSTRUCT : convert instance of STREAMobj to mapstruct
% AGGREGATE : aggregating values of reaches
% CHIPLOT : CHI analysis for bedrock river analysis
% CHITRANSFORM : Coordinate transformation using the integral approach
% CLEAN : Create stream object (STREAMobj)
% CONNCOMPS : labels of connected components (individual trees) in a stream network
% CRS : constrained regularized smoothing of the channel length profile
% CRSAPP : interactive smoothing of river long profiles
% CRSLIN : constrained regularized smoothing of the channel length profile
% CUMMAXUPSTREAM : cumulative maximum in upstream direction
% CUMTRAPZ : Cumulative trapezoidal numerical integration along a stream network
% CURVATURE : curvature or 2nd derivative of a STREAMobj
% DENSIFY : Increase number of vertices in stream network using splines
% DISTANCE : return node attribute list with distances along the stream network
% DRAINAGEDENSITY : drainage density of a stream network
% EXTRACTCONNCOMPS : interactive stream network selection
% GETNAL : get node attribute list
% GRADIENT : stream gradient
% GETNAL : get node-attribute list
% GETVALUE : retrieve value from node-attribute list
% GRADIENT : along-stream gradient
% HILLSLOPEAREA : upslope hillslope area for each stream pixel
% IDENTIFYFLATS : identify flat sections in a river profile
% IMPOSEMIN : minima imposition (carving) along stream network
% INFO : meta information about STREAMobj
% INPAINTNANS : inpaint missing values (nans) in a node attribute list
% INTERP : interpolate data on STREAMobj (single river only)
% INTERSECT : intersect different instances of STREAMobj
% INTERSECTLOCS : Derive locations where two STREAMobj start to have a common network
% ISNAL : test whether a vector is a node attribute list of a STREAMobj
% ISSUBGRAPH : Create stream object (STREAMobj)
% KLARGESTCONNCOMPS : retain k largest connected components in an instance of STREAMobj
% KNICKPOINTFINDER : find knickpoints in river profiles
% KSN : normalized steepness index
% LABELREACH : create node-attribute list with labelled reaches
% MAPLATERAL : map values of regions adjacent to streams to stream network
% MCHI : gradient of stream profile in chi space (M_chi)
% MEANUPSTREAM : mean (weighted) upstream values
% MINCOSTHYDROCON : minimum cost hydrological conditioning
% MNOPTIM : Bayesian optimization of the mn ratio
% MODIFY : modify instance of STREAMobj to meet user-defined criteria
% NAL2NAL : map one node-attribute list to another
% NETDIST : distance transform on a stream network
% NETWORKSEGMENT : Identify river segments and compute segment geometry
% ORIENTATION : stream orientation
% PLOT : plot instance of STREAMobj
% PLOT3 : 3d-line plot of a STREAMobj
% PLOT3D : 3D plot of a stream network
% PLOTC : plot a colored stream network
% PLOTDZ : plot upstream distance version elevation of a stream network
% PLOTSEGMENTGEOMETRY : Plot segment geometry obtained using the function networksegment
% PLOTSTREAMORDER : calculate Strahler Stream Order from STREAMobj
% PLOTDZSHADED : plot upstream distance version elevation of a stream network
% PLOTSEGMENTGEOMETRY : Plot segment geometry obtained from the function networksegment
% PLOTSTREAMORDER : calculate stream order from STREAMobj
% QUANTCARVE : quantile carving
% RANDLOCS : Random locations along the stream network
% REMOVEEDGEEFFECTS : remove potential edge effects
% REMOVESHORTSTREAMS : Remove first order streams with a length less than specified
% RMEDGE : Create stream object (STREAMobj)
% RMNODE : Create stream object (STREAMobj)
% SIDEBRANCHING : side branching classification according to Tokunaga (1978)
% SINUOSITY : sinuosity coefficient
% SLOPEAREA : slope-area relation of a stream network
% SMOOTH : smoothing of node-attribute lists
% SNAP2STREAM : snap locations to nearest stream location
% SPLIT : split drainage network at predefined locations
% STACKEDPLOTDZ : plot several stacked variables along the stream networks
% STREAMORDER : calculate Strahler Stream Order from STREAMobj
% STREAMPOI : stream points of interest
% STREAMPROJ : project stream elevations based on slope-area scaling
% SUBGRAPH : Create stream object (STREAMobj)
% TRANSFORMCOORDS : transform coordinates of stream network
% TRIBDIR : direction of inflow of tributary
% TRUNK : extract trunk stream (longest stream)
% UNION : merge different instances of STREAMobj into a new instance
% VALIDATEALIGNMENT : is an instance of STREAMobj is spatially aligned with another object of TopoToolbox
% WIDENSTREAM : level elevations adjacent to the stream network
% WMPLOT : plot stream network in the webmap browser
% ZEROBASELEVEL : set base level to zero
%
% SWATHobj methods
%
Expand Down Expand Up @@ -209,6 +270,9 @@
% landcolor - colormap for the display of DEMs
% setextent - set current axis extent
% showmethods - displays class method names and H1 lines in the command line
% egm96heights - read and resample EGM96 geoid heights
% dpsimplify - Douglas-Peucker line simplification
% zonalstats - Zonal statistics
%
% Documentation
%
Expand Down
12 changes: 11 additions & 1 deletion functionSignatures.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"inputs":
[
{"name":"FD", "kind":"required", "type":["FLOWobj"]},
{"name":"FD", "kind":"required", "type":["GRIDobj"]}
{"name":"I", "kind":"required", "type":["GRIDobj"]}
]
},
"STREAMobj":
Expand All @@ -49,4 +49,14 @@
{"name":"channelheads", "kind":"namevalue"}
]
}
"STREAMobj.chitransform":
{
"inputs":
[
{"name":"S", "kind":"required", "type":["STREAMobj"]},
{"name":"FD", "kind":"required"},
{"name":"mn", "kind":"namevalue"},
{"name":"a0", "kind":"namevalue"}
]
}
}
Binary file removed html/helpsearch-v3/_5.cfe
Binary file not shown.
Binary file added html/helpsearch-v3/_6.cfe
Binary file not shown.
Binary file not shown.
Binary file renamed html/helpsearch-v3/_5.si → html/helpsearch-v3/_6.si
Binary file not shown.
Binary file modified html/helpsearch-v3/segments.gen
Binary file not shown.
Binary file removed html/helpsearch-v3/segments_6
Binary file not shown.
Binary file added html/helpsearch-v3/segments_7
Binary file not shown.
Binary file modified html/mlxfiles/tt_product_page.mlx
Binary file not shown.
2 changes: 1 addition & 1 deletion html/tt_gs_1.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/tt_gs_2.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/tt_gs_3.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/tt_gs_4.html

Large diffs are not rendered by default.

Loading

0 comments on commit af96c91

Please sign in to comment.