├── LICENSE.md ├── toolbox ├── @GRIDobj │ ├── all.m │ ├── any.m │ ├── uminus.m │ ├── uplus.m │ ├── not.m │ ├── aspect.m │ ├── roughness.m │ ├── toposhielding.m │ ├── eq.m │ ├── ge.m │ ├── gt.m │ ├── le.m │ ├── lt.m │ ├── ne.m │ ├── or.m │ ├── and.m │ ├── xor.m │ ├── minus.m │ ├── plus.m │ ├── power.m │ ├── times.m │ ├── ldivide.m │ ├── rdivide.m │ ├── log.m │ ├── log2.m │ ├── sqrt.m │ ├── log10.m │ ├── mpower.m │ ├── mtimes.m │ ├── mrdivide.m │ ├── nrows.m │ ├── ncols.m │ ├── private │ │ ├── georef2imref2d.m │ │ ├── makeColumnsStartFrom.m │ │ ├── createRasterFromASCIIGrid.m │ │ ├── openRasterDialog.m │ │ └── builtincaller.m │ ├── isnan.m │ ├── zscore.m │ ├── GRIDobj2mat.m │ ├── erode.m │ ├── dilate.m │ ├── ind2coord.m │ ├── findcoord.m │ ├── sub2coord.m │ ├── histogram.m │ ├── find.m │ ├── getcoordinates.m │ ├── cellarea.m │ ├── max.m │ ├── min.m │ ├── hydrogram.m │ ├── griddedcontour.m │ └── imagesc.m ├── Contents.m ├── @PPS │ ├── rhohat.m │ ├── density.m │ ├── private │ │ ├── tt_icon_circle.png │ │ ├── tt_icon_circle_2.png │ │ ├── tt_icon_circle_3.png │ │ ├── tt_icon_circle_4.png │ │ ├── randpoi.m │ │ └── nodedistance.m │ ├── tlength.m │ ├── npoints.m │ ├── getmarks.m │ ├── removepoints.m │ ├── removeduplicates.m │ ├── extendednetwork.m │ └── plotc.m ├── gettingStarted.mlx ├── @STREAMobj │ ├── fastscape.m │ ├── isempty.m │ ├── isnal.m │ ├── istrunk.m │ ├── plot3.m │ ├── conncomps.m │ ├── plot3d.m │ ├── cummaxupstream.m │ └── zerobaselevel.m ├── DEMdata │ ├── exampleDEM.mat │ ├── testcase_DEM.mlx │ ├── srtm_bigtujunga30m_utm11.tif │ ├── srtm_bigtujunga30m_utm11.tif.ovr │ ├── srtm_bigtujunga30m_utm11.tfw │ ├── readme.md │ └── createTestDEM.m ├── IOtools │ ├── readopenalti.m │ ├── readme.md │ └── hydrosheds2FLOWobj.m ├── docs │ ├── mlxfiles │ │ ├── tt_gs_0.mlx │ │ ├── tt_gs_1.mlx │ │ ├── tt_gs_2.mlx │ │ ├── tt_gs_3.mlx │ │ ├── tt_gs_4.mlx │ │ ├── images │ │ │ ├── alps.png │ │ │ ├── tt_classes.png │ │ │ ├── tt_classes_code.png │ │ │ └── tt_classes_circle.png │ │ ├── topotoolbox.png │ │ ├── topotoolbox3.png │ │ ├── ttfunctions.mlx │ │ ├── usersguide_0.mlx │ │ ├── tt_product_page.mlx │ │ ├── usersguide_1_intro.mlx │ │ ├── usersguide_2_ksn.mlx │ │ ├── usersguide_3_mfd.mlx │ │ ├── usersguide_4_modify.mlx │ │ └── usersguide_5_smoothing.mlx │ └── publishtthelp2html.m ├── colormaps │ ├── private │ │ ├── +LICENCE.pdf │ │ ├── +ThankYou.pdf │ │ ├── colormaps │ │ │ ├── bam.mat │ │ │ ├── bamO.mat │ │ │ ├── broc.mat │ │ │ ├── buda.mat │ │ │ ├── cork.mat │ │ │ ├── fes.mat │ │ │ ├── nuuk.mat │ │ │ ├── oslo.mat │ │ │ ├── roma.mat │ │ │ ├── vik.mat │ │ │ ├── vikO.mat │ │ │ ├── acton.mat │ │ │ ├── actonS.mat │ │ │ ├── bam10.mat │ │ │ ├── bam100.mat │ │ │ ├── bam25.mat │ │ │ ├── bam50.mat │ │ │ ├── bamO10.mat │ │ │ ├── bamO25.mat │ │ │ ├── bamO50.mat │ │ │ ├── bamako.mat │ │ │ ├── batlow.mat │ │ │ ├── berlin.mat │ │ │ ├── bilbao.mat │ │ │ ├── broc10.mat │ │ │ ├── broc25.mat │ │ │ ├── broc50.mat │ │ │ ├── brocO.mat │ │ │ ├── buda10.mat │ │ │ ├── buda25.mat │ │ │ ├── buda50.mat │ │ │ ├── budaS.mat │ │ │ ├── bukavu.mat │ │ │ ├── cork10.mat │ │ │ ├── cork25.mat │ │ │ ├── cork50.mat │ │ │ ├── corkO.mat │ │ │ ├── davos.mat │ │ │ ├── davosS.mat │ │ │ ├── devon.mat │ │ │ ├── devonS.mat │ │ │ ├── fes10.mat │ │ │ ├── fes100.mat │ │ │ ├── fes25.mat │ │ │ ├── fes50.mat │ │ │ ├── grayC.mat │ │ │ ├── grayCS.mat │ │ │ ├── hawaii.mat │ │ │ ├── imola.mat │ │ │ ├── imolaS.mat │ │ │ ├── lapaz.mat │ │ │ ├── lapazS.mat │ │ │ ├── lipari.mat │ │ │ ├── lisbon.mat │ │ │ ├── navia.mat │ │ │ ├── naviaS.mat │ │ │ ├── naviaW.mat │ │ │ ├── nuuk10.mat │ │ │ ├── nuuk25.mat │ │ │ ├── nuuk50.mat │ │ │ ├── nuukS.mat │ │ │ ├── oleron.mat │ │ │ ├── oslo10.mat │ │ │ ├── oslo25.mat │ │ │ ├── oslo50.mat │ │ │ ├── osloS.mat │ │ │ ├── roma10.mat │ │ │ ├── roma25.mat │ │ │ ├── roma50.mat │ │ │ ├── romaO.mat │ │ │ ├── tofino.mat │ │ │ ├── tokyo.mat │ │ │ ├── tokyoS.mat │ │ │ ├── turku.mat │ │ │ ├── turkuS.mat │ │ │ ├── vanimo.mat │ │ │ ├── vik10.mat │ │ │ ├── vik100.mat │ │ │ ├── vik25.mat │ │ │ ├── vik50.mat │ │ │ ├── vikO10.mat │ │ │ ├── vikO25.mat │ │ │ ├── vikO50.mat │ │ │ ├── acton10.mat │ │ │ ├── acton100.mat │ │ │ ├── acton25.mat │ │ │ ├── acton50.mat │ │ │ ├── bamO100.mat │ │ │ ├── bamako10.mat │ │ │ ├── bamako100.mat │ │ │ ├── bamako25.mat │ │ │ ├── bamako50.mat │ │ │ ├── bamakoS.mat │ │ │ ├── batlow10.mat │ │ │ ├── batlow100.mat │ │ │ ├── batlow25.mat │ │ │ ├── batlow50.mat │ │ │ ├── batlowK.mat │ │ │ ├── batlowK10.mat │ │ │ ├── batlowK25.mat │ │ │ ├── batlowK50.mat │ │ │ ├── batlowKS.mat │ │ │ ├── batlowS.mat │ │ │ ├── batlowW.mat │ │ │ ├── batlowW10.mat │ │ │ ├── batlowW25.mat │ │ │ ├── batlowW50.mat │ │ │ ├── batlowWS.mat │ │ │ ├── berlin10.mat │ │ │ ├── berlin100.mat │ │ │ ├── berlin25.mat │ │ │ ├── berlin50.mat │ │ │ ├── bilbao10.mat │ │ │ ├── bilbao100.mat │ │ │ ├── bilbao25.mat │ │ │ ├── bilbao50.mat │ │ │ ├── bilbaoS.mat │ │ │ ├── broc100.mat │ │ │ ├── brocO10.mat │ │ │ ├── brocO100.mat │ │ │ ├── brocO25.mat │ │ │ ├── brocO50.mat │ │ │ ├── buda100.mat │ │ │ ├── bukavu10.mat │ │ │ ├── bukavu100.mat │ │ │ ├── bukavu25.mat │ │ │ ├── bukavu50.mat │ │ │ ├── cork100.mat │ │ │ ├── corkO10.mat │ │ │ ├── corkO100.mat │ │ │ ├── corkO25.mat │ │ │ ├── corkO50.mat │ │ │ ├── davos10.mat │ │ │ ├── davos100.mat │ │ │ ├── davos25.mat │ │ │ ├── davos50.mat │ │ │ ├── devon10.mat │ │ │ ├── devon100.mat │ │ │ ├── devon25.mat │ │ │ ├── devon50.mat │ │ │ ├── glasgow.mat │ │ │ ├── glasgow10.mat │ │ │ ├── glasgow25.mat │ │ │ ├── glasgow50.mat │ │ │ ├── glasgowS.mat │ │ │ ├── grayC10.mat │ │ │ ├── grayC100.mat │ │ │ ├── grayC25.mat │ │ │ ├── grayC50.mat │ │ │ ├── hawaii10.mat │ │ │ ├── hawaii100.mat │ │ │ ├── hawaii25.mat │ │ │ ├── hawaii50.mat │ │ │ ├── hawaiiS.mat │ │ │ ├── imola10.mat │ │ │ ├── imola100.mat │ │ │ ├── imola25.mat │ │ │ ├── imola50.mat │ │ │ ├── lajolla.mat │ │ │ ├── lajolla10.mat │ │ │ ├── lajolla25.mat │ │ │ ├── lajolla50.mat │ │ │ ├── lajollaS.mat │ │ │ ├── lapaz10.mat │ │ │ ├── lapaz100.mat │ │ │ ├── lapaz25.mat │ │ │ ├── lapaz50.mat │ │ │ ├── lipari10.mat │ │ │ ├── lipari100.mat │ │ │ ├── lipari25.mat │ │ │ ├── lipari50.mat │ │ │ ├── lipariS.mat │ │ │ ├── lisbon10.mat │ │ │ ├── lisbon100.mat │ │ │ ├── lisbon25.mat │ │ │ ├── lisbon50.mat │ │ │ ├── managua.mat │ │ │ ├── managua10.mat │ │ │ ├── managua25.mat │ │ │ ├── managua50.mat │ │ │ ├── navia10.mat │ │ │ ├── navia100.mat │ │ │ ├── navia25.mat │ │ │ ├── navia50.mat │ │ │ ├── naviaW10.mat │ │ │ ├── naviaW100.mat │ │ │ ├── naviaW25.mat │ │ │ ├── naviaW50.mat │ │ │ ├── naviaWS.mat │ │ │ ├── nuuk100.mat │ │ │ ├── oleron10.mat │ │ │ ├── oleron100.mat │ │ │ ├── oleron25.mat │ │ │ ├── oleron50.mat │ │ │ ├── oslo100.mat │ │ │ ├── roma100.mat │ │ │ ├── romaO10.mat │ │ │ ├── romaO100.mat │ │ │ ├── romaO25.mat │ │ │ ├── romaO50.mat │ │ │ ├── tofino10.mat │ │ │ ├── tofino100.mat │ │ │ ├── tofino25.mat │ │ │ ├── tofino50.mat │ │ │ ├── tokyo10.mat │ │ │ ├── tokyo100.mat │ │ │ ├── tokyo25.mat │ │ │ ├── tokyo50.mat │ │ │ ├── turku10.mat │ │ │ ├── turku100.mat │ │ │ ├── turku25.mat │ │ │ ├── turku50.mat │ │ │ ├── vanimo10.mat │ │ │ ├── vanimo100.mat │ │ │ ├── vanimo25.mat │ │ │ ├── vanimo50.mat │ │ │ ├── vikO100.mat │ │ │ ├── batlowK100.mat │ │ │ ├── batlowW100.mat │ │ │ ├── glasgow100.mat │ │ │ ├── lajolla100.mat │ │ │ └── managua100.mat │ │ ├── +README_ScientificColourmaps.pdf │ │ ├── +ScientificColourMaps8-FabioCrameri.png │ │ ├── +ScientificColourMap-FlowChart-Crameri.png │ │ └── loadcmap.m │ ├── ukrainecolor.m │ ├── readme.md │ └── ttclr.m ├── @FLOWobj │ ├── private │ │ ├── tsort_mex.mexw64 │ │ ├── flowacc_mex.mexw64 │ │ ├── dependencemap_mex.mexw64 │ │ ├── drainagebasins_mex.mexw64 │ │ ├── steepestneighbor_mex.mexw64 │ │ ├── copy2GRIDobj.m │ │ ├── refmat2XY.m │ │ ├── border_nans.m │ │ ├── graydistparallel.m │ │ ├── getdistance.m │ │ ├── dependencemap_mex.c │ │ ├── flowacc_mex.c │ │ ├── Readme.txt │ │ └── drainagebasins_mex.c │ ├── coord2ind.m │ ├── ind2coord.m │ ├── ismulti.m │ ├── clip.m │ ├── find.m │ ├── FLOWobj2M.m │ ├── flowdivergence.m │ ├── removesmallfractions.m │ ├── updatetoposort.m │ └── flowconvergence.m ├── GIStools │ ├── readme.md │ ├── geotable2mapstruct.m │ └── geotiffextent.m ├── internal │ ├── haslibtopotoolbox.m │ ├── validationFcns │ │ ├── isGeographic.m │ │ ├── isProjected.m │ │ ├── mustBeGRIDobjOrEmpty.m │ │ ├── mustBeSingleStream.m │ │ ├── isTTObject.m │ │ ├── isEqualGeoreference.m │ │ ├── mustBeGRIDobjOrNal.m │ │ ├── mustBeGRIDobjOrNalOrEmpty.m │ │ └── mustBeGRIDobjOrNalOrScalar.m │ ├── estimateSizeFromM.m │ ├── getdistance.m │ ├── wf2cellsize.m │ ├── eqdistline.m │ ├── interpline.m │ ├── projectprofile.m │ ├── getPreSillPixels.m │ └── wf2XY.m ├── info.xml ├── tt2path.m ├── graphics │ ├── getextent.m │ ├── letter2rgb.m │ ├── adjustgeoaspectratio.m │ └── exaggerate.m ├── functionSignatures.json ├── @DIVIDEobj │ └── ind2coord.m ├── @SWATHobj │ ├── swath2latlon.m │ └── convert2latlon.m ├── tthelp.m └── compilemexfiles.m ├── images ├── mdlink1.png ├── mdlink2.png ├── mdlink3.png ├── tt3_logo.png ├── topotoolbox3.png └── makettlogo.m ├── md ├── topotoolbox3.png ├── usersguide_2_ksn.mlx ├── usersguide_3_mfd.mlx ├── usersguide_1_intro.mlx ├── usersguide_1_intro_media │ ├── image_0.png │ ├── figure_0.png │ ├── figure_1.png │ ├── figure_2.png │ ├── figure_3.png │ ├── figure_4.png │ ├── figure_5.png │ ├── figure_6.png │ ├── figure_7.png │ ├── figure_8.png │ └── figure_9.png ├── usersguide_2_ksn_media │ ├── figure_0.png │ ├── figure_1.png │ ├── figure_2.png │ ├── figure_3.png │ ├── figure_4.png │ ├── figure_5.png │ └── image_0.png └── usersguide_3_mfd_media │ ├── figure_0.png │ ├── figure_1.png │ ├── figure_2.png │ ├── figure_3.png │ ├── figure_4.png │ ├── figure_5.png │ └── image_0.png ├── .gitmodules ├── tests └── testHasLibTopoToolbox.m ├── packageToolbox.m ├── .gitattributes ├── .github └── latest_release.md ├── bindings ├── tt_identifyflats.c ├── tt_has_topotoolbox.c ├── tt_gradient8.c ├── tt_hillshade_fused.c ├── tt_fillsinks.c └── tt_hillshade.c └── .gitignore /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/all.m: -------------------------------------------------------------------------------- 1 | function tf = all(I) 2 | 3 | 4 | tf = all(I.Z(:)); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/any.m: -------------------------------------------------------------------------------- 1 | function tf = any(I) 2 | 3 | 4 | tf = any(I.Z(:)); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/uminus.m: -------------------------------------------------------------------------------- 1 | function DEM = uminus(DEM) 2 | DEM.Z = uminus(DEM.Z); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/uplus.m: -------------------------------------------------------------------------------- 1 | function DEM = uplus(DEM) 2 | DEM.Z = uplus(DEM.Z); -------------------------------------------------------------------------------- /images/mdlink1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/images/mdlink1.png -------------------------------------------------------------------------------- /images/mdlink2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/images/mdlink2.png -------------------------------------------------------------------------------- /images/mdlink3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/images/mdlink3.png -------------------------------------------------------------------------------- /images/tt3_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/images/tt3_logo.png -------------------------------------------------------------------------------- /md/topotoolbox3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/topotoolbox3.png -------------------------------------------------------------------------------- /toolbox/Contents.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/Contents.m -------------------------------------------------------------------------------- /toolbox/@GRIDobj/not.m: -------------------------------------------------------------------------------- 1 | function I = not(I) 2 | 3 | 4 | I.Z = ~I.Z; 5 | I.name = ['not(' I.name ')']; -------------------------------------------------------------------------------- /toolbox/@PPS/rhohat.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/rhohat.m -------------------------------------------------------------------------------- /images/topotoolbox3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/images/topotoolbox3.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn.mlx -------------------------------------------------------------------------------- /md/usersguide_3_mfd.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd.mlx -------------------------------------------------------------------------------- /toolbox/@PPS/density.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/density.m -------------------------------------------------------------------------------- /md/usersguide_1_intro.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro.mlx -------------------------------------------------------------------------------- /toolbox/@GRIDobj/aspect.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@GRIDobj/aspect.m -------------------------------------------------------------------------------- /toolbox/gettingStarted.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/gettingStarted.mlx -------------------------------------------------------------------------------- /toolbox/@GRIDobj/roughness.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@GRIDobj/roughness.m -------------------------------------------------------------------------------- /toolbox/@STREAMobj/fastscape.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@STREAMobj/fastscape.m -------------------------------------------------------------------------------- /toolbox/DEMdata/exampleDEM.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/DEMdata/exampleDEM.mat -------------------------------------------------------------------------------- /toolbox/IOtools/readopenalti.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/IOtools/readopenalti.m -------------------------------------------------------------------------------- /toolbox/@GRIDobj/toposhielding.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@GRIDobj/toposhielding.m -------------------------------------------------------------------------------- /toolbox/DEMdata/testcase_DEM.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/DEMdata/testcase_DEM.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_gs_0.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_gs_0.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_gs_1.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_gs_1.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_gs_2.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_gs_2.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_gs_3.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_gs_3.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_gs_4.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_gs_4.mlx -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tests/snapshots"] 2 | path = tests/snapshots 3 | url = https://github.com/TopoToolbox/snapshot_data 4 | -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/image_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/image_0.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_0.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_1.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_2.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_3.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_4.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/figure_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/figure_5.png -------------------------------------------------------------------------------- /md/usersguide_2_ksn_media/image_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_2_ksn_media/image_0.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_0.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_1.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_2.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_3.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_4.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/figure_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/figure_5.png -------------------------------------------------------------------------------- /md/usersguide_3_mfd_media/image_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_3_mfd_media/image_0.png -------------------------------------------------------------------------------- /toolbox/@GRIDobj/eq.m: -------------------------------------------------------------------------------- 1 | function OUT = eq(varargin) 2 | 3 | funname = 'eq'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/ge.m: -------------------------------------------------------------------------------- 1 | function OUT = ge(varargin) 2 | 3 | funname = 'ge'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/gt.m: -------------------------------------------------------------------------------- 1 | function OUT = gt(varargin) 2 | 3 | funname = 'gt'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/le.m: -------------------------------------------------------------------------------- 1 | function OUT = le(varargin) 2 | 3 | funname = 'le'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/lt.m: -------------------------------------------------------------------------------- 1 | function OUT = lt(varargin) 2 | 3 | funname = 'lt'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/ne.m: -------------------------------------------------------------------------------- 1 | function OUT = ne(varargin) 2 | 3 | funname = 'ne'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/or.m: -------------------------------------------------------------------------------- 1 | function OUT = or(varargin) 2 | 3 | funname = 'or'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@PPS/private/tt_icon_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/private/tt_icon_circle.png -------------------------------------------------------------------------------- /toolbox/colormaps/private/+LICENCE.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/+LICENCE.pdf -------------------------------------------------------------------------------- /toolbox/colormaps/private/+ThankYou.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/+ThankYou.pdf -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/images/alps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/images/alps.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/topotoolbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/topotoolbox.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/topotoolbox3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/topotoolbox3.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/ttfunctions.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/ttfunctions.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_0.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_0.mlx -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_0.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_1.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_2.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_3.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_4.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_5.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_6.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_7.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_8.png -------------------------------------------------------------------------------- /md/usersguide_1_intro_media/figure_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/md/usersguide_1_intro_media/figure_9.png -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/tsort_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@FLOWobj/private/tsort_mex.mexw64 -------------------------------------------------------------------------------- /toolbox/@GRIDobj/and.m: -------------------------------------------------------------------------------- 1 | function OUT = and(varargin) 2 | 3 | funname = 'and'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/xor.m: -------------------------------------------------------------------------------- 1 | function OUT = xor(varargin) 2 | 3 | funname = 'xor'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@PPS/private/tt_icon_circle_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/private/tt_icon_circle_2.png -------------------------------------------------------------------------------- /toolbox/@PPS/private/tt_icon_circle_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/private/tt_icon_circle_3.png -------------------------------------------------------------------------------- /toolbox/@PPS/private/tt_icon_circle_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@PPS/private/tt_icon_circle_4.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/tt_product_page.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/tt_product_page.mlx -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/flowacc_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@FLOWobj/private/flowacc_mex.mexw64 -------------------------------------------------------------------------------- /toolbox/@GRIDobj/minus.m: -------------------------------------------------------------------------------- 1 | function OUT = minus(varargin) 2 | 3 | funname = 'minus'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/plus.m: -------------------------------------------------------------------------------- 1 | function OUT = plus(varargin) 2 | 3 | funname = 'plus'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/power.m: -------------------------------------------------------------------------------- 1 | function OUT = power(varargin) 2 | 3 | funname = 'power'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/times.m: -------------------------------------------------------------------------------- 1 | function OUT = times(varargin) 2 | 3 | funname = 'times'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/DEMdata/srtm_bigtujunga30m_utm11.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/DEMdata/srtm_bigtujunga30m_utm11.tif -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bam.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bam.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamO.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamO.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/broc.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/broc.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/buda.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/buda.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/cork.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/cork.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/fes.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/fes.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuuk.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuuk.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oslo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oslo.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/roma.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/roma.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vik.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vik.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vikO.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vikO.mat -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/images/tt_classes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/images/tt_classes.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_1_intro.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_1_intro.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_2_ksn.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_2_ksn.mlx -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_3_mfd.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_3_mfd.mlx -------------------------------------------------------------------------------- /toolbox/@GRIDobj/ldivide.m: -------------------------------------------------------------------------------- 1 | function OUT = ldivide(varargin) 2 | 3 | funname = 'ldivide'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/rdivide.m: -------------------------------------------------------------------------------- 1 | function OUT = rdivide(varargin) 2 | 3 | funname = 'rdivide'; 4 | narginchk(2,2) 5 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/acton.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/acton.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/actonS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/actonS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bam10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bam10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bam100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bam100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bam25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bam25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bam50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bam50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamO10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamO10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamO25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamO25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamO50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamO50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamako.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamako.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlow.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlow.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/berlin.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/berlin.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbao.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbao.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/broc10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/broc10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/broc25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/broc25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/broc50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/broc50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/brocO.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/brocO.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/buda10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/buda10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/buda25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/buda25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/buda50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/buda50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/budaS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/budaS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bukavu.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bukavu.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/cork10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/cork10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/cork25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/cork25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/cork50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/cork50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/corkO.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/corkO.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davos.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davos.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davosS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davosS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devon.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devon.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devonS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devonS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/fes10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/fes10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/fes100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/fes100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/fes25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/fes25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/fes50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/fes50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayC.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayCS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayCS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaii.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaii.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imola.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imola.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imolaS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imolaS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapaz.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapaz.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapazS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapazS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipari.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipari.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lisbon.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lisbon.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/navia.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/navia.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaW.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaW.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuuk10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuuk10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuuk25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuuk25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuuk50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuuk50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuukS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuukS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oleron.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oleron.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oslo10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oslo10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oslo25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oslo25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oslo50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oslo50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/osloS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/osloS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/roma10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/roma10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/roma25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/roma25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/roma50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/roma50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/romaO.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/romaO.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tofino.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tofino.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyo.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyoS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyoS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turku.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turku.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turkuS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turkuS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vanimo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vanimo.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vik10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vik10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vik100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vik100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vik25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vik25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vik50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vik50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vikO10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vikO10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vikO25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vikO25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vikO50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vikO50.mat -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_4_modify.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_4_modify.mlx -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/dependencemap_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@FLOWobj/private/dependencemap_mex.mexw64 -------------------------------------------------------------------------------- /toolbox/DEMdata/srtm_bigtujunga30m_utm11.tif.ovr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/DEMdata/srtm_bigtujunga30m_utm11.tif.ovr -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/acton10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/acton10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/acton100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/acton100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/acton25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/acton25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/acton50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/acton50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamO100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamO100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamako10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamako10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamako100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamako100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamako25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamako25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamako50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamako50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bamakoS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bamakoS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlow10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlow10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlow100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlow100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlow25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlow25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlow50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlow50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowK.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowK.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowK10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowK10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowK25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowK25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowK50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowK50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowKS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowKS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowW.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowW.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowW10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowW10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowW25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowW25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowW50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowW50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowWS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowWS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/berlin10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/berlin10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/berlin100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/berlin100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/berlin25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/berlin25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/berlin50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/berlin50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbao10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbao10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbao100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbao100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbao25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbao25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbao50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbao50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bilbaoS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bilbaoS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/broc100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/broc100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/brocO10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/brocO10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/brocO100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/brocO100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/brocO25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/brocO25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/brocO50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/brocO50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/buda100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/buda100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bukavu10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bukavu10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bukavu100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bukavu100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bukavu25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bukavu25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/bukavu50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/bukavu50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/cork100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/cork100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/corkO10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/corkO10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/corkO100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/corkO100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/corkO25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/corkO25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/corkO50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/corkO50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davos10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davos10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davos100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davos100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davos25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davos25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/davos50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/davos50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devon10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devon10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devon100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devon100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devon25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devon25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/devon50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/devon50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgow.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgow.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgow10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgow10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgow25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgow25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgow50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgow50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgowS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgowS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayC10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayC10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayC100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayC100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayC25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayC25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/grayC50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/grayC50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaii10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaii10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaii100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaii100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaii25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaii25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaii50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaii50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/hawaiiS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/hawaiiS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imola10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imola10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imola100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imola100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imola25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imola25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/imola50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/imola50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajolla.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajolla.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajolla10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajolla10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajolla25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajolla25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajolla50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajolla50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajollaS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajollaS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapaz10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapaz10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapaz100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapaz100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapaz25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapaz25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lapaz50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lapaz50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipari10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipari10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipari100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipari100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipari25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipari25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipari50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipari50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lipariS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lipariS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lisbon10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lisbon10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lisbon100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lisbon100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lisbon25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lisbon25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lisbon50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lisbon50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/managua.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/managua.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/managua10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/managua10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/managua25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/managua25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/managua50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/managua50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/navia10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/navia10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/navia100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/navia100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/navia25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/navia25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/navia50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/navia50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaW10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaW10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaW100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaW100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaW25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaW25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaW50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaW50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/naviaWS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/naviaWS.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/nuuk100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/nuuk100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oleron10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oleron10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oleron100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oleron100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oleron25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oleron25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oleron50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oleron50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/oslo100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/oslo100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/roma100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/roma100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/romaO10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/romaO10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/romaO100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/romaO100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/romaO25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/romaO25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/romaO50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/romaO50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tofino10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tofino10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tofino100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tofino100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tofino25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tofino25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tofino50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tofino50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyo10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyo10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyo100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyo100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyo25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyo25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/tokyo50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/tokyo50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turku10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turku10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turku100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turku100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turku25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turku25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/turku50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/turku50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vanimo10.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vanimo10.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vanimo100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vanimo100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vanimo25.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vanimo25.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vanimo50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vanimo50.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/vikO100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/vikO100.mat -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/images/tt_classes_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/images/tt_classes_code.png -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/usersguide_5_smoothing.mlx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/usersguide_5_smoothing.mlx -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/drainagebasins_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@FLOWobj/private/drainagebasins_mex.mexw64 -------------------------------------------------------------------------------- /toolbox/DEMdata/srtm_bigtujunga30m_utm11.tfw: -------------------------------------------------------------------------------- 1 | 30.0000000000 2 | 0.0000000000 3 | 0.0000000000 4 | -30.0000000000 5 | 376328.6554542635 6 | 3807902.8276283755 7 | -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowK100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowK100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/batlowW100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/batlowW100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/glasgow100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/glasgow100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/lajolla100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/lajolla100.mat -------------------------------------------------------------------------------- /toolbox/colormaps/private/colormaps/managua100.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/colormaps/managua100.mat -------------------------------------------------------------------------------- /toolbox/docs/mlxfiles/images/tt_classes_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/docs/mlxfiles/images/tt_classes_circle.png -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/steepestneighbor_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/@FLOWobj/private/steepestneighbor_mex.mexw64 -------------------------------------------------------------------------------- /toolbox/@GRIDobj/log.m: -------------------------------------------------------------------------------- 1 | function DEM = log(DEM) 2 | 3 | if isinteger(DEM.Z) || islogical(DEM.Z) 4 | DEM.Z = log(single(DEM.Z)); 5 | else 6 | DEM.Z = log(DEM.Z); 7 | end -------------------------------------------------------------------------------- /toolbox/colormaps/private/+README_ScientificColourmaps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/+README_ScientificColourmaps.pdf -------------------------------------------------------------------------------- /toolbox/@GRIDobj/log2.m: -------------------------------------------------------------------------------- 1 | function DEM = log2(DEM) 2 | 3 | if isinteger(DEM.Z) || islogical(DEM.Z) 4 | DEM.Z = log2(single(DEM.Z)); 5 | else 6 | DEM.Z = log2(DEM.Z); 7 | end -------------------------------------------------------------------------------- /toolbox/@GRIDobj/sqrt.m: -------------------------------------------------------------------------------- 1 | function DEM = sqrt(DEM) 2 | 3 | if isinteger(DEM.Z) || islogical(DEM.Z) 4 | DEM.Z = sqrt(single(DEM.Z)); 5 | else 6 | DEM.Z = sqrt(DEM.Z); 7 | end -------------------------------------------------------------------------------- /toolbox/@GRIDobj/log10.m: -------------------------------------------------------------------------------- 1 | function DEM = log10(DEM) 2 | 3 | 4 | if isinteger(DEM.Z) || islogical(DEM.Z) 5 | DEM.Z = log10(single(DEM.Z)); 6 | else 7 | DEM.Z = log10(DEM.Z); 8 | end -------------------------------------------------------------------------------- /toolbox/colormaps/private/+ScientificColourMaps8-FabioCrameri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/+ScientificColourMaps8-FabioCrameri.png -------------------------------------------------------------------------------- /toolbox/colormaps/private/+ScientificColourMap-FlowChart-Crameri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TopoToolbox/topotoolbox3/HEAD/toolbox/colormaps/private/+ScientificColourMap-FlowChart-Crameri.png -------------------------------------------------------------------------------- /toolbox/GIStools/readme.md: -------------------------------------------------------------------------------- 1 | # TopoToolbox - a set of Matlab functions for topographic analysis 2 | 3 | ## GIS tools 4 | 5 | This folder contains a number of MATLAB functions that provide some GIS utilities. -------------------------------------------------------------------------------- /toolbox/IOtools/readme.md: -------------------------------------------------------------------------------- 1 | # TopoToolbox - a set of Matlab functions for topographic analysis 2 | 3 | ## IO tools 4 | 5 | This folder contains a number of MATLAB functions that facilitate input/output related tasks. -------------------------------------------------------------------------------- /toolbox/@PPS/private/randpoi.m: -------------------------------------------------------------------------------- 1 | function varargout = randpoi(S,lambda) 2 | 3 | 4 | 5 | % How many expected 6 | N = poissrnd(lambda * info(S,'totallength')); 7 | varargout{:} = randlocs(S,N); 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /toolbox/colormaps/private/loadcmap.m: -------------------------------------------------------------------------------- 1 | function cmap = loadcmap(cmaptype) 2 | 3 | %LOADCMAP load colormap 4 | 5 | p = fileparts(mfilename('fullpath')); 6 | p = char(p); 7 | cmap = load([p filesep 'colormaps' filesep cmaptype '.mat']); 8 | cmap = cmap.(cmaptype); -------------------------------------------------------------------------------- /tests/testHasLibTopoToolbox.m: -------------------------------------------------------------------------------- 1 | classdef testHasLibTopoToolbox < matlab.unittest.TestCase 2 | methods(Test) 3 | function check_haslibtopotoolbox(testCase) 4 | verifyReturnsTrue(testCase,@haslibtopotoolbox) 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /packageToolbox.m: -------------------------------------------------------------------------------- 1 | function packageToolbox(~) 2 | opts = toolboxOptions; 3 | output_path = fileparts(opts.OutputFile); 4 | [status,msg,msg_id] = mkdir(output_path); 5 | if (status == 0) 6 | error(msg_id,msg); 7 | end 8 | matlab.addons.toolbox.packageToolbox(opts); 9 | end -------------------------------------------------------------------------------- /toolbox/internal/haslibtopotoolbox.m: -------------------------------------------------------------------------------- 1 | function out = haslibtopotoolbox 2 | %HASLIBTOPOTOOLBOX Test if the libtopotoolbox MEX bindings are available 3 | mexx = exist(['mex/tt_has_topotoolbox.' mexext],'file'); 4 | if mexx == 3 5 | out = tt_has_topotoolbox; 6 | else 7 | out = false; 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/mpower.m: -------------------------------------------------------------------------------- 1 | function OUT = mpower(varargin) 2 | 3 | % overloaded power for GRIDobj 4 | % 5 | % Note that there is no matrix power defined for GRIDobj. Thus 6 | % mpower overloads element-by-element powers (power). 7 | 8 | funname = 'power'; 9 | narginchk(2,2) 10 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/mtimes.m: -------------------------------------------------------------------------------- 1 | function OUT = mtimes(varargin) 2 | 3 | % overloaded multiplication for GRIDobj 4 | % 5 | % Note that there is no matrix multiplication defined for GRIDobj. Thus 6 | % mtimes overloads element wise multiplication (times). 7 | 8 | funname = 'times'; 9 | narginchk(2,2) 10 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@FLOWobj/coord2ind.m: -------------------------------------------------------------------------------- 1 | function IX = coord2ind(FD,x,y) 2 | %COORD2IND Convert linear indices to world coordinates 3 | % 4 | % Syntax 5 | % 6 | % IX = coord2ind(FD,x,y) 7 | % 8 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 9 | % Date: 31. August, 2024 10 | 11 | 12 | [X,Y] = wf2XY(FD.wf,FD.size); 13 | IX = coord2ind(X,Y,x,y); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/mrdivide.m: -------------------------------------------------------------------------------- 1 | function OUT = mrdivide(varargin) 2 | 3 | % overloaded right division for GRIDobj 4 | % 5 | % Note that there is no matrix right division defined for GRIDobj. Thus 6 | % mrdivide overloads element wise right division (rdivide). 7 | 8 | funname = 'rdivide'; 9 | narginchk(2,2) 10 | OUT = builtincaller(funname,varargin{:}); -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/copy2GRIDobj.m: -------------------------------------------------------------------------------- 1 | function G = copy2GRIDobj(FD) 2 | 3 | % copy common properties from FLOWobj to GRIDobj 4 | 5 | % empty GRIDobj 6 | G = GRIDobj([]); 7 | % find common properties of F and G and from F to G 8 | pg = properties(G); 9 | pf = properties(FD); 10 | p = intersect(pg,pf); 11 | for r = 1:numel(p) 12 | G.(p{r}) = FD.(p{r}); 13 | end -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/isGeographic.m: -------------------------------------------------------------------------------- 1 | function tf = isGeographic(A) 2 | %ISGEOGRAPHIC Determines whether a TT object has a geographic coordinate system 3 | % 4 | % Syntax 5 | % 6 | % tf = isgeographic(A) 7 | % 8 | tf = isprop(A.georef,"GeographicCRS"); 9 | if isempty(tf) 10 | tf = false; 11 | return 12 | end 13 | tf = tf && ~isempty(A.georef.GeographicCRS); 14 | end -------------------------------------------------------------------------------- /toolbox/info.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | R2023b 6 | TopoToolbox 7 | toolbox 8 | 9 | docs/html 10 | 11 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/nrows.m: -------------------------------------------------------------------------------- 1 | function nr = nrows(DEM) 2 | %NROWS Return the number of rows in a DEM 3 | % 4 | % Syntax 5 | % 6 | % nr = nrows(DEM) 7 | % 8 | % Description 9 | % 10 | % The function returns the number of rows in a GRIDobj DEM. 11 | % 12 | % See also: GRIDobj/ncols 13 | % 14 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 15 | % Date: 2. November, 2024 16 | 17 | nr = DEM.size(1); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/ncols.m: -------------------------------------------------------------------------------- 1 | function nc = ncols(DEM) 2 | %NCOLS Return the number of columns in a DEM 3 | % 4 | % Syntax 5 | % 6 | % nr = ncols(DEM) 7 | % 8 | % Description 9 | % 10 | % The function returns the number of rows in a GRIDobj DEM. 11 | % 12 | % See also: GRIDobj/nrows 13 | % 14 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 15 | % Date: 2. November, 2024 16 | 17 | nc = DEM.size(2); -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/isProjected.m: -------------------------------------------------------------------------------- 1 | function tf = isProjected(A) 2 | %ISPROJECTED Determines whether GRIDobj has a projected coordinate system 3 | % 4 | % Syntax 5 | % 6 | % tf = isProjected(A) 7 | % 8 | 9 | if isa(A,'PPS') 10 | A = A.S; 11 | end 12 | 13 | tf = isprop(A.georef,"ProjectedCRS"); 14 | if isempty(tf) 15 | tf = false; 16 | return 17 | end 18 | tf = tf && ~isempty(A.georef.ProjectedCRS); 19 | end -------------------------------------------------------------------------------- /toolbox/internal/estimateSizeFromM.m: -------------------------------------------------------------------------------- 1 | function siz = estimateSizeFromM(M) 2 | %ESTIMATESIZEFROMM Estimate DEM size from sparse transfer matrix 3 | % 4 | % Syntax 5 | % 6 | % siz = estimateSizeFromM(M) 7 | % 8 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 9 | % Date: 06. September, 2024 10 | 11 | [ic,icd] = find(M); 12 | offsets = unique(ic-icd); 13 | siz = max(abs(offsets)-1); 14 | siz(2) = size(M,1)./siz(1); 15 | 16 | -------------------------------------------------------------------------------- /toolbox/internal/getdistance.m: -------------------------------------------------------------------------------- 1 | function [cumdxy] = getdistance(x,y) 2 | 3 | % cumulative distance along path defined by vertice coordinates 4 | % 5 | % Syntax 6 | % 7 | % D = getdistance(x,y) 8 | % 9 | % 10 | % Author: Dirk Scherler (scherler[at]@gfz-potsdam.de) 11 | % Date: June 2013 12 | 13 | 14 | dx = diff(x(:)); 15 | dy = diff(y(:)); 16 | dxy = hypot(dx, dy); % square root of sum of squares 17 | cumdxy = [0; cumsum(dxy,1)]; 18 | -------------------------------------------------------------------------------- /toolbox/colormaps/ukrainecolor.m: -------------------------------------------------------------------------------- 1 | function clr = ukrainecolor(n) 2 | %UKRAINECOLOR Colormap with colors of the Ukrainian flag 3 | % 4 | % Syntax 5 | % 6 | % y = ukrainecolor(n) 7 | % 8 | % 9 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 10 | % Date: 28. February, 2022 11 | 12 | if nargin == 0 13 | n = 255; 14 | end 15 | 16 | flag = [255 213 0; 17 | 0 91 187]; 18 | 19 | clr = interp1([0 255]',double(flag)/255,linspace(0,255,n)); 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/private/georef2imref2d.m: -------------------------------------------------------------------------------- 1 | function Rim = georef2imref2d(varargin) 2 | 3 | narginchk(1,2) 4 | 5 | if nargin == 1 6 | % Input is a georeferencing object 7 | R = varargin{1}; 8 | iscellref = strcmp(R.RasterInterpretation,'cell'); 9 | 10 | 11 | else 12 | % Input is a worldfilematrix and the size of the grid 13 | wf = varargin{1}; 14 | siz = varargin{2}(1:2); 15 | 16 | % If worldfilematrix, then grid will have cell reference 17 | iscellref = true; 18 | 19 | end 20 | -------------------------------------------------------------------------------- /toolbox/@PPS/tlength.m: -------------------------------------------------------------------------------- 1 | function l = tlength(P) 2 | 3 | %TLENGTH Total length of the stream network 4 | % 5 | % Syntax 6 | % 7 | % l = tlength(P) 8 | % 9 | % Description 10 | % 11 | % tlength returns the total length of the stream network measured in 12 | % units of distance. 13 | % 14 | % 15 | % See also: PPS, PPS/npoints 16 | % 17 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 18 | % Date: 5. July, 2024 19 | 20 | arguments 21 | P PPS 22 | end 23 | 24 | l = info(P.S,'totallength'); -------------------------------------------------------------------------------- /toolbox/DEMdata/readme.md: -------------------------------------------------------------------------------- 1 | # TopoToolbox - a set of Matlab functions for topographic analysis 2 | 3 | ## DEM data 4 | 5 | This folder contains a number of example DEMs that we use throughout in examples and user guides. 6 | - srtm_bigtujunga30m_utm11.tif is a 30 m SRTM of the Big Tujunga catchment in California. 7 | - exampleDEM.txt and exampleDEM.mat contains a DEM of some area in the Orkhon Valley 8 | - baranja_hill.mat is located in Croatia and was obtained from the [geomorphometry website]( http://geomorphometry.org/content/baranja-hill) -------------------------------------------------------------------------------- /toolbox/@STREAMobj/isempty.m: -------------------------------------------------------------------------------- 1 | function tf = isempty(S) 2 | 3 | %ISEMPTY Determine whether a STREAMobj is empty 4 | % 5 | % Syntax 6 | % 7 | % tf = isempty(S) 8 | % 9 | % Description 10 | % 11 | % isempty determines if S has at least two nodes and one edge. 12 | % 13 | % Input arguments 14 | % 15 | % S STREAMobj 16 | % 17 | % Output arguments 18 | % 19 | % tf true or false 20 | % 21 | % See also: STREAMobj 22 | % 23 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 24 | % Date: 2. July, 2024 25 | 26 | tf = isempty(S.x); -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.fig binary 4 | *.mat binary 5 | *.mdl binary diff merge=mlAutoMerge 6 | *.mdlp binary 7 | *.mex* binary 8 | *.mlapp binary 9 | *.mldatx binary 10 | *.mlproj binary 11 | *.mlx binary 12 | *.p binary 13 | *.sfx binary 14 | *.sldd binary 15 | *.slreqx binary merge=mlAutoMerge 16 | *.slmx binary merge=mlAutoMerge 17 | *.sltx binary 18 | *.slxc binary 19 | *.slx binary merge=mlAutoMerge 20 | *.slxp binary 21 | 22 | ## Other common binary file types 23 | *.docx binary 24 | *.exe binary 25 | *.jpg binary 26 | *.pdf binary 27 | *.png binary 28 | *.xlsx binary 29 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/refmat2XY.m: -------------------------------------------------------------------------------- 1 | function [x,y] = refmat2XY(R,siz) 2 | 3 | % Convert referencing matrix (refmat) to coordinate vectors 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = refmat2XY(R,siz) 8 | % 9 | % Input arguments 10 | % 11 | % R referencing matrix 12 | % siz size of the grid 13 | % 14 | % Output arguments 15 | % 16 | % x x-coordinates 17 | % y y-coordinates 18 | % 19 | % 20 | 21 | nrrows = siz(1); 22 | nrcols = siz(2); 23 | 24 | x = [ones(nrcols,1) (1:nrcols)' ones(nrcols,1)]*R; 25 | x = x(:,1)'; 26 | 27 | y = [(1:nrrows)' ones(nrrows,2)]*R; 28 | y = y(:,2)'; 29 | 30 | end 31 | 32 | -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/mustBeGRIDobjOrEmpty.m: -------------------------------------------------------------------------------- 1 | function mustBeGRIDobjOrEmpty(A) 2 | 3 | %mustBeGRIDobjOrEmpty Validate that value is GRIDobj or an empty array 4 | % 5 | % Syntax 6 | % 7 | % mustBeGRIDobjOrNal(x) 8 | % 9 | % Description 10 | % 11 | % The function validates that a value x is a GRIDobj or an empty array 12 | % 13 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 14 | % Date: 18. November, 2024 15 | 16 | if ~(isempty(A) || isa(A,'GRIDobj')) 17 | eid = 'Input:mustBeGRIDobjOrEmpty'; 18 | msg = 'Input must be GRIDobj or empty.'; 19 | error(eid,msg) 20 | end 21 | end -------------------------------------------------------------------------------- /toolbox/tt2path.m: -------------------------------------------------------------------------------- 1 | function tt2path 2 | %TT2PATH Add TopoToolbox to MATLAB search path 3 | % 4 | % Syntax 5 | % 6 | % tt2path 7 | % 8 | % Description 9 | % 10 | % This function makes it easy to add TopoToolbox to MATLAB's search 11 | % path. 12 | % 13 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 14 | % Date: 12. October, 2024 15 | 16 | % where is tt2path located? 17 | p = mfilename('fullpath'); 18 | f = fileparts(p); 19 | oldfolder = cd(f); 20 | 21 | cd("..") 22 | addpath(genpath('toolbox')) 23 | 24 | % rmpath(fullfile('toolbox','help')) 25 | % rmpath(fullfile('toolbox','docs','html')) 26 | 27 | cd(oldfolder) 28 | -------------------------------------------------------------------------------- /toolbox/@PPS/npoints.m: -------------------------------------------------------------------------------- 1 | function np = npoints(P) 2 | 3 | %NPOINTS Number of points in the point pattern 4 | % 5 | % Syntax 6 | % 7 | % np = npoints(P) 8 | % 9 | % Description 10 | % 11 | % npoints returns the number of points in the the point pattern. 12 | % 13 | % Input arguments 14 | % 15 | % P point pattern on stream network (class PPS) 16 | % 17 | % Output arguments 18 | % 19 | % np number of points (integer scalar) 20 | % 21 | % 22 | % See also: PPS, PPS/tlength 23 | % 24 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 25 | % Date: 12. November, 2024 26 | 27 | arguments 28 | P PPS 29 | end 30 | 31 | np = numel(P.PP); -------------------------------------------------------------------------------- /.github/latest_release.md: -------------------------------------------------------------------------------- 1 | This release is automatically generated from the most recent commit to 2 | the main branch of the TopoToolbox/topotoolbox3 repository. It has 3 | been tested but should be considered unstable. 4 | 5 | To install TopoToolbox, download the mltbx file corresponding to your 6 | operating system: 7 | 8 | - TopoToolbox_win64.mltbx - 64-bit Windows platform 9 | - TopoToolbox_glnxa64.mltbx - 64-bit Linux platform 10 | - TopoToolbox_maci64.mltbx - 64-bit macOS platform 11 | - TopoToolbox_maca64.mltbx - 64-bit macOS platform, Apple silicon 12 | - TopoToolbox_nolibtt.mltbx - Platform-agnostic without libtopotoolbox 13 | 14 | and open it in MATLAB. 15 | -------------------------------------------------------------------------------- /toolbox/colormaps/readme.md: -------------------------------------------------------------------------------- 1 | # TopoToolbox - a set of Matlab functions for topographic analysis 2 | 3 | ## Colormaps 4 | 5 | This folder contains a number of colormaps for DEM visualization. 6 | ttcmap is a function that is particular useful if you want to combine 7 | topography and bathymetry which are usually displayed using different colormaps. 8 | 9 | The function ttscm is a wrapper function for the library of colormaps developed by 10 | Fabio Crameri (see [here](http://www.fabiocrameri.ch/colourmaps.php) and image below). 11 | 12 | -------------------------------------------------------------------------------- /toolbox/internal/wf2cellsize.m: -------------------------------------------------------------------------------- 1 | function [cs,ca] = wf2cellsize(wf) 2 | 3 | %WF2CELLSIZE Retrieve cellsize from world-file matrix 4 | % 5 | % Syntax 6 | % 7 | % [cs,ca] = wf2cellsize(wf) 8 | % 9 | % Description 10 | % 11 | % The function returns the cellsize based on a world-file matrix. 12 | % 13 | % 14 | 15 | % if there is no rotation, wf(2,1) and wf(1,2) will be zero 16 | 17 | if wf(2) == 0 18 | cs = abs(wf(1,1)); 19 | ca = cs^2; 20 | else 21 | csx = hypot(wf(1,1),wf(2,1)); 22 | csy = hypot(wf(1,2),wf(2,2)); 23 | if csx ~= csy 24 | error("The cellsize in x and y direction must be equal.") 25 | end 26 | cs = csx; 27 | 28 | ca = csx*csy; 29 | end -------------------------------------------------------------------------------- /toolbox/@GRIDobj/isnan.m: -------------------------------------------------------------------------------- 1 | function I = isnan(DEM) 2 | 3 | %ISNAN Returns array elements that are NaNs as logical grid 4 | % 5 | % Syntax 6 | % 7 | % I = isnan(DEM) 8 | % 9 | % Description 10 | % 11 | % overloaded isnan for GRIDobj. 12 | % 13 | % Input arguments 14 | % 15 | % DEM GRIDobj 16 | % 17 | % Output arguments 18 | % 19 | % I GRIDobj with underlying type logical where true elements 20 | % indicate NaNs in the DEM 21 | % 22 | % See also: isnan 23 | % 24 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 25 | % Date: 18. October, 2024 26 | 27 | arguments 28 | DEM GRIDobj 29 | end 30 | 31 | I = DEM; 32 | I.Z = isnan(DEM.Z); 33 | I.name = [DEM.name ' (isnan)']; -------------------------------------------------------------------------------- /bindings/tt_identifyflats.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | #include "topotoolbox.h" 3 | 4 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { 5 | 6 | if (nrhs != 1) { 7 | mexErrMsgIdAndTxt("tt3:tt_identifyflats:nrhs", "One input required"); 8 | } 9 | if (nlhs != 1) { 10 | mexErrMsgIdAndTxt("tt3:tt_identifyflats:nrls", "One output required"); 11 | } 12 | 13 | const mxArray *demArray = prhs[0]; 14 | float *dem = mxGetSingles(demArray); 15 | ptrdiff_t dims[2]; 16 | dims[0] = mxGetM(demArray); 17 | dims[1] = mxGetN(demArray); 18 | 19 | plhs[0] = mxCreateNumericMatrix(dims[0], dims[1], mxINT32_CLASS, mxREAL); 20 | int32_t *out = mxGetInt32s(plhs[0]); 21 | 22 | identifyflats(out, dem, dims); 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Autosave files 2 | *.asv 3 | *.m~ 4 | *.autosave 5 | *.slx.r* 6 | *.mdl.r* 7 | 8 | # Derived content-obscured files 9 | # *.p 10 | 11 | # Compiled MEX files 12 | # *.mex* 13 | 14 | # Packaged app and toolbox files 15 | # *.mlappinstall 16 | # *.mltbx 17 | 18 | # Deployable archives 19 | *.ctf 20 | 21 | # Generated helpsearch folders 22 | helpsearch*/ 23 | 24 | # Code generation folders 25 | slprj/ 26 | sccprj/ 27 | codegen/ 28 | 29 | # Cache files 30 | *.slxc 31 | 32 | # Cloud based storage dotfile 33 | .MATLABDriveTag 34 | 35 | # API keys 36 | *.apikey 37 | 38 | # CMake build directory 39 | build/ 40 | 41 | # Internal folder for compiled MEX files 42 | toolbox/internal/mex/ 43 | 44 | # Compiled documentation 45 | toolbox/docs/html/ -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/mustBeSingleStream.m: -------------------------------------------------------------------------------- 1 | function mustBeSingleStream(S) 2 | 3 | %mustBeSingleStream Validate that STREAMobj contains a single river only 4 | % 5 | % Syntax 6 | % 7 | % mustBeSingleStream(S) 8 | % 9 | % Description 10 | % 11 | % The function validates that a STREAMobj contains only a single 12 | % stream. E.g. trunk(klargestconncomps(S)) will be a single stream. 13 | % 14 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 15 | % Date: 7. March, 2025 16 | 17 | if isa(S,'PPS') 18 | S = S.S; 19 | end 20 | 21 | TF = isa(S,'STREAMobj') && info(S,'nrchan')==1; 22 | if ~TF 23 | error('TopoToolbox:incorrectinput',... 24 | 'STREAMobj must be a single stream, i.e. there is only one channelhead.'); 25 | end 26 | -------------------------------------------------------------------------------- /toolbox/@PPS/getmarks.m: -------------------------------------------------------------------------------- 1 | function m = getmarks(P,cova) 2 | %GETMARKS Extract point marks 3 | % 4 | % Syntax 5 | % 6 | % m = getmarks(P,data) 7 | % 8 | % Description 9 | % 10 | % getmarks extracts values for each point in the point pattern P from 11 | % GRIDobjs or node-attribute lists cova. 12 | % 13 | % Input arguments 14 | % 15 | % P instance of PPS 16 | % data cell array 17 | % 18 | % Output arguments 19 | % 20 | % m marks (vector or matrix with a row for each point in P) 21 | % 22 | % 23 | % See also: PPS 24 | % 25 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 26 | % Date: 11. February, 2019 27 | 28 | 29 | c = getcovariate(P,cova); 30 | 31 | if istable(c) 32 | 33 | else 34 | m = c(P.PP,:); 35 | end -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/border_nans.m: -------------------------------------------------------------------------------- 1 | function mask = border_nans(E) 2 | %border_nans Find NaNs connected to the DEM border 3 | % 4 | % mask = border_nans(E) finds all connected NaN components that touch the 5 | % border of E, the digital elevation model (DEM). mask is a logical 6 | % matrix the same size as E. True values in mask correspond to border 7 | % NaN locations. 8 | % 9 | % Example 10 | % ------- 11 | % E = magic(5); 12 | % E(2:5,1:2) = NaN; 13 | % E(3:4,4) = NaN 14 | % border_nans(E) 15 | % 16 | % See also pixel_flow, upslope_area. 17 | 18 | % Steven L. Eddins 19 | % $Revision: 1.1 $ $Date: 2007/10/02 15:49:17 $ 20 | % Copyright 2007 The MathWorks, Inc. 21 | 22 | nan_mask = isnan(E); 23 | mask = nan_mask & ~imclearborder(nan_mask); 24 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/private/makeColumnsStartFrom.m: -------------------------------------------------------------------------------- 1 | function DEM = makeColumnsStartFrom(DEM,direction) 2 | %Forces column direction in GRIDobj to follow specified direction 3 | % 4 | % Syntax 5 | % 6 | % DEM = makeColumnsStartFrom(DEM,'north') 7 | % 8 | % See also: GRIDobj, GRIDobj/reproject2utm, egm96heights, imtransform 9 | % 10 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 11 | % Date: 31. March, 2025 12 | 13 | arguments 14 | DEM GRIDobj 15 | direction {mustBeMember(direction,{'south','north'})} = 'north' 16 | end 17 | 18 | actualDirection = DEM.georef.ColumnsStartFrom; 19 | if isequal(actualDirection,direction) 20 | return 21 | end 22 | 23 | R = DEM.georef; 24 | R.ColumnsStartFrom = direction; 25 | Z = flipud(DEM.Z); 26 | DEM = GRIDobj(Z,R); 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/isnal.m: -------------------------------------------------------------------------------- 1 | function tf = isnal(S,nal) 2 | 3 | %ISNAL Test whether a vector is a node attribute list of a STREAMobj 4 | % 5 | % Syntax 6 | % 7 | % tf = isnal(S,nal) 8 | % 9 | % Description 10 | % 11 | % Node attribute lists are attribute values for each node in the stream 12 | % network STREAMobj. This function tests whether a vector nal is a 13 | % valid node attribute list of the network S. 14 | % 15 | % Input arguments 16 | % 17 | % S STREAMobj 18 | % nal node attribute list 19 | % 20 | % Output arguments 21 | % 22 | % tf true or false 23 | % 24 | % 25 | % See also: STREAMobj, STREAMobj/getnal 26 | % 27 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 28 | % Date: 2. July, 2024 29 | 30 | tf = isequal(numel(S.IXgrid),numel(nal)); 31 | tf = tf && iscolumn(nal); -------------------------------------------------------------------------------- /toolbox/@STREAMobj/istrunk.m: -------------------------------------------------------------------------------- 1 | function tf = istrunk(S) 2 | 3 | %ISTRUNK Determines whether STREAMobj consists of trunk streams 4 | % 5 | % Syntax 6 | % 7 | % tf = istrunk(S) 8 | % 9 | % Description 10 | % 11 | % istrunk determines whether a STREAMobj S consists of one or several 12 | % trunk streams. This is the case if there are as many outlet points as 13 | % there are channelheads. 14 | % 15 | % Input arguments 16 | % 17 | % S STREAMobj 18 | % 19 | % Output arguments 20 | % 21 | % tf true or false 22 | % 23 | % See also: STREAMobj/streampoi 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 7. July, 2024 27 | 28 | arguments 29 | S STREAMobj 30 | end 31 | 32 | tf = numel(streampoi(S,'channelhead','ix')) == ... 33 | numel(streampoi(S,'outlets','ix')); -------------------------------------------------------------------------------- /bindings/tt_has_topotoolbox.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tt_has_topotoolbox.c 4 | 5 | Returns true 6 | 7 | This is used to test the compilation and linking procedure for 8 | libtopotoolbox 9 | */ 10 | 11 | #include "mex.h" 12 | #include "topotoolbox.h" 13 | 14 | 15 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 16 | { 17 | // INPUTS: - 18 | // OUTPUTS: flag 19 | if (nrhs != 0) { 20 | mexErrMsgIdAndTxt("tt3:tt_has_topotoolbox:nrhs","Zero inputs required"); 21 | } 22 | if (nlhs != 1) { 23 | mexErrMsgIdAndTxt("tt3:tt_has_topotoolbox:nlhs","One output required"); 24 | } 25 | 26 | const mwSize dims[1] = {1}; 27 | plhs[0] = mxCreateLogicalArray(1,dims); 28 | mxLogical *flag = mxGetLogicals(plhs[0]); 29 | mxAssert(flag,"Flag pointer is null"); 30 | 31 | *flag = has_topotoolbox(); 32 | } 33 | -------------------------------------------------------------------------------- /toolbox/internal/eqdistline.m: -------------------------------------------------------------------------------- 1 | function [newx,newy] = eqdistline(x,y,step) 2 | 3 | % Function for getting a new line with equi-distant (step) vertices from 4 | % irregular line. Assumes that x,y coordinates are in same units as step. 5 | % Code as explained in: 6 | % http://blogs.mathworks.com/steve/2012/07/06/walking-along-a-path/ 7 | 8 | dx = diff(x); 9 | dy = diff(y); 10 | dxy = hypot(dx, dy); % square root of sum of squares 11 | cumdxy = [0; cumsum(dxy,1)]; 12 | 13 | % get rid of duplicates 14 | repeatedPtsMask = diff(cumdxy)==0; 15 | if any(repeatedPtsMask) 16 | x(repeatedPtsMask) = []; 17 | y(repeatedPtsMask) = []; 18 | cumdxy(repeatedPtsMask) = []; 19 | end 20 | 21 | npoints = 1+floor(cumdxy(end)/step); 22 | dist_steps = linspace(0, cumdxy(end), npoints); 23 | 24 | newx = interp1(cumdxy, x, dist_steps); 25 | newy = interp1(cumdxy, y, dist_steps); -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/graydistparallel.m: -------------------------------------------------------------------------------- 1 | function I = graydistparallel(I,ix) 2 | 3 | SEEDS = false(size(I)); 4 | SEEDS(ix) = true; 5 | regions = regionprops(~isinf(I),{'SubarrayIdx','Image'}); 6 | 7 | for r = 1:numel(regions) 8 | temp = SEEDS(regions(r).SubarrayIdx{1},regions(r).SubarrayIdx{2}); 9 | regions(r).SEED = find(temp.*regions(r).Image); 10 | regions(r).Image = I(regions(r).SubarrayIdx{1},regions(r).SubarrayIdx{2}); 11 | end 12 | 13 | parfor r = 1:numel(regions) 14 | regions(r).Image = graydist(regions(r).Image,regions(r).SEED,'q'); 15 | end 16 | 17 | % Map values back to D 18 | for r = 1:numel(regions) 19 | temp = I(regions(r).SubarrayIdx{1},regions(r).SubarrayIdx{2}); 20 | temp(~isinf(regions(r).Image)) = regions(r).Image(~isinf(regions(r).Image)); 21 | I(regions(r).SubarrayIdx{1},regions(r).SubarrayIdx{2}) = temp; 22 | end 23 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/zscore.m: -------------------------------------------------------------------------------- 1 | function X = zscore(X) 2 | 3 | %ZSCORE Standardized z-scores for GRIDobj 4 | % 5 | % Syntax 6 | % 7 | % Z = zscore(X) 8 | % 9 | % Description 10 | % 11 | % zscore returns the z-score for each element of GRIDobj X such that 12 | % all values of X are centered to have mean 0 and scaled to have 13 | % standard deviation 1. 14 | % 15 | % Input arguments 16 | % 17 | % X GRIDobj 18 | % 19 | % Output arguments 20 | % 21 | % Z GRIDobj 22 | % 23 | % Example 24 | % 25 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 26 | % Z = zscore(DEM); 27 | % imagesc(Z); colorbar 28 | % 29 | % See also: GRIDobj, zscore 30 | % 31 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 32 | % Date: 3. June, 2024 33 | 34 | X.Z = (X.Z-mean(X.Z,"all","omitmissing"))./... 35 | std(X.Z,0,"all","omitmissing"); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/GRIDobj2mat.m: -------------------------------------------------------------------------------- 1 | function [Z,x,y] = GRIDobj2mat(DEM) 2 | 3 | %GRIDobj2mat Convert GRIDobj to matrix and coordinate vectors 4 | % 5 | % Syntax 6 | % 7 | % [Z,X,Y] = GRIDobj2mat(DEM) 8 | % 9 | % Description 10 | % 11 | % convert GRIDobj to matrix and coordinate vectors 12 | % 13 | % Input 14 | % 15 | % DEM instance of GRIDobj class 16 | % 17 | % Output 18 | % 19 | % Z matrix 20 | % x,y coordinate vectors 21 | % 22 | % Example 23 | % 24 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 25 | % [Z,x,y] = GRIDobj2mat(DEM); 26 | % plot(x,Z(20,:)) 27 | % xlabel('x-coordinate [m]') 28 | % ylabel('Elevation [m]') 29 | % 30 | % See also: GRIDobj 31 | % 32 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 33 | % Date: 3. June, 2024 34 | 35 | Z = DEM.Z; 36 | [x,y] = wf2XY(DEM.wf,DEM.size); 37 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/erode.m: -------------------------------------------------------------------------------- 1 | function DEM = erode(DEM,SE) 2 | 3 | %ERODE Morphological erosion 4 | % 5 | % Syntax 6 | % 7 | % DEMe = erode(DEM,SE) 8 | % 9 | % Description 10 | % 11 | % erode is a simple wrapper around imerode that handles nans. 12 | % 13 | % Input arguments 14 | % 15 | % DEM GRIDobj 16 | % SE structuring element. Default is ones(3). 17 | % 18 | % Output arguments 19 | % 20 | % DEMe GRIDobj 21 | % 22 | % See also: imerode, GRIDobj/dilate 23 | % 24 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 25 | % Date: 10. December, 2024 26 | 27 | arguments 28 | DEM GRIDobj 29 | SE = ones(3) 30 | end 31 | 32 | if isa(DEM.Z,'double') || isa(DEM.Z,'single') 33 | I = isnan(DEM.Z); 34 | DEM.Z(I) = inf; 35 | checknans = true; 36 | else 37 | checknans = false; 38 | end 39 | 40 | DEM.Z = imerode(DEM.Z,SE); 41 | if checknans 42 | DEM.Z(I) = nan; 43 | end 44 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/dilate.m: -------------------------------------------------------------------------------- 1 | function DEM = dilate(DEM,SE) 2 | 3 | %DILATE Morphological dilation 4 | % 5 | % Syntax 6 | % 7 | % DEMd = dilate(DEM,SE) 8 | % 9 | % Description 10 | % 11 | % dilate is a simple wrapper around imdilate that handles nans. 12 | % 13 | % Input arguments 14 | % 15 | % DEM GRIDobj 16 | % SE structuring element. Default is ones(3). 17 | % 18 | % Output arguments 19 | % 20 | % DEMd GRIDobj 21 | % 22 | % See also: imdilate, GRIDobj/erode 23 | % 24 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 25 | % Date: 10. December, 2024 26 | 27 | arguments 28 | DEM GRIDobj 29 | SE = ones(3) 30 | end 31 | 32 | if isa(DEM.Z,'double') || isa(DEM.Z,'single') 33 | I = isnan(DEM.Z); 34 | DEM.Z(I) = -inf; 35 | checknans = true; 36 | else 37 | checknans = false; 38 | end 39 | 40 | DEM.Z = imdilate(DEM.Z,SE); 41 | if checknans 42 | DEM.Z(I) = nan; 43 | end 44 | -------------------------------------------------------------------------------- /toolbox/graphics/getextent.m: -------------------------------------------------------------------------------- 1 | function extent = getextent(ax) 2 | 3 | %GETEXTENT Get current axis extent 4 | % 5 | % Syntax 6 | % 7 | % extent = getextent(ax) 8 | % 9 | % Description 10 | % 11 | % getextent and setextent are two small wrapper functions (around set 12 | % and get) to quickly zoom to a specified extent in an axis object. 13 | % 14 | % Example 15 | % 16 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 17 | % imageschs(DEM); 18 | % % execute til here and zoom to a desired level using the zoom tool 19 | % e = getextent; 20 | % imageschs(DEM,gradient8(DEM)) 21 | % setextent(e) 22 | % 23 | % See also: IMAGESCHS, SETEXTENT, PADEXTENT 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 4. November 2024 27 | 28 | arguments 29 | ax {mustBeA(ax,'matlab.graphics.axis.Axes')} = gca 30 | end 31 | 32 | extent = get(ax,{'xlim','ylim'}); % Get axes limits. 33 | 34 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/ind2coord.m: -------------------------------------------------------------------------------- 1 | function [x,y] = ind2coord(FD,ix) 2 | 3 | %IND2COORD Convert linear index to x and y coordinates 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = ind2coord(DEM,ix) 8 | % 9 | % Description 10 | % 11 | % ind2coord converts a linear index into an instance of GRIDobj to x 12 | % and y coordinates. The function returns column vectors. 13 | % 14 | % Input arguments 15 | % 16 | % DEM instance of GRIDobj 17 | % ix linear index 18 | % 19 | % Output arguments 20 | % 21 | % x,y x- and y-coordinates 22 | % 23 | % See also: GRIDobj/coord2ind, GRIDobj/getcoordinates 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 30. May, 2024 27 | 28 | 29 | % Get intrinsic coordinates 30 | [r,c] = ind2sub(FD.size,ix(:)); 31 | % Calculate map coordinates 32 | xy = (FD.wf*double([c-1 r-1 ones(numel(ix),1)]'))'; 33 | % Split coordinates in x and y vector 34 | x = xy(:,1); 35 | y = xy(:,2); -------------------------------------------------------------------------------- /toolbox/@GRIDobj/ind2coord.m: -------------------------------------------------------------------------------- 1 | function [x,y] = ind2coord(DEM,ix) 2 | 3 | %IND2COORD convert linear index to x and y coordinates 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = ind2coord(DEM,ix) 8 | % 9 | % Description 10 | % 11 | % ind2coord converts a linear index into an instance of GRIDobj to x 12 | % and y coordinates. The function returns column vectors. 13 | % 14 | % Input arguments 15 | % 16 | % DEM instance of GRIDobj 17 | % ix linear index 18 | % 19 | % Output arguments 20 | % 21 | % x,y x- and y-coordinates 22 | % 23 | % See also: GRIDobj/coord2ind, GRIDobj/getcoordinates 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 30. May, 2024 27 | 28 | 29 | % Get intrinsic coordinates 30 | [r,c] = ind2sub(DEM.size,ix(:)); 31 | % Calculate map coordinates 32 | xy = (DEM.wf*double([c-1 r-1 ones(numel(ix),1)]'))'; 33 | % Split coordinates in x and y vector 34 | x = xy(:,1); 35 | y = xy(:,2); -------------------------------------------------------------------------------- /toolbox/@PPS/removepoints.m: -------------------------------------------------------------------------------- 1 | function P = removepoints(P,data) 2 | 3 | %REMOVEPOINTS Remove points in point pattern 4 | % 5 | % Syntax 6 | % 7 | % Pr = removepoints(P,tf) 8 | % 9 | % Description 10 | % 11 | % removepoints removes points from a point pattern based on marks, 12 | % covariates or GRIDobjs. Points true in tf are removed. 13 | % 14 | % Input arguments 15 | % 16 | % P instance of PPS 17 | % data logical node-attribute list, GRIDobj or vector same size as 18 | % npoints(P)x1 19 | % 20 | % Output arguments 21 | % 22 | % Pr instance of PPS with points removed. 23 | % 24 | % 25 | % See also: PPS 26 | % 27 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 28 | % Date: 11. November, 2024 29 | 30 | 31 | if npoints(P) == numel(data) 32 | tf = data; 33 | P.PP(tf) = []; 34 | else 35 | c = getcovariate(P,data); 36 | tf = any(c,2); 37 | P.PP(tf(P.PP)) = []; 38 | end 39 | 40 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/getdistance.m: -------------------------------------------------------------------------------- 1 | function d = getdistance(ix,ixc,siz,cellsize,cl) 2 | 3 | % distance between each node 4 | % 5 | % Syntax 6 | % 7 | % d = getdistance(ix,ixc,siz,cellsize,c) 8 | % 9 | % Description 10 | % 11 | % calculate the distance between each node which is either 12 | % sqrt(2)*cellsize or cellsize. 13 | % 14 | % 15 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 16 | % Date: 26. January, 2013 17 | 18 | if nargin == 4 19 | cl = 'double'; 20 | else 21 | validatestring(cl,{'double','single'}); 22 | end 23 | 24 | d = ones(size(ix),cl)*cast(cellsize,cl); 25 | diagdistance = cast(norm([cellsize cellsize]),cl); 26 | nrrows = siz(1); 27 | if mod(nrrows,2) == 1 28 | % odd number of rows 29 | d(mod(ix,2) == mod(ixc,2)) = diagdistance; 30 | else 31 | % even number of rows 32 | d(mod(ix,2) ~= mod(ixc,2) & ~(imabsdiff(ix,ixc)==1)) = diagdistance; % ~(ix-ixc == 1 | ixc-ix == 1)) 33 | end 34 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/private/createRasterFromASCIIGrid.m: -------------------------------------------------------------------------------- 1 | function [Z,R,wf] = createRasterFromASCIIGrid(filename,options) 2 | 3 | %CREATERASTERFROMASCIIGRID Creates a grid from an Esri ASCII grid 4 | % 5 | % Syntax 6 | % 7 | % [Z,R] = createRasterFromASCIIGrid(filename,options) 8 | % 9 | % 10 | 11 | arguments 12 | filename 13 | options.OutputType = 'single' 14 | end 15 | 16 | % Read raster using readgeoraster (if mapping toolbox available) 17 | if license('test','MAP_Toolbox') 18 | [Z,R] = readgeoraster(filename,... 19 | 'OutputType',options.OutputType,... 20 | 'Bands',1,... 21 | 'CoordinateSystemType',options.CoordinateSystemType); 22 | wf = worldFileMatrix(R); 23 | 24 | % check, if R contains a projcrs or a geocrs, if any 25 | 26 | else 27 | % if mapping toolbox is not available, use rasterread 28 | [Z,wf] = rasterread(filename); 29 | Z = cast(Z,options.OutputType); 30 | R = []; 31 | end 32 | 33 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/ismulti.m: -------------------------------------------------------------------------------- 1 | function tf = ismulti(FD,typetest) 2 | %ISMULTI Determine whether FD is multi or single flow direction 3 | % 4 | % Syntax 5 | % 6 | % tf = ismulti(FD) 7 | % 8 | % Description 9 | % 10 | % ISMULTI returns true if a FLOWobj contains multiple flow directions 11 | % 12 | % Input arguments 13 | % 14 | % FD FLOWobj 15 | % 16 | % Output arguments 17 | % 18 | % tf true or false 19 | % 20 | % Example 21 | % 22 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 23 | % FD = FLOWobj(DEM,'preprocess','c'); 24 | % ismulti(FD) 25 | % 26 | % ans = 27 | % 28 | % logical 29 | % 30 | % 0 31 | % 32 | % See also: FLOWobj 33 | % 34 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 35 | % Date: 31. August, 2024 36 | 37 | if nargin == 1 38 | typetest = true; 39 | end 40 | 41 | if typetest 42 | tf = strcmp(FD.type,'multi'); 43 | else 44 | tf = any(histcounts(FD.ix,1:(prod(FD.size)+1))>1); 45 | end 46 | -------------------------------------------------------------------------------- /toolbox/functionSignatures.json: -------------------------------------------------------------------------------- 1 | { 2 | "_schemaVersion": "1.0.0", 3 | "GRIDobj": 4 | { 5 | "inputs": 6 | [ 7 | {"name":"filename", "kind":"required", "type":[["file=*.tif,*.tiff,*.asc,*.txt"],["char"],["string"]]} 8 | ] 9 | }, 10 | "GRIDobj": 11 | { 12 | "inputs": 13 | [ 14 | {"name":"Z", "kind":"required", "type":["numeric"]}, 15 | {"name":"cs", "kind":"ordered", "type":["numeric"]} 16 | ] 17 | }, 18 | "GRIDobj": 19 | { 20 | "inputs": 21 | [ 22 | {"name":"X", "kind":"required", "type":["numeric"]}, 23 | {"name":"Y", "kind":"required", "type":["numeric"]}, 24 | {"name":"Z", "kind":"required", "type":["numeric"]} 25 | ] 26 | }, 27 | "GRIDobj": 28 | { 29 | "inputs": 30 | [ 31 | {"name":"ttobject", "kind":"required", "type":[["GRIDobj"],["FLOWobj"],["STREAMobj"],["PPS"]]}, 32 | {"name":"class/values", "kind":"ordered", "type":[["numeric"],["string"],["char"]]} 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /toolbox/graphics/letter2rgb.m: -------------------------------------------------------------------------------- 1 | function rgb = letter2rgb(letter) 2 | 3 | %LETTER2RGB Convert letter to rgb triple 4 | % 5 | % Syntax 6 | % 7 | % rgb = letter2rgb(letter) 8 | % 9 | % Description 10 | % 11 | % This function converts a letter that can be used as short-cut for color by 12 | % functions such as plot to a rgb triple. 13 | % 14 | % Example 15 | % 16 | % rgb = letter2rgb('y') 17 | % 18 | % returns [1 1 0] 19 | % 20 | % 21 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 22 | % Date: 12. November, 2024 23 | 24 | switch lower(letter) 25 | case 'r' 26 | rgb = [1 0 0]; 27 | case 'g' 28 | rgb = [0 1 0]; 29 | case 'b' 30 | rgb = [0 0 1]; 31 | case 'c' 32 | rgb = [0 1 1]; 33 | case 'm' 34 | rgb = [1 0 1]; 35 | case 'y' 36 | rgb = [1 1 0]; 37 | case 'k' 38 | rgb = [0 0 0]; 39 | case 'w' 40 | rgb = [1 1 1]; 41 | otherwise 42 | error('Invalid color letter.') 43 | end 44 | 45 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/private/openRasterDialog.m: -------------------------------------------------------------------------------- 1 | function filename = openRasterDialog(folder) 2 | 3 | %Opens a dialog window to select a file 4 | 5 | persistent lastfolder 6 | 7 | if nargin == 0 8 | if exist('lastfolder','var') 9 | folder = lastfolder; 10 | else 11 | folder = pwd; 12 | end 13 | end 14 | 15 | % for a txt or tiff file as input 16 | FilterSpec = {'*.txt;*.asc;*.tif;*.tiff','supported file types (*.txt,*.asc,*.tif,*.tiff)';... 17 | '*.txt', 'ESRI ASCII grid (*.txt)';... 18 | '*.asc', 'ESRI ASCII grid (*.asc)';... 19 | '*.tif', 'GeoTiff (*.tif)';... 20 | '*.tiff', 'GeoTiff (*.tiff)';... 21 | '*.*', 'all files (*.*)'}; 22 | 23 | DialogTitle = 'Select ESRI ASCII grid or GeoTiff'; 24 | [FileName,PathName] = uigetfile(FilterSpec,DialogTitle,folder); 25 | 26 | if FileName == 0 27 | error('TopoToolbox:incorrectinput',... 28 | 'no file was selected') 29 | end 30 | 31 | filename = fullfile(PathName, FileName); 32 | lastfolder = PathName; 33 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/findcoord.m: -------------------------------------------------------------------------------- 1 | function varargout = findcoord(DEM) 2 | 3 | %FINDCOORD Find coordinates of nonzero elements in GRIDobj 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = findcoord(DEM) 8 | % [lon,lat] = findcooord(DEM) 9 | % [...,val] = findcoord(DEM) 10 | % 11 | % Description 12 | % 13 | % This function returns the coordinates of nonzero values in DEM. If 14 | % the DEM is in a geographic coordinate system, then the function 15 | % returns lon and lat. 16 | % 17 | % Input arguments 18 | % 19 | % DEM GRIDobj 20 | % 21 | % Output arguments 22 | % 23 | % x,y coordinate pair 24 | % val value of nonzero element in DEM.Z 25 | % 26 | % See also: find, GRIDobj/coord2ind, GRIDobj/ind2coord, GRIDobj/find 27 | % 28 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 29 | % Date: 4. June, 2024 30 | 31 | ix = find(DEM); 32 | [x,y] = ind2coord(DEM,ix); 33 | 34 | varargout{1} = x; 35 | varargout{2} = y; 36 | if nargout == 3 37 | varargout{3} = DEM.Z(ix); 38 | end 39 | 40 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/clip.m: -------------------------------------------------------------------------------- 1 | function FD = clip(FD,MASK) 2 | 3 | %CLIP Clip FLOWobj 4 | % 5 | % Syntax 6 | % 7 | % FDc = clip(FD,MASK) 8 | % 9 | % Description 10 | % 11 | % Some analysis will likely not require the entire flow network. Hence, 12 | % the function clip enables you to clip a flow network stored in FD by 13 | % removing all links with start and endpoints outside the mask MASK 14 | % provided as GRIDobj. 15 | % 16 | % Input arguments 17 | % 18 | % FD FLOWobj 19 | % MASK GRIDobj (logical) 20 | % 21 | % Output arguments 22 | % 23 | % FDc clipped FLOWobj 24 | % 25 | % See also: FLOWobj2cell 26 | % 27 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 28 | % Date: 10. March, 2025 29 | 30 | arguments 31 | FD FLOWobj 32 | MASK GRIDobj {validatealignment(FD,MASK)} 33 | end 34 | 35 | validatealignment(FD,MASK) 36 | II = MASK.Z(FD.ix) & MASK.Z(FD.ixc); 37 | FD.ix = FD.ix(II); 38 | FD.ixc = FD.ixc(II); 39 | if ismulti(FD) 40 | FD.fraction = FD.fraction(II); 41 | end 42 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/find.m: -------------------------------------------------------------------------------- 1 | function [ix,ixc,frac] = find(FD) 2 | 3 | %FIND Find indices and values of edges in the flow direction graph 4 | % 5 | % Syntax 6 | % 7 | % [ix,ixc] = find(FD); % for single flow direction 8 | % [ix,ixc,frac] = find(FD); % for multiple flow direction 9 | % 10 | % Description 11 | % 12 | % FIND returns the linear indices of nodes in the flow network stored 13 | % in an instance FD of FLOWobj. frac contains the fraction that each 14 | % cell in ix delivers to its downstream neighbor in ixc. frac is an 15 | % empty array if FD represents single flow directions. 16 | % 17 | % Input arguments 18 | % 19 | % FD FLOWobj 20 | % 21 | % Output arguments 22 | % 23 | % ix giver indices 24 | % ixc receiver indices 25 | % frac fraction 26 | % 27 | % See also: FLOWobj, FLOWobj2M 28 | % 29 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 30 | % Date: 24. June, 2024 31 | 32 | arguments 33 | FD FLOWobj 34 | end 35 | 36 | ix = FD.ix; 37 | ixc = FD.ixc; 38 | frac = FD.fraction; -------------------------------------------------------------------------------- /toolbox/@PPS/private/nodedistance.m: -------------------------------------------------------------------------------- 1 | function d = nodedistance(P,varargin) 2 | 3 | %NODEDISTANCE Compute edge list with node distances of the stream net 4 | % 5 | % Syntax 6 | % 7 | % d = nodedistance(P) 8 | % d = nodedistance(P,pn,pv,...) 9 | % 10 | % 11 | % 12 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 13 | % Date: 1. June, 2019 14 | 15 | p = inputParser; 16 | addParameter(p,'marks',[]); 17 | addParameter(p,'d3d',false) 18 | addParameter(p,'val',[]); 19 | 20 | % Parse 21 | parse(p,varargin{:}); 22 | 23 | if isempty(p.Results.val) 24 | if ~p.Results.d3d 25 | d = sqrt((P.S.x(P.S.ix)-P.S.x(P.S.ixc)).^2 + ... 26 | (P.S.y(P.S.ix)-P.S.y(P.S.ixc)).^2); 27 | else 28 | z = getcovariate(P,'z'); 29 | d = sqrt((P.S.x(P.S.ix)-P.S.x(P.S.ixc)).^2 + ... 30 | (P.S.y(P.S.ix)-P.S.y(P.S.ixc)).^2 + ... 31 | (z(P.S.ix)-z(P.S.ixc)).^2); 32 | end 33 | else 34 | c = getcovariate(P,p.Results.val); 35 | d = abs(c(P.S.ix) - c(P.S.ixc)); 36 | end 37 | 38 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/private/builtincaller.m: -------------------------------------------------------------------------------- 1 | function OUT = builtincaller(funname,varargin) 2 | 3 | % function to call built-in functions 4 | % 5 | % Syntax 6 | % 7 | % OUT = builtincaller(funname,G1,G2) 8 | % 9 | % Example 10 | % 11 | % OUT = builtincaller('plus',G1,G2) 12 | % 13 | % 14 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 15 | % Date: 3. June, 2024 16 | 17 | 18 | isGRIDobj = cellfun(@(x) isa(x,'GRIDobj'),varargin); 19 | ref = find(isGRIDobj,1,'first'); 20 | OUT = varargin{ref}; 21 | 22 | if all(isGRIDobj) 23 | validatealignment(varargin{1},varargin{2}); 24 | OUT.Z = builtin(funname,varargin{1}.Z,varargin{2}.Z); 25 | 26 | else 27 | if ~isscalar(varargin{~isGRIDobj}) 28 | validatealignment(varargin{isGRIDobj},varargin{~isGRIDobj}); 29 | end 30 | 31 | if ref == 1 32 | OUT.Z = builtin(funname,varargin{isGRIDobj}.Z,varargin{~isGRIDobj}); 33 | else 34 | OUT.Z = builtin(funname,varargin{~isGRIDobj},varargin{isGRIDobj}.Z); 35 | end 36 | end 37 | 38 | OUT.name = funname; 39 | OUT.zunit = ''; 40 | -------------------------------------------------------------------------------- /toolbox/@PPS/removeduplicates.m: -------------------------------------------------------------------------------- 1 | function [P,a,locb] = removeduplicates(P) 2 | 3 | %REMOVEDUPLICATES Remove duplicate points 4 | % 5 | % Syntax 6 | % 7 | % P2 = removeduplicates(P) 8 | % [P2,a,locb] = ... 9 | % 10 | % Description 11 | % 12 | % removeduplicates removes duplicate points in the point pattern P by 13 | % retaining only one of the duplicates. 14 | % 15 | % Input arguments 16 | % 17 | % P point pattern on stream network (class PPS) 18 | % 19 | % Output arguments 20 | % 21 | % P point pattern on stream network (class PPS) 22 | % 23 | % See also: PPS, PPS/hasduplicates 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 11. November, 2024 27 | 28 | [u,a,b] = unique(P.PP,'stable'); 29 | 30 | if numel(u) == numel(P.PP) 31 | return 32 | end 33 | 34 | if nargout >= 2 35 | ix = (1:npoints(P))'; 36 | ixp = accumarray(b,ix,[numel(u) 1],@(x) {x}); 37 | ixp = cellfun(@(x) sort(x),ixp,'UniformOutput',false); 38 | locb = cellfun(@(x) x(2:end),ixp,'UniformOutput',false); 39 | end 40 | 41 | P.PP = P.PP(a); 42 | 43 | 44 | -------------------------------------------------------------------------------- /toolbox/internal/interpline.m: -------------------------------------------------------------------------------- 1 | function [newx,newy,newdist] = interpline(x,y,d,step) 2 | 3 | % distribute vertices evenly along line with irregularly spaced vertices 4 | % 5 | % Syntax 6 | % 7 | % [newx,newy,newdist] = interpline(x,y,d,step) 8 | % 9 | % Input 10 | % 11 | % x, y coordinate vectors 12 | % d cumulative distance along path defined by x and y 13 | % step new distance between vertices 14 | % 15 | % 16 | % Function for getting a new line with equi-distant (step) vertices from 17 | % irregular line. Assumes that x,y coordinates are in same units as step. 18 | % Code as explained in: 19 | % http://blogs.mathworks.com/steve/2012/07/06/walking-along-a-path/ 20 | if isrow(x); x = x'; end 21 | if isrow(y); y = y'; end 22 | if isrow(d); d = d'; end 23 | % get rid of duplicates 24 | repeatedPtsMask = diff(d)==0; 25 | if any(repeatedPtsMask) 26 | x(repeatedPtsMask) = []; 27 | y(repeatedPtsMask) = []; 28 | d(repeatedPtsMask) = []; 29 | end 30 | % interpolate 31 | newdist = (d(1):step:d(end))'; 32 | newx = interp1(d, x, newdist); 33 | newy = interp1(d, y, newdist); 34 | end % -------------------------------------------------------------------------------- /toolbox/@GRIDobj/sub2coord.m: -------------------------------------------------------------------------------- 1 | function [x,y] = sub2coord(DEM,r,c) 2 | 3 | %SUB2COORD Convert subscripts to x and y coordinates 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = sub2coord(DEM,r,c) 8 | % 9 | % Description 10 | % 11 | % sub2coord converts a subscripts into an instance of GRIDobj to x 12 | % and y coordinates. 13 | % 14 | % Input arguments 15 | % 16 | % DEM instance of GRIDobj 17 | % r,c row and column indices 18 | % 19 | % Output arguments 20 | % 21 | % x,y x- and y-coordinates (column vectors) 22 | % 23 | % See also: GRIDobj/coord2sub, GRIDobj/getcoordinates 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 30. May, 2024 27 | 28 | arguments 29 | DEM GRIDobj 30 | r 31 | c 32 | end 33 | 34 | if numel(r) ~= numel(c) 35 | error('TopoToolbox:wronginput','r and c must have the same number of elements') 36 | end 37 | 38 | mustBeInRange(r,1-.6,nrows(DEM)+.6) 39 | mustBeInRange(c,1-.6,ncols(DEM)+.6) 40 | 41 | r = r(:); 42 | c = c(:); 43 | 44 | xy = (DEM.wf*double([c-1 r-1 ones(numel(r),1)]'))'; 45 | x = xy(:,1); 46 | y = xy(:,2); 47 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/plot3.m: -------------------------------------------------------------------------------- 1 | function h = plot3(S,DEM,varargin) 2 | 3 | %PLOT3 3D-line plot of a STREAMobj 4 | % 5 | % Syntax 6 | % 7 | % plot3(S,DEM) 8 | % plot3(S,z) 9 | % h = ... 10 | % 11 | % Description 12 | % 13 | % The plot3 function displays a three-dimensional plot of a stream 14 | % network S derived from a DEM. 15 | % 16 | % Input arguments 17 | % 18 | % S STREAMobj 19 | % DEM digital elevation model (DEM) 20 | % z node attribute list 21 | % 22 | % Output arguments 23 | % 24 | % h line handle 25 | % 26 | % Example 27 | % 28 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 29 | % FD = FLOWobj(DEM,'preprocess','carve'); 30 | % S = STREAMobj(FD,'minarea',1000); 31 | % S = klargestconncomps(S); 32 | % plot3(S,DEM) 33 | % 34 | % See also: STREAMobj, STREAMobj/plot, STREAMobj/plot3d, STREAMobj/plotdz 35 | % 36 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 37 | % Date: 3. July, 2024 38 | 39 | narginchk(2,inf) 40 | 41 | [x,y,z] = STREAMobj2XY(S,DEM); 42 | htemp = plot3(x,y,z,varargin{:}); 43 | 44 | if nargout == 1 45 | h = htemp; 46 | end -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/isTTObject.m: -------------------------------------------------------------------------------- 1 | function [tf,TTobj] = isTTObject(A) 2 | %isTTObject Determines whether a variable is an instance of a TT object 3 | % 4 | % Syntax 5 | % 6 | % tf = isTTObject(A) 7 | % [tf,str] = ... 8 | % 9 | % Description 10 | % 11 | % isTTObject determines whether a variable is a GRIDobj, FLOWobj, 12 | % STREAMobj, PPS, DIVIDEobj, or SWATHobj. 13 | % 14 | % Input arguments 15 | % 16 | % A any MATLAB variable 17 | % 18 | % Output arguments 19 | % 20 | % tf true, if input is a TT object 21 | % str class of the object 22 | % 23 | % Example 24 | % 25 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 26 | % [tf,str] = isTTObject(DEM) 27 | % 28 | % % Should return tf = true and str = 'GRIDobj' 29 | % 30 | % See also: GRIDobj, FLOWobj, STREAMobj 31 | % 32 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 33 | % Date: 2. September, 2024 34 | 35 | tf = isa(A,'GRIDobj') || isa(A,'FLOWobj') || isa(A,'STREAMobj') || ... 36 | isa(A,'SWATHobj') || isa(A,'PPS') || isa(A,'DIVIDEobj'); 37 | 38 | if nargout == 2 39 | TTobj = class(A); 40 | end -------------------------------------------------------------------------------- /toolbox/@FLOWobj/FLOWobj2M.m: -------------------------------------------------------------------------------- 1 | function M = FLOWobj2M(FD) 2 | 3 | %FLOWOBJ2M Convert instance of FLOWobj to flow direction matrix 4 | % 5 | % Syntax 6 | % 7 | % M = FLOWobj2M(FD); 8 | % 9 | % Description 10 | % 11 | % FLOWobj2M converts an instance of FLOWobj to the flow direction 12 | % matrix M as used in TopoToolbox 1. 13 | % 14 | % Input arguments 15 | % 16 | % FD FLOWobj 17 | % 18 | % Output arguments 19 | % 20 | % M sparse transfer matrix 21 | % 22 | % Example 23 | % 24 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 25 | % FD = FLOWobj(DEM,'preprocess','c'); 26 | % M = FLOWobj2M(FD); 27 | % [x,y] = getcoordinates(DEM); 28 | % [x,y] = meshgrid(x,y); 29 | % gplot(M,[x(:) y(:)]) 30 | % 31 | % 32 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 33 | % Date: 31. August, 2024 34 | 35 | arguments 36 | FD FLOWobj 37 | end 38 | 39 | nrc = prod(FD.size); 40 | switch lower(FD.type) 41 | case {'multi','dinf'} 42 | M = sparse(double(FD.ix),double(FD.ixc),FD.fraction,nrc,nrc); 43 | case 'single' 44 | M = sparse(double(FD.ix),double(FD.ixc),1,nrc,nrc); 45 | end 46 | end -------------------------------------------------------------------------------- /toolbox/@GRIDobj/histogram.m: -------------------------------------------------------------------------------- 1 | function h = histogram(varargin) 2 | 3 | %HISTOGRAM Plot frequency distribution of values in GRIDobj 4 | % 5 | % Syntax 6 | % 7 | % histogram(DEM) 8 | % histogram(DEM,...) 9 | % h = ... 10 | % 11 | % Description 12 | % 13 | % HISTOGRAM overloads MATLAB's histogram function for GRIDobjs. Please 14 | % read the help for this function for details. 15 | % 16 | % Input arguments 17 | % 18 | % DEM GRIDobj 19 | % ... Arguments used by the function histogram 20 | % 21 | % Output arguments 22 | % 23 | % h histogram handle 24 | % 25 | % Examples 26 | % 27 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 28 | % histogram(DEM) 29 | % 30 | % 31 | % See also: GRIDobj 32 | % 33 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 34 | % Date: 11. July, 2025 35 | 36 | ixarg = cellfun(@(x) isa(x,'GRIDobj'),varargin,'UniformOutput',true); 37 | DEM = varargin{ixarg}; 38 | z = DEM.Z; 39 | if isfloat(z) 40 | z(isnan(z) | isinf(z)) = []; 41 | end 42 | 43 | z = z(:); 44 | varargin{ixarg} = z; 45 | 46 | htemp = histogram(varargin{:}); 47 | if nargout == 1 48 | h = htemp; 49 | end 50 | 51 | -------------------------------------------------------------------------------- /toolbox/internal/projectprofile.m: -------------------------------------------------------------------------------- 1 | function [d,z]=projectprofile(x,y,z) 2 | 3 | % 4 | % 5 | % [d,znew]=projectprofile(x,y,z) 6 | % _______________________________________________________ 7 | % 8 | % When surveying a cross profile using DGPS, projectprofile 9 | % helps you to visualize the profile by projecting each 10 | % measured point on the straight line between the starting 11 | % and the end point of the profile. 12 | % 13 | % x, y and z must be column vectors of same length. 14 | % _______________________________________________________ 15 | % WS 16 | % 17 | 18 | 19 | % starting point 20 | x = x(:); 21 | y = y(:); 22 | z = z(:); 23 | 24 | if x(1) > x(end) 25 | x = flipud(x); 26 | end 27 | sp = [x(1); y(1)]; 28 | 29 | % subtract starting point from other locations 30 | x = x-sp(1); 31 | y = y-sp(2); 32 | 33 | % end point 34 | a = [x(end); y(end)]; 35 | 36 | % projection of [x; y] on vector a 37 | beta = (a' * [x y]')./(a'*a); 38 | d = beta .* sqrt(a'*a); 39 | 40 | % sort the distance vector and z ascending 41 | % [d,IX1] = sort(d); 42 | % znew = z(IX1); 43 | 44 | % minimum point is zero 45 | % [zmin,IX2] = min(znew); 46 | % d = d-d(IX2(1)); 47 | % d = d'; 48 | 49 | -------------------------------------------------------------------------------- /bindings/tt_gradient8.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tt_gradient8.c 4 | 5 | */ 6 | 7 | #include "matrix.h" 8 | #include "mex.h" 9 | #include "topotoolbox.h" 10 | 11 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { 12 | // INPUTS: DEM, cellsize, use_mp 13 | // OUTPUTS: output 14 | if (nrhs != 3) { 15 | mexErrMsgIdAndTxt("tt3:tt_gradient8:nrhs", "Three inputs required"); 16 | } 17 | if (nlhs != 1) { 18 | mexErrMsgIdAndTxt("tt3:tt_gradient8:nlhs", "One output required"); 19 | } 20 | 21 | const mxArray *demArray = prhs[0]; 22 | float *dem = mxGetSingles(demArray); 23 | 24 | float cellsize = (float) mxGetScalar(prhs[1]); 25 | int use_mp = (int) mxGetScalar(prhs[2]); 26 | 27 | ptrdiff_t dims[2]; 28 | dims[0] = mxGetM(demArray); 29 | dims[1] = mxGetN(demArray); 30 | 31 | // Null pointer checks are not needed because out-of-memory errors 32 | // will terminate the MEX function. 33 | plhs[0] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 34 | float *output = mxGetSingles(plhs[0]); 35 | 36 | // Converted to float to avoid compiler warnings 37 | gradient8(output, dem, (float) cellsize, (int) use_mp, dims); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /images/makettlogo.m: -------------------------------------------------------------------------------- 1 | function makettlogo 2 | 3 | 4 | cols = [1 1 1;... 5 | 0 0.4470 0.7410;... 6 | 0.8500 0.3250 0.0980;... 7 | 0.9290 0.6940 0.1250]; 8 | 9 | 10 | fn = 'Helvetica'; 11 | 12 | w = 0.5; 13 | h = w; 14 | va = 'middle'; 15 | ha = 'center'; 16 | 17 | figure() 18 | ax = gca; 19 | axis(ax,"square"); 20 | ylim(ax,[-h/2 -h/2+h ]) 21 | xlim(ax,[-w/2 -w/2+w ]) 22 | 23 | hrect = rectangle('Position',[-w/2 -h/2 w h],'Curvature',0.05,'LineWidth',15,... 24 | 'FaceColor',cols(2,:),'EdgeColor',cols(2,:)); 25 | 26 | n = 6.5; 27 | % ax = gca; 28 | % ax.Position = [-w/2 -h/2 w h]; 29 | 30 | 31 | text(0,0,' T ','FontSize',48*n,'FontWeight','bold','Color',cols(4,:),... 32 | 'VerticalAlignment',va,'HorizontalAlignment',ha,... 33 | 'FontUnits','inches','FontName',fn) 34 | text(0,0,' T','FontSize',48*n,'FontWeight','bold','Color',cols(3,:),... 35 | 'VerticalAlignment',va,'HorizontalAlignment',ha,... 36 | 'FontUnits','inches','FontName',fn) 37 | text(-0.02,-0.045,' 3','FontSize',44*n,'FontWeight','bold','Color',cols(1,:),... 38 | 'VerticalAlignment',va,'HorizontalAlignment',ha,... 39 | 'FontUnits','inches','FontName',fn) 40 | 41 | set(gca,'XColor','none','YColor','none') 42 | -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/isEqualGeoreference.m: -------------------------------------------------------------------------------- 1 | function tf = isEqualGeoreference(A,B) 2 | %ISEQUALGEOREFERENCE Determines whether two TT objects have the same georeferencing 3 | % 4 | % Syntax 5 | % 6 | % tf = isEqualGeoreference(A,B) 7 | % 8 | % If A and B have no referencing objects, their reference is 9 | % assumed to be the same. 10 | 11 | % tf = false; 12 | 13 | 14 | % Both GRIDobjs do not have referencing objects 15 | if isempty(isGeographic(A)) && isempty(isGeographic(B)) 16 | tf = true; 17 | return 18 | end 19 | 20 | % One of both GRIDobj does not have a referencing object 21 | if xor(isempty(isGeographic(A)),isempty(isGeographic(B))) 22 | tf = false; 23 | return 24 | end 25 | 26 | % Both have different types of referencing objects 27 | if xor(isGeographic(A),isGeographic(B)) 28 | tf = false; 29 | end 30 | 31 | % They have geographic referencing objects 32 | if isGeographic(A) 33 | tf = isequal(A.georef.GeographicCRS,... 34 | B.georef.GeographicCRS); 35 | return 36 | end 37 | 38 | % They have projected referencing objects 39 | if isProjected(A) 40 | tf = isequal(A.georef.ProjectedCRS,... 41 | B.georef.ProjectedCRS); 42 | return 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /toolbox/@DIVIDEobj/ind2coord.m: -------------------------------------------------------------------------------- 1 | function [x,y] = ind2coord(D,ix) 2 | %IND2COORD convert linear index to x and y coordinates 3 | % 4 | % Syntax 5 | % 6 | % [x,y] = ind2coord(D,ix) 7 | % 8 | % Description 9 | % 10 | % ind2coord converts a linear index into an instance of DIVIDEobj to x 11 | % and y coordinates. Note that the virtual grid associated 12 | % with a DIVIDEobj is shifted by half a cell size in x and y and has an 13 | % extra row and collumn. The linear indices point to the coreners of 14 | % the pixels in the GRIDobj the DIVIDEobj is based on. 15 | % 16 | % Input arguments 17 | % 18 | % D instance of DIVIDEobj 19 | % ix linear index 20 | % 21 | % Output arguments 22 | % 23 | % x,y x- and y-coordinates 24 | % 25 | % See also: GRIDobj/ind2coord, GRIDobj/coord2ind, GRIDobj/getcoordinates 26 | % 27 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 28 | % code simply copied and help adjusted by Dirk Scherler 29 | % Date: 30. January, 2013 and February 2019 30 | 31 | % Get intrinsic coordinates 32 | [r,c] = ind2sub(D.size,ix(:)); 33 | % Calculate map coordinates 34 | xy = (D.wf*double([c-1 r-1 ones(numel(ix),1)]'))'; 35 | 36 | x = xy(:,1); 37 | y = xy(:,2); -------------------------------------------------------------------------------- /toolbox/internal/getPreSillPixels.m: -------------------------------------------------------------------------------- 1 | function PreSillPixel = getPreSillPixels(Z,FLATS,SILLS) 2 | %GETPRESILLPIXELS Find pixels upstream of sill pixels 3 | % 4 | % Syntax 5 | % 6 | % PreSillPixel = getPreSillPixels(Z,SILLS) 7 | % 8 | % Input arguments 9 | % 10 | % Z numeric matrix with elevations (filled DEM) 11 | % SILLS Sill pixels (logical matrix) 12 | % 13 | % Output arguments 14 | % 15 | % PreSillPixel Vector of linear indices of pixels 16 | % 17 | % 18 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 19 | % Date: 06. September, 2024 20 | 21 | siz = size(Z); 22 | 23 | % establish the connectivity between sills and flats 24 | [row,col] = find(SILLS); 25 | IXsill = sub2ind(siz,row,col); 26 | rowadd = [-1 -1 0 1 1 1 0 -1]; 27 | coladd = [ 0 1 1 1 0 -1 -1 -1]; 28 | PreSillPixel = []; 29 | 30 | for r = 1:8 31 | rowp = row + rowadd(r); 32 | colp = col + coladd(r); 33 | 34 | ValidRowColPair = rowp>0 & colp>0 & rowp<=siz(1) & colp<=siz(2); 35 | IXPreSill = sub2ind(siz,rowp(ValidRowColPair),colp(ValidRowColPair)); 36 | 37 | PreSillPixel = [PreSillPixel;... 38 | IXPreSill((Z(IXsill(ValidRowColPair)) == Z(IXPreSill)) & FLATS(IXPreSill))]; %#ok 39 | 40 | end 41 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/flowdivergence.m: -------------------------------------------------------------------------------- 1 | function D = flowdivergence(FD) 2 | 3 | %FLOWDIRVERGENCE Calculate the number of downstream neighbors 4 | % 5 | % Syntax 6 | % 7 | % D = flowdivergence(FD) 8 | % 9 | % Description 10 | % 11 | % flowdivergence determines the number of downstream neighbor of each 12 | % cell based on a multiple flow direction matrix. 13 | % 14 | % Input arguments 15 | % 16 | % FD FLOWobj 17 | % 18 | % Output arguments 19 | % 20 | % D GRIDobj with underlying class uint8. 21 | % 22 | % 23 | % See also: FLOWobj, FLOWobj/ismulti 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 25. September, 2024 27 | 28 | arguments 29 | FD FLOWobj 30 | end 31 | 32 | %% Histcounts is fastest 33 | D = histcounts(FD.ix,1:(prod(FD.size)+1)); 34 | 35 | %% Accumarray is more flexible and some aggregation function such as shannon 36 | % entropy could be applied in the future. That's why I leave this code 37 | % below 38 | 39 | % fun = @(x) sum(x.*log2(x)); 40 | % fun = @(x) uint8(numel(x)); 41 | % fillval = zeros(1,'uint8'); 42 | % D = accumarray(FD.ix,FD.fraction,[prod(FD.size) 1],fun,fillval); 43 | 44 | %% Reshape and create GRIDobj 45 | D = reshape(D,FD.size); 46 | D = GRIDobj(FD,D); 47 | -------------------------------------------------------------------------------- /toolbox/graphics/adjustgeoaspectratio.m: -------------------------------------------------------------------------------- 1 | function adjustgeoaspectratio(h) 2 | %ADJUSTGEOASPECTRATIO Adjusts data aspect ratio for latitude-longitude axes 3 | % 4 | % Syntax 5 | % 6 | % adjustgeoaspectratio(h) 7 | % 8 | % Description 9 | % 10 | % This function modifies the data aspect ratio of the specified axes to 11 | % reduce distortions in metric distances when the axes represent 12 | % latitude and longitude coordinates. It accounts for variations in 13 | % distance due to latitude, ensuring a more accurate spatial 14 | % representation. 15 | % 16 | % Input arguments 17 | % 18 | % h axes handle 19 | % 20 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 21 | % Date: 27. February, 2025 22 | 23 | arguments 24 | h = gca 25 | end 26 | 27 | % Get axes limits 28 | xlim = h.XLim; 29 | ylim = h.YLim; 30 | % Centers of both axes 31 | mx = sum(xlim)/2; 32 | my = sum(ylim)/2; 33 | % Metric distances 34 | dx = distance(my,xlim(1),my,xlim(2),wgs84Ellipsoid); 35 | dy = distance(ylim(1),mx,ylim(2),mx,wgs84Ellipsoid); 36 | % Metric distance per longitude/latitude degree 37 | dx = dx/range(xlim); 38 | dy = dy/range(ylim); 39 | % Ratio 40 | r = dx/dy; 41 | % Adjust data aspect ratio 42 | h.DataAspectRatio = [1 r 1]; -------------------------------------------------------------------------------- /bindings/tt_hillshade_fused.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tt_hillshade_fused.c 4 | 5 | */ 6 | 7 | #include "matrix.h" 8 | #include "mex.h" 9 | #include "topotoolbox.h" 10 | 11 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { 12 | // INPUTS: DEM, azimuth, altitude, cs 13 | // OUTPUTS: Hillshade 14 | if (nrhs != 4) { 15 | mexErrMsgIdAndTxt("tt3:tt_hillshade_fused:nrhs", "Four inputs required"); 16 | } 17 | if (nlhs != 1) { 18 | mexErrMsgIdAndTxt("tt3:tt_hillshade:nlhs", "One output required"); 19 | } 20 | 21 | const mxArray *demArray = prhs[0]; 22 | float *dem = mxGetSingles(demArray); 23 | 24 | double azimuth = mxGetScalar(prhs[1]); 25 | double altitude = mxGetScalar(prhs[2]); 26 | double cellsize = mxGetScalar(prhs[3]); 27 | 28 | ptrdiff_t dims[2]; 29 | dims[0] = mxGetM(demArray); 30 | dims[1] = mxGetN(demArray); 31 | 32 | // Null pointer checks are not needed because out-of-memory errors 33 | // will terminate the MEX function. 34 | plhs[0] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 35 | float *output = mxGetSingles(plhs[0]); 36 | 37 | // Converted to float to avoid compiler warnings 38 | hillshade_fused(output, dem, (float) azimuth, (float) altitude, (float) cellsize, dims); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/conncomps.m: -------------------------------------------------------------------------------- 1 | function [L,nc] = conncomps(S) 2 | 3 | %CONNCOMPS Labels of connected components (individual trees) in a stream network 4 | % 5 | % Syntax 6 | % 7 | % [L,nc] = conncomps(S) 8 | % 9 | % Description 10 | % 11 | % conncomps returns a node attribute list (nal) that contains labels 12 | % for connected components in a stream network. 13 | % 14 | % Input arguments 15 | % 16 | % S STREAMobj 17 | % 18 | % Output arguments 19 | % 20 | % L node attribute list (nal) with labels 21 | % nc number of connected components 22 | % 23 | % Example 24 | % 25 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 26 | % FD = FLOWobj(DEM,'preprocess','carve'); 27 | % S = STREAMobj(FD,'minarea',1000); 28 | % L = conncomps(S); 29 | % plotc(S,L) 30 | % 31 | % See also: STREAMobj, STREAMobj/klargestconncomps, 32 | % STREAMobj/extractconncomps 33 | % 34 | % 35 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 36 | % Date: 17. June, 2024 37 | 38 | nrc = numel(S.x); 39 | M = sparse(double(S.ix),double(S.ixc),true,nrc,nrc); 40 | 41 | [~,p,~,r] = dmperm(M | M' | speye(nrc)); 42 | nc = length(r) - 1; 43 | 44 | % label matrix 45 | L = zeros(nrc,1); 46 | for tt = 1:nc 47 | L(p(r(tt):r(tt+1)-1)) = tt; 48 | end -------------------------------------------------------------------------------- /toolbox/@GRIDobj/find.m: -------------------------------------------------------------------------------- 1 | function varargout = find(DEM) 2 | 3 | %FIND Find indices of nonzero elements in GRIDobj 4 | % 5 | % Syntax 6 | % 7 | % ix = find(DEM) 8 | % [r,c] = find(DEM) 9 | % [r,c,val] = find(DEM) 10 | % 11 | % Description 12 | % 13 | % This function overloads the built-in function find and returns the 14 | % linear indices, or row and column indices of nonzero values in DEM. 15 | % In contrast to the built-in find function, GRIDobj/find treats nans 16 | % as zero entries. 17 | % 18 | % Input arguments 19 | % 20 | % DEM GRIDobj 21 | % 22 | % Output arguments 23 | % 24 | % ix linear index 25 | % r row index 26 | % c column index 27 | % val value of nonzero element in DEM.Z 28 | % 29 | % See also: find, GRIDobj/coord2ind, GRIDobj/ind2coord, GRIDobj/findcoord 30 | % 31 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 32 | % Date: 10. December, 2014 33 | 34 | nargoutchk(0,3); 35 | 36 | if isUnderlyingNumeric(DEM) 37 | DEM.Z(isnan(DEM.Z)) = 0; 38 | end 39 | 40 | if nargout == 1 41 | varargout{1} = find(DEM.Z); 42 | elseif nargout == 2 43 | [varargout{1},varargout{2}] = find(DEM.Z); 44 | else 45 | [varargout{1},varargout{2},varargout{3}] = find(DEM.Z); 46 | end 47 | 48 | -------------------------------------------------------------------------------- /toolbox/@SWATHobj/swath2latlon.m: -------------------------------------------------------------------------------- 1 | function [OUT] = swath2latlon(SW) 2 | %SWATH2LATLON Convert spatial fields in SWATHobj to geographic coordinates 3 | % 4 | % Syntax 5 | % 6 | % OUT = swath2latlon(SW) 7 | % 8 | % Description 9 | % 10 | % SWATH2LATLON uses the mapping toolbox to convert all spatial fields 11 | % in the SWATHobj SW to geographic coordinates (latitude, longitude). 12 | % Requires Mapping toolbox. 13 | % 14 | % Input arguments 15 | % 16 | % SW instance of SWATHobj 17 | % 18 | % Output arguments 19 | % 20 | % OUT instance of SWATHobj 21 | % 22 | % Examples 23 | % 24 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 25 | % SW = SWATHobj(DEM) 26 | % SW2 = swath2latlon(SW) 27 | % 28 | % 29 | % Author: Dirk Scherler (scherler[at]caltech.edu) 30 | % Date: June, 2024 31 | 32 | if ~isProjected(SW) 33 | error('TopoToolbox:wrongInput',... 34 | 'SWATHobj has a geographic or no projected coordinate system'); 35 | end 36 | 37 | CRS = parseCRS(SW); 38 | 39 | [SW.xy0(:,2),SW.xy0(:,1)] = projinv(CRS,SW.xy0(:,1),SW.xy0(:,2)); 40 | [SW.xy(:,2),SW.xy(:,1)] = projinv(CRS,SW.xy(:,1),SW.xy(:,2)); 41 | [y,x] = projinv(CRS,SW.X(:),SW.Y(:)); 42 | SW.X = reshape(x,size(SW.X)); 43 | SW.Y = reshape(y,size(SW.Y)); 44 | 45 | OUT = SW; 46 | OUT.georef = []; 47 | OUT.georef.GeographicCRS = geocrs(4326); 48 | 49 | -------------------------------------------------------------------------------- /toolbox/GIStools/geotable2mapstruct.m: -------------------------------------------------------------------------------- 1 | function MS = geotable2mapstruct(GT) 2 | 3 | %GEOTABLE2MAPSTRUCT Convert a geotable to a mapping structure 4 | % 5 | % Syntax 6 | % 7 | % MS = geotable2mapstruct(GT) 8 | % 9 | % Description 10 | % 11 | % geotable2mapstruct converts a geotable to a mapping structure. 12 | % 13 | % Input arguments 14 | % 15 | % GT geotable 16 | % 17 | % See also: mapstruct2geotable, polygon2GRIDobj, 18 | % STREAMobj/STREAMobj2geotable, STREAMobj/STREAMobj2mapstruct 19 | % 20 | % Author: Wolfgang Schwanghart (schwangh@uni-potsdam.de) 21 | % Date: 9. July, 2024 22 | 23 | arguments 24 | GT {mustBeGeotable} 25 | end 26 | 27 | [~,isproj] = parseCRS(GT); 28 | if ~isproj 29 | MS = geotable2table(GT,["Latitude" "Longitude"]); 30 | 31 | else 32 | MS = geotable2table(GT,["X" "Y"]); 33 | 34 | end 35 | 36 | geomType = GT.Shape.Geometry; 37 | 38 | MS = table2struct(MS); 39 | 40 | switch geomType 41 | case 'point' 42 | [MS.Geometry] = deal('Point'); 43 | case 'line' 44 | [MS.Geometry] = deal('Line'); 45 | case 'polygon' 46 | [MS.Geometry] = deal('Polygon'); 47 | otherwise 48 | error('Unknown geometry type.') 49 | end 50 | 51 | 52 | 53 | end 54 | 55 | function mustBeGeotable(inp) 56 | if ~isgeotable(inp) 57 | error("Input must be a geotable.") 58 | end 59 | end -------------------------------------------------------------------------------- /toolbox/colormaps/ttclr.m: -------------------------------------------------------------------------------- 1 | function clr = ttclr(feature) 2 | 3 | %TTCLR Colors for common map features 4 | % 5 | % Syntax 6 | % 7 | % clr = ttclr(feature) 8 | % 9 | % Description 10 | % 11 | % ttclr returns a number of rgb values for common usage. 12 | % 13 | % Input arguments 14 | % 15 | % feature 'lake','lakeoutline','river','glacier','desert', or 16 | % 'meadow' 17 | % 18 | % Output arguments 19 | % 20 | % clr rgb-triple 21 | % 22 | % See also: ttscm, ttcmap 23 | % 24 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 25 | % Date: 12. October, 2024 26 | 27 | arguments 28 | feature {mustBeMember(feature,{'lake','lakeoutline',... 29 | 'river','glacier',... 30 | 'desert','meadow'})} 31 | end 32 | 33 | switch lower(feature) 34 | case 'lake' 35 | clr = [165, 191, 221]/255; 36 | case {'lakeoutline','river'} 37 | clr = [0 0.4470 0.7410]; 38 | case 'glacier' 39 | % https://support.esri.com/en/technical-article/000010027 40 | % 10% Gray 41 | clr = [225 225 225]/255; 42 | case 'desert' 43 | % https://support.esri.com/en/technical-article/000010027 44 | % Sahara sand 45 | clr = [255 235 190]/255; 46 | case 'meadow' 47 | clr = [48 186 143]/255; 48 | end -------------------------------------------------------------------------------- /toolbox/DEMdata/createTestDEM.m: -------------------------------------------------------------------------------- 1 | function DEM = createTestDEM(res) 2 | 3 | arguments 4 | res = 100 5 | end 6 | 7 | Z = ... 8 | [... 9 | 69 100 144 198 258 248 206 138 64 22 5 8 10 | 79 NaN 148 208 252 218 214 192 102 41 25 79 11 | 101 117 139 186 246 208 175 180 118 60 79 69 12 | 156 161 179 200 204 175 147 128 93 99 168 69 13 | 213 222 244 248 219 207 208 145 119 120 167 207 14 | 236 298 303 287 240 200 180 149 119 194 224 239 15 | 276 338 316 292 269 221 166 119 119 227 304 310 16 | 337 372 365 320 264 251 221 163 246 277 300 352 17 | 329 372 382 325 323 303 202 191 281 355 354 331 18 | NaN 329 366 369 328 240 208 303 391 410 379 302 19 | 271 253 293 277 266 201 234 324 368 331 275 247 20 | 360 336 301 276 201 192 214 268 320 293 235 235 21 | 383 373 388 335 192 258 251 335 405 384 374 316 22 | 454 451 406 305 294 297 293 352 411 434 411 291 23 | 455 454 369 303 317 324 358 394 350 366 347 278 24 | 451 436 387 313 355 360 432 432 432 333 295 317 25 | 470 424 376 326 352 403 432 432 432 387 332 366 26 | 532 521 433 347 352 418 432 432 432 408 362 350 27 | 519 521 418 365 405 457 431 392 386 371 336 270 28 | NaN 520 402 433 492 469 378 311 279 262 240 221 29 | NaN NaN 425 500 533 495 437 306 251 248 214 221 30 | NaN NaN NaN NaN 457 434 393 295 351 344 314 313]; 31 | 32 | X = (0:size(Z,2)-1)*res; 33 | Y = flipud((0:size(Z,1)-1)'*res); 34 | 35 | DEM = GRIDobj(X,Y,Z); -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/mustBeGRIDobjOrNal.m: -------------------------------------------------------------------------------- 1 | function mustBeGRIDobjOrNal(x,S) 2 | 3 | %mustBeGRIDobjOrNal Validate that value is GRIDobj or a valid nal 4 | % 5 | % Syntax 6 | % 7 | % mustBeGRIDobjOrNal(x,S) 8 | % 9 | % Description 10 | % 11 | % The function validates that a value x is a GRIDobj or node-attribute 12 | % list that is aligned with a STREAMobj S. 13 | % 14 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 15 | % Date: 11. June, 2024 16 | 17 | if isa(x,'GRIDobj') 18 | TF = isequal(S.size,x.size) && isequal(S.wf,x.wf); 19 | if ~TF 20 | error('TopoToolbox:incorrectinput',... 21 | ['STREAMobj and GRIDobj do not align each other. Make sure that \n' ... 22 | 'both instances have the same spatial reference. Both variables \n' ... 23 | 'are deemed to have the same reference if their properties ''size'' \n' ... 24 | 'and ''wf'' are both equal.']); 25 | 26 | end 27 | else 28 | TF = isnal(S,x); 29 | if ~TF 30 | nnodes = numel(S.x); 31 | error('TopoToolbox:incorrectinput',... 32 | ['Input is not a valid node-attribute list of the supplied \n' ... 33 | 'STREAMobj. To be valid, the input must be a column vector \n' ... 34 | 'with ' num2str(nnodes) ' elements.']); 35 | 36 | end 37 | 38 | end 39 | -------------------------------------------------------------------------------- /toolbox/tthelp.m: -------------------------------------------------------------------------------- 1 | function tthelp(str,page) 2 | %TTHELP Search on the TopoToolbox blog 3 | % 4 | % Syntax 5 | % 6 | % tthelp keyword 7 | % tthelp('keyword') 8 | % 9 | % Description 10 | % 11 | % TTHELP lets you search the TopoToolbox blog and returns links to the 12 | % blog to the command line. 13 | % 14 | % Example 15 | % 16 | % tthelp ksn 17 | % 18 | % Note that this function may not work properly if wordpress does changes 19 | % to its html-code. 20 | % 21 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 22 | % Date: 22. July, 2022 23 | 24 | if nargin == 1 25 | page = 1; 26 | end 27 | 28 | % First page URL 29 | if page == 1 30 | url = 'https://topotoolbox.wordpress.com/?s='; 31 | else 32 | pagestr = num2str(page); 33 | url = ['https://topotoolbox.wordpress.com/page/' pagestr '/?s=']; 34 | end 35 | 36 | t = webread([url str]); 37 | 38 | [tokens,matches] = regexp(t,'

(.*?)

','tokens','match'); 39 | for r = 1:numel(tokens) 40 | % replace   with blank 41 | tokens{r} = replace(tokens{r},' ',' '); 42 | disp(tokens{r}{1}) 43 | end 44 | 45 | % now check whether there's another page with results 46 | findnextstr = '
  • '; 47 | 48 | if ~isempty(regexp(t,findnextstr,'once')) 49 | tthelp(str,page+1) 50 | end 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /toolbox/docs/publishtthelp2html.m: -------------------------------------------------------------------------------- 1 | function publishtthelp2html 2 | 3 | %PUBLISHTTHELP2HTML Publish TopoToolbox mlx help files to html 4 | % 5 | % Syntax 6 | % 7 | % publishtthelp2html 8 | % 9 | % Description 10 | % 11 | % HTML files for the documentation of TopoToolbox are published from 12 | % mlx-files that reside in the mlxfiles-directory. This function 13 | % publishes and overwrites all HTML-files. 14 | % 15 | % See also: publish 16 | % 17 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 18 | % Date: 8. November, 2017 19 | 20 | % determine the location of this function 21 | fileloc = which('publishtthelp2html.m'); 22 | docdir = fileparts(fileloc); 23 | 24 | % list all mlx files 25 | files = dir(fullfile(docdir,'mlxfiles/*.mlx')); 26 | 27 | [~,~] = mkdir(fullfile(docdir,"html")); 28 | 29 | % h = waitbar(0,'Please wait'); 30 | 31 | % and publish them 32 | for r = 1:numel(files) 33 | disp(['Exporting ' files(r).name]); 34 | [~,name,~] = fileparts(files(r).name); 35 | export(fullfile(docdir,'mlxfiles',files(r).name), ... 36 | fullfile(docdir,'html',name), ... 37 | Format="html", Run=true); 38 | end 39 | 40 | % Copy the helptoc.xml file 41 | copyfile(fullfile(docdir,"helptoc.xml"),fullfile(docdir,"html")); 42 | 43 | % Build the search database for the documentation files 44 | builddocsearchdb(fullfile(docdir,'html')); -------------------------------------------------------------------------------- /bindings/tt_fillsinks.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tt_fillsinks.c 4 | 5 | */ 6 | 7 | #include "matrix.h" 8 | #include "mex.h" 9 | #include "topotoolbox.h" 10 | 11 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { 12 | // INPUTS: DEM, bc 13 | // OUTPUTS: DEMF 14 | if (nrhs != 2) { 15 | mexErrMsgIdAndTxt("tt3:tt_fillsinks:nrhs", "Two inputs required"); 16 | } 17 | if (nlhs != 1) { 18 | mexErrMsgIdAndTxt("tt3:tt_fillsinks:nlhs", "One output required"); 19 | } 20 | 21 | const mxArray *demArray = prhs[0]; 22 | float *dem = mxGetSingles(demArray); 23 | 24 | const mxArray *bcArray = prhs[1]; 25 | uint8_t *bc = mxGetUint8s(prhs[1]); 26 | 27 | ptrdiff_t dims[2]; 28 | dims[0] = mxGetM(demArray); 29 | dims[1] = mxGetN(demArray); 30 | 31 | // Null pointer checks are not needed because out-of-memory errors 32 | // will terminate the MEX function. 33 | plhs[0] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 34 | float *out = mxGetSingles(plhs[0]); 35 | 36 | // Allocate the intermediate array for the FIFO queue used by the hybrid 37 | // algorithm 38 | mxArray *queueArray = 39 | mxCreateNumericMatrix(dims[0], dims[1], mxINT64_CLASS, mxREAL); 40 | ptrdiff_t *queue = (ptrdiff_t *)mxGetInt64s(queueArray); 41 | 42 | fillsinks_hybrid(out, queue, dem, bc, dims); 43 | 44 | mxDestroyArray(queueArray); 45 | } 46 | -------------------------------------------------------------------------------- /toolbox/graphics/exaggerate.m: -------------------------------------------------------------------------------- 1 | function exaggerate(axes_handle,exagfactor) 2 | 3 | %EXAGGERATE Elevation exaggeration in a 3D surface plot 4 | % 5 | % Syntax 6 | % 7 | % exaggerate(axes_handle,exagfactor) 8 | % 9 | % Description 10 | % 11 | % exaggerate first sets the same data lengths for each axis (i.e., 12 | % dataaspectration = [1 1 1]) and then applies a different scaling to 13 | % the z-axis, so that the dataaspectratio = [1 1 1/exagfactor]. 14 | % 15 | % Thus, exaggerate is a simple wrapper for calling set(gca...). It 16 | % controls the data aspect ratio in a 3D plot and enables elevation 17 | % exaggeration. 18 | % 19 | % Input 20 | % 21 | % axes_handle digital elevation model 22 | % exagfactor exaggeration factor (default = 1) 23 | % 24 | % Example 25 | % 26 | % load exampledem 27 | % for r = 1:4; 28 | % subplot(2,2,r); 29 | % surf(X,Y,dem); exaggerate(gca,r); 30 | % title(['exaggeration factor = ' num2str(r)]); 31 | % end 32 | % 33 | % See also: GRIDobj/SURF, exaggerate, GRIDobj/imageschs 34 | % 35 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 36 | % Date: 4. November 2025 37 | 38 | arguments 39 | axes_handle {mustBeA(axes_handle,'matlab.graphics.axis.Axes')} = gca 40 | exagfactor (1,1) {mustBeNumeric,mustBePositive} = 1 41 | end 42 | 43 | axis(axes_handle,'image'); 44 | set(axes_handle,'DataAspectRatio',[1 1 1/exagfactor]); 45 | 46 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/removesmallfractions.m: -------------------------------------------------------------------------------- 1 | function FD = removesmallfractions(FD,minfrac) 2 | 3 | %removesmallfractions Remove links with small fractions in FLOWobj 4 | % 5 | % Syntax 6 | % 7 | % FD = removesmallfractions(FD,minfrac) 8 | % 9 | % Description 10 | % 11 | % The function removes links in a FLOWobj where fractions indicate only 12 | % a small transfer amount to neighboring pixels. The operation makes 13 | % flow less dispersive. 14 | % 15 | % Input arguments 16 | % 17 | % FD FLOWobj 18 | % minfrac positive scalar indicating the minimum fraction to remain 19 | % in the FLOWobj (must be less than 1/8). 20 | % 21 | % Output arguments 22 | % 23 | % FD FLOWobj 24 | % 25 | % Example 26 | % 27 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 28 | % DEM = filter(DEM); 29 | % C = curvature(DEM,'planc'); 30 | % imageschs(DEM,C,'percentclip',0.1) 31 | % 32 | % See also: FLOWobj/multi_normalize, FLOWobj/randomize 33 | % 34 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 35 | % Date: 2. January, 2025 36 | 37 | arguments 38 | FD FLOWobj 39 | minfrac (1,1) {mustBeLessThan(minfrac,0.1250),mustBePositive} = 0.1 40 | end 41 | 42 | switch FD.type 43 | case 'single' 44 | return 45 | end 46 | 47 | I = FD.fraction <= minfrac; 48 | FD.ix(I) = []; 49 | FD.ixc(I) = []; 50 | FD.fraction(I) = []; 51 | FD = multi_normalize(FD); 52 | 53 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/updatetoposort.m: -------------------------------------------------------------------------------- 1 | function FD = updatetoposort(FD) 2 | 3 | %UPDATETOPOSORT Update topological sorting 4 | % 5 | % Syntax 6 | % 7 | % FDu = updatetoposort(FD) 8 | % 9 | % Description 10 | % 11 | % updatetoposort topologically sorts edges in a FLOWobj. This may be 12 | % necessary if edge vectors were manipulated. 13 | % 14 | % Input arguments 15 | % 16 | % FD FLOWobj 17 | % 18 | % Output arguments 19 | % 20 | % FDu updated FLOWobj 21 | % 22 | % 23 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 24 | % Date: 21. March, 2024 25 | 26 | switch FD.type 27 | case 'single' 28 | nr= prod(FD.size); 29 | D = digraph(FD.ix,FD.ixc); 30 | p = toposort(D); 31 | 32 | IX = zeros(nr,1,'uint32'); 33 | IX(FD.ix) = FD.ix; 34 | IXC = zeros(nr,1,'uint32'); 35 | IXC(FD.ix) = FD.ixc; 36 | 37 | p = p(:); 38 | IX = IX(p); 39 | IXC = IXC(p); 40 | IX = nonzeros(IX); 41 | IXC = nonzeros(IXC); 42 | FD.ix = uint32(IX(:)); 43 | FD.ixc = uint32(IXC(:)); 44 | 45 | case 'multi' 46 | 47 | G = digraph(FD.ix,FD.ixc); 48 | p = toposort(G); 49 | clear G 50 | M = FLOWobj2M(FD); 51 | [FD.ix,FD.ixc,FD.fraction] = find(M(p,p)); 52 | 53 | p = p(:); 54 | FD.ixc = uint32(p(FD.ixc)); 55 | FD.ix = uint32(p(FD.ix)); 56 | 57 | end 58 | 59 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/plot3d.m: -------------------------------------------------------------------------------- 1 | function h = plot3d(S,DEM) 2 | 3 | %PLOT3D 3D plot of a stream network 4 | % 5 | % Syntax 6 | % 7 | % plot3d(S,DEM) 8 | % h = plot3d(S,DEM) 9 | % 10 | % Description 11 | % 12 | % This function plots a 3D view of the stream network. 13 | % 14 | % Input arguments 15 | % 16 | % S stream network (STREAMobj) 17 | % DEM digital elevation model (GRIDobj) from which the stream network 18 | % was derived. 19 | % 20 | % Output arguments 21 | % 22 | % h patch handle 23 | % 24 | % Example 25 | % 26 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 27 | % FD = FLOWobj(DEM,'preprocess','carve'); 28 | % S = STREAMobj(FD,'minarea',1000); 29 | % S = klargestconncomps(S); 30 | % plot3d(S,DEM) 31 | % 32 | % See also: STREAMobj, STREAMobj/plot, STREAMobj/plotdz, STREAMobj/plot3 33 | % 34 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 35 | % Date: 3. July, 2024 36 | 37 | 38 | [x,y,z] = STREAMobj2XY(S,DEM); 39 | 40 | baselevel = min(z); 41 | baselevel = repmat(baselevel,size(z)); 42 | baselevel(isnan(z)) = nan; 43 | 44 | n = numel(z); 45 | 46 | x = [x;x]; 47 | y = [y;y]; 48 | z = [z;baselevel]; 49 | 50 | % create triangles 51 | TIN = [bsxfun(@plus,(1:n)',[0 n n+1]);bsxfun(@plus,(1:n)',[0 n+1 1])]; 52 | TIN(any(TIN>size(x,1),2),:) = []; 53 | I = any(isnan(z(TIN)),2); 54 | TIN(I,:) = []; 55 | 56 | htemp = trisurf(TIN,x,y,z); 57 | shading interp 58 | 59 | if nargout == 1 60 | h = htemp; 61 | end 62 | -------------------------------------------------------------------------------- /toolbox/@PPS/extendednetwork.m: -------------------------------------------------------------------------------- 1 | function [G,p,pback] = extendednetwork(P,varargin) 2 | %EXTENTEDNETWORK Extend network to account for duplicate points 3 | % 4 | % Syntax 5 | % 6 | % [G,p,pback] = extendednetwork(P) 7 | % 8 | % Description 9 | % 10 | % extendednetwork creates a modified graph of the stream network stored 11 | % in a PPS object so that there are no duplicate points. 12 | % 13 | % Input arguments 14 | % 15 | % P instance of PPS 16 | % 17 | % Output arguments 18 | % 19 | % G instance of graph 20 | % p index of points in G 21 | % pback index to map points back to P 22 | % 23 | % 24 | % See also: PPS 25 | % 26 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 27 | % Date: 11. February, 2019 28 | 29 | dummydist = P.S.cellsize/10; 30 | 31 | d = nodedistance(P); 32 | 33 | if ~hasduplicates(P) 34 | G = graph(S.ix,S.ixc,d); 35 | return 36 | end 37 | 38 | [Pun,a,locb] = removeduplicates(P); 39 | 40 | % count duplicates 41 | ndup = sum(cellfun(@length,locb)); 42 | 43 | % common node 44 | 45 | G = graph(P.S.ix,P.S.ixc,d); 46 | n = numnodes(G); 47 | G = addnode(G,ndup); 48 | 49 | neigh = Pun.PP; 50 | stw = cellfun(@(s,t) [s(:) repmat(t,numel(s),1) repmat(dummydist,numel(s),1)],... 51 | locb,num2cell(neigh),'UniformOutput',false); 52 | stw = vertcat(stw{:}); 53 | s = n+1:n+ndup; 54 | s = s(:); 55 | 56 | G = addedge(G,s,stw(:,2),stw(:,3)); 57 | 58 | p = [Pun.PP;s]; 59 | pback = [a;stw(:,1)]; 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/mustBeGRIDobjOrNalOrEmpty.m: -------------------------------------------------------------------------------- 1 | function mustBeGRIDobjOrNalOrEmpty(x,S) 2 | 3 | %mustBeGRIDobjOrNalOrEmpty Validate that value is GRIDobj, a valid nal or empty 4 | % 5 | % Syntax 6 | % 7 | % mustBeGRIDobjOrNalOrEmpty(x,S) 8 | % 9 | % Description 10 | % 11 | % The function validates that a value x is a GRIDobj or node-attribute 12 | % list that is aligned with a STREAMobj S or PPS object. x can also be 13 | % empty. 14 | % 15 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 16 | % Date: 11. June, 2024 17 | 18 | if isa(S,'PPS') 19 | S = S.S; 20 | end 21 | 22 | if isa(x,'GRIDobj') 23 | TF = isequal(S.size,x.size) && isequal(S.wf,x.wf); 24 | if ~TF 25 | error('TopoToolbox:incorrectinput',... 26 | ['STREAMobj and GRIDobj do not align each other. Make sure that \n' ... 27 | 'both instances have the same spatial reference. Both variables \n' ... 28 | 'are deemed to have the same reference if their properties ''size'' \n' ... 29 | 'and ''wf'' are both equal.']); 30 | 31 | end 32 | else 33 | 34 | TF = isnal(S,x) || isempty(x); 35 | if ~TF 36 | nnodes = numel(S.x); 37 | error('TopoToolbox:incorrectinput',... 38 | ['Input is not a valid node-attribute list of the supplied \n' ... 39 | 'STREAMobj. To be valid, the input must be a column vector \n' ... 40 | 'with ' num2str(nnodes) ' elements.']); 41 | 42 | end 43 | 44 | end 45 | -------------------------------------------------------------------------------- /toolbox/internal/validationFcns/mustBeGRIDobjOrNalOrScalar.m: -------------------------------------------------------------------------------- 1 | function mustBeGRIDobjOrNalOrScalar(x,S) 2 | 3 | %mustBeGRIDobjOrNalOrScalar Validate that value is GRIDobj, a valid nal or scalar 4 | % 5 | % Syntax 6 | % 7 | % mustBeGRIDobjOrNalOrScalar(x,S) 8 | % 9 | % Description 10 | % 11 | % The function validates that a value x is a GRIDobj or node-attribute 12 | % list that is aligned with a STREAMobj S or PPS object. x can also be 13 | % a scalar. 14 | % 15 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 16 | % Date: 10. November, 2024 17 | 18 | if isa(S,'PPS') 19 | S = S.S; 20 | end 21 | 22 | if isa(x,'GRIDobj') 23 | TF = isequal(S.size,x.size) && isequal(S.wf,x.wf); 24 | if ~TF 25 | error('TopoToolbox:incorrectinput',... 26 | ['STREAMobj and GRIDobj do not align each other. Make sure that \n' ... 27 | 'both instances have the same spatial reference. Both variables \n' ... 28 | 'are deemed to have the same reference if their properties ''size'' \n' ... 29 | 'and ''wf'' are both equal.']); 30 | 31 | end 32 | else 33 | 34 | TF = isnal(S,x) || isscalar(x); 35 | if ~TF 36 | nnodes = numel(S.x); 37 | error('TopoToolbox:incorrectinput',... 38 | ['Input is not a valid node-attribute list of the supplied \n' ... 39 | 'STREAMobj. To be valid, the input must be a column vector \n' ... 40 | 'with ' num2str(nnodes) ' elements.']); 41 | 42 | end 43 | 44 | end 45 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/getcoordinates.m: -------------------------------------------------------------------------------- 1 | function [x,y] = getcoordinates(DEM,type) 2 | 3 | %GETCOORDINATES get coordinate vectors of an instance of GRIDobj 4 | % 5 | % Syntax 6 | % 7 | % [x,y] = getcoordinates(DEM) 8 | % [x,y] = getcoordinates(DEM,type) 9 | % 10 | % Input arguments 11 | % 12 | % DEM grid (class: GRIDobj) 13 | % 14 | % Output arguments 15 | % 16 | % x coordinate vector in x direction (row vector) 17 | % y coordinate vector in y direction (column vector) 18 | % type 'vector' (default). Alternatively, you can return coordinate 19 | % matrices ('matrix') or GRIDobjs ('GRIDobj') 20 | % Example 21 | % 22 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 23 | % [x,y] = getcoordinates(DEM); 24 | % surf(x,y,double(DEM.Z)) 25 | % axis image; shading interp; camlight 26 | % 27 | % 28 | % 29 | % See also: GRIDobj2mat 30 | % 31 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 32 | % Date: 17. September, 2018 33 | 34 | [x,y] = wf2XY(DEM.wf,DEM.size); 35 | 36 | if nargin == 1 37 | type = 'vector'; 38 | else 39 | type = validatestring(type,{'vector','matrix','GRIDobj'}); 40 | end 41 | 42 | switch type 43 | case 'vector' 44 | x = x(:)'; 45 | y = y(:); 46 | case 'matrix' 47 | [x,y] = meshgrid(x,y); 48 | case 'GRIDobj' 49 | [x,y] = meshgrid(x,y); 50 | X = GRIDobj(DEM); 51 | X.Z = x; 52 | Y = GRIDobj(DEM); 53 | Y.Z = y; 54 | x = X; 55 | y = Y; 56 | end -------------------------------------------------------------------------------- /bindings/tt_hillshade.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tt_hillshade.c 4 | 5 | */ 6 | 7 | #include "matrix.h" 8 | #include "mex.h" 9 | #include "topotoolbox.h" 10 | 11 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { 12 | // INPUTS: DEM, azimuth, altitude, cs 13 | // OUTPUTS: Hillshade, dx, dy 14 | if (nrhs != 4) { 15 | mexErrMsgIdAndTxt("tt3:tt_hillshade:nrhs", "Four inputs required"); 16 | } 17 | if (nlhs != 3) { 18 | mexErrMsgIdAndTxt("tt3:tt_hillshade:nlhs", "Three output required"); 19 | } 20 | 21 | const mxArray *demArray = prhs[0]; 22 | float *dem = mxGetSingles(demArray); 23 | 24 | double azimuth = mxGetScalar(prhs[1]); 25 | double altitude = mxGetScalar(prhs[2]); 26 | double cellsize = mxGetScalar(prhs[3]); 27 | 28 | ptrdiff_t dims[2]; 29 | dims[0] = mxGetM(demArray); 30 | dims[1] = mxGetN(demArray); 31 | 32 | // Null pointer checks are not needed because out-of-memory errors 33 | // will terminate the MEX function. 34 | plhs[0] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 35 | float *output = mxGetSingles(plhs[0]); 36 | 37 | plhs[1] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 38 | float *dx = mxGetSingles(plhs[1]); 39 | 40 | plhs[2] = mxCreateNumericMatrix(dims[0], dims[1], mxSINGLE_CLASS, mxREAL); 41 | float *dy = mxGetSingles(plhs[2]); 42 | 43 | // Converted to float to avoid compiler warnings 44 | hillshade(output, dx, dy, dem, (float) azimuth, (float) altitude, (float) cellsize, dims); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/cellarea.m: -------------------------------------------------------------------------------- 1 | function CA = cellarea(DEM) 2 | 3 | %CELLAREA Calculate cell areas of a GRIDobj in geographic coordinate system 4 | % 5 | % Syntax 6 | % 7 | % CA = cellarea(DEM) 8 | % 9 | % Description 10 | % 11 | % cellarea returns the area for each cell in the DEM with a geographic 12 | % coordinate system (requires the mapping toolbox). DEM must have a 13 | % geographic coordinate system. 14 | % 15 | % Input arguments 16 | % 17 | % DEM GRIDobj 18 | % 19 | % Output arguments 20 | % 21 | % CA cell areas (GRIDobj) in m^2. 22 | % 23 | % See also: GRIDobj/isGeographic, GRIDobj/isProjected 24 | % 25 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 26 | % Date: 3. June, 2024 27 | 28 | arguments 29 | DEM GRIDobj 30 | end 31 | 32 | if isProjected(DEM) 33 | error("DEM must have a geographic coordinate system.") 34 | end 35 | 36 | if isGeographic(DEM) 37 | % There is a geocellreference or geopostingsreference 38 | unit = DEM.georef.GeographicCRS.Spheroid.LengthUnit; 39 | unit = validatestring(unit,{'meter','kilometer'}); 40 | [~,ca] = areamat(true(DEM.size),DEM.georef); 41 | total_surface_area = 1; 42 | switch unit 43 | case 'kilometer' 44 | scale = 1e-6; 45 | otherwise 46 | scale = 1; 47 | end 48 | else 49 | error('DEM must have a geographic coordinate system.') 50 | end 51 | 52 | ca = total_surface_area * ca * scale; 53 | 54 | CA = DEM; 55 | CA.Z = repmat(ca,1,DEM.size(2)); 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/cummaxupstream.m: -------------------------------------------------------------------------------- 1 | function z = cummaxupstream(S,z,cl) 2 | 3 | %CUMMAXUPSTREAM Cumulative maximum in upstream direction 4 | % 5 | % Syntax 6 | % 7 | % zm = cummaxupstream(S,DEM) 8 | % zm = cummaxupstream(S,z) 9 | % zm = cummaxupstream(S,z,class) 10 | % 11 | % Description 12 | % 13 | % CUMMAXUPSTREAM calculates the cumulative maximum in upstream 14 | % direction. A value in zm will have the maximum value of its 15 | % downstream pixels in DEM or z. 16 | % 17 | % Input arguments 18 | % 19 | % S STREAMobj 20 | % DEM GRIDobj 21 | % z node-attribute list 22 | % class Output class. Default is 'same' (see ezgetnal). 23 | % 24 | % Output arguments 25 | % 26 | % zm node-attribute list 27 | % 28 | % Example 29 | % 30 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 31 | % FD = FLOWobj(DEM,'preprocess','carve'); 32 | % S = STREAMobj(FD,'minarea',1000); 33 | % S = klargestconncomps(S); 34 | % S = trunk(S); 35 | % zm = cummaxupstream(S,DEM); 36 | % plotdz(S,DEM) 37 | % hold on 38 | % plotdz(S,zm) 39 | % hold off 40 | % 41 | % See also: STREAMobj/imposemin, cummax 42 | % 43 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 44 | % Date: 7. March, 2025 45 | 46 | arguments 47 | S STREAMobj 48 | z {mustBeGRIDobjOrNal(z,S)} 49 | cl = 'same' 50 | end 51 | 52 | z = ezgetnal(S,z,cl); 53 | 54 | ix = S.ix; 55 | ixc = S.ixc; 56 | for r = numel(ix):-1:1 57 | z(ix(r)) = max(z(ixc(r)),z(ix(r))); 58 | end 59 | 60 | -------------------------------------------------------------------------------- /toolbox/@SWATHobj/convert2latlon.m: -------------------------------------------------------------------------------- 1 | function [OUT] = convert2latlon(SW) 2 | %CONVERT2LATLON converts spatial fields in SWATHobj to lat,lon 3 | % 4 | % Requires the Mapping Toolbox 5 | % 6 | % Syntax 7 | % 8 | % OUT = convert2latlon(SW) 9 | % 10 | % Description 11 | % 12 | % CONVERT2LATLON uses the mapping toolbox to convert all spatial fields 13 | % in the SWATHobj SW to geographic coordinates (latitude, longitude). 14 | % Note that the field 'georef' is not updated to the geographic 15 | % coordinate system, but simply deleted. This still needs to be done... 16 | % 17 | % Input arguments 18 | % 19 | % SW instance of SWATHobj 20 | % 21 | % Output arguments 22 | % 23 | % OUT instance of SWATHobj 24 | % 25 | % Examples 26 | % 27 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 28 | % SW = SWATHobj(DEM) 29 | % SW2 = convert2latlon(SW) 30 | % 31 | % 32 | % Author: Dirk Scherler (scherler[at]gfz-potsdam.de) 33 | % Date: 19 July, 2024 34 | 35 | 36 | OUT = SW; 37 | 38 | for i = 1 : length(SW.xy0) 39 | % convert swath data to lat,lon using projinv 40 | [lat0,lon0] = projinv(SW.georef.ProjectedCRS,SW.xy0(:,1),SW.xy0(:,2)); 41 | OUT.xy0 = [lon0,lat0]; 42 | 43 | [lat,lon] = projinv(SW.georef.ProjectedCRS,SW.xy(:,1),SW.xy(:,2)); 44 | OUT.xy = [lon,lat]; 45 | 46 | ix = find(SW.X); 47 | [LAT,LON] = projinv(SW.georef.ProjectedCRS,SW.X(ix),SW.Y(ix)); 48 | OUT.X(ix) = LON(ix); 49 | OUT.Y(ix) = LAT(ix); 50 | end 51 | 52 | % still need to change georef! 53 | OUT.georef = []; 54 | 55 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/dependencemap_mex.c: -------------------------------------------------------------------------------- 1 | // file: dependencemap_mex.c 2 | // dependendence map using the FlowDirObj class 3 | // 4 | // input arguments 5 | // ix, ixc, siz, ixs 6 | #include "mex.h" 7 | #include "matrix.h" 8 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 9 | { 10 | mwSize numel, nixs; // use mwIndex 11 | mwIndex index, ix, ixc, ixs; 12 | uint32_T *ixp; 13 | uint32_T *ixcp; 14 | double *ixsp; 15 | mxLogical *D; 16 | double *siz; 17 | 18 | if( nrhs > 4 || nlhs > 1 ) { 19 | mexErrMsgTxt("Need 4 inputs and no more than 1 output"); 20 | } 21 | 22 | ixp = mxGetData(prhs[0]); 23 | ixcp = mxGetData(prhs[1]); 24 | siz = mxGetPr(prhs[2]); 25 | numel = mxGetNumberOfElements(prhs[0]); 26 | ixsp = mxGetPr(prhs[3]); 27 | nixs = mxGetNumberOfElements(prhs[3]); 28 | 29 | /* Create an m-by-n mxArray and either copy initial values into it or create a new one with ones*/ 30 | plhs[0] = mxCreateLogicalMatrix((mwSize) siz[0],(mwSize) siz[1]); 31 | /* pointer into drainage basins*/ 32 | D = mxGetLogicals(plhs[0]); 33 | for( index = 0; index < nixs; index++) { 34 | D[(mwIndex) *ixsp -1] = true; 35 | ixsp++; 36 | } 37 | 38 | /* set pointer to last element in index arrays */ 39 | ixp = ixp + numel; 40 | ixcp = ixcp + numel; 41 | 42 | for( index= 0; index<=numel; index++ ) { 43 | 44 | ix = (mwIndex) *ixp-- -1; 45 | ixc = (mwIndex) *ixcp-- -1; 46 | 47 | if (D[ixc]) { 48 | D[ix] = D[ixc]; 49 | } 50 | } 51 | return; 52 | } -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/flowacc_mex.c: -------------------------------------------------------------------------------- 1 | // file: flowacc_mex.c 2 | // flow accumulation using the FlowDirObj class 3 | #include "mex.h" 4 | #include "matrix.h" 5 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 6 | { 7 | mwSize numel, numelW0, ncol, nrow; // use mwIndex 8 | mwIndex index, ix, ixc; 9 | uint32_T *ixp; 10 | uint32_T *ixcp; 11 | double *Ap; 12 | double *W0p; 13 | 14 | if( nrhs > 3 || nlhs > 1 ) { 15 | mexErrMsgTxt("Need 3 inputs and no more than 1 output"); 16 | } 17 | 18 | ixp = (uint32_T*) mxGetData(prhs[0]); //int* 19 | ixcp = (uint32_T*) mxGetData(prhs[1]); //int* 20 | W0p = mxGetPr(prhs[2]); 21 | numel = mxGetNumberOfElements(prhs[0]); 22 | numelW0 = mxGetNumberOfElements(prhs[2]); 23 | 24 | /* Create an m-by-n mxArray and either copy initial values into it or create a new one with ones*/ 25 | if(numelW0==2) { 26 | 27 | plhs[0] = mxCreateDoubleMatrix((mwSize) W0p[0],(mwSize) W0p[1], mxREAL); 28 | Ap = mxGetPr(plhs[0]); 29 | for(index = 0; index<(W0p[0]*W0p[1]); index++) { 30 | Ap[index] = 1; 31 | } 32 | } else { 33 | ncol = mxGetN(prhs[2]); 34 | nrow = mxGetM(prhs[2]); 35 | plhs[0] = mxCreateDoubleMatrix(nrow,ncol, mxREAL); 36 | Ap = mxGetPr(plhs[0]); 37 | for(index = 0; index=0 & ~isinf(TIME.Z) & ~isnan(TIME.Z)); 36 | % Generate arrays of flow time and amplitude 37 | timevec=TIME.Z(ind); 38 | amplitudevec=P.Z(ind).*TIME.cellsize; 39 | % Generate array of edges and bins for a temporal histogram 40 | tedges=[0:DT:max(timevec)+DT]; 41 | tbins=(tedges(2:end)+tedges(1:end-1))./2; 42 | % Compute an histogram of flow times 43 | [~, ~, ibin] = histcounts(timevec, tedges); 44 | % Accumulate discharge for each interval 45 | Q = accumarray(ibin, amplitudevec); 46 | 47 | %% Prepare Output 48 | % Array of discharge 49 | OUT1=Q; 50 | % Array of time 51 | OUT2=tbins; -------------------------------------------------------------------------------- /toolbox/@PPS/plotc.m: -------------------------------------------------------------------------------- 1 | function [hl,hp] = plotc(P,cova,varargin) 2 | 3 | %PLOTC Plot a colored stream network and points 4 | % 5 | % Syntax 6 | % 7 | % plotc(P,a) 8 | % plotc(P,nal) 9 | % [hl,hp] = plotc(...) 10 | % 11 | % Description 12 | % 13 | % plotc plots the planform stream network with additional coloring 14 | % obtained from a GRIDobj or a node attribute list. 15 | % 16 | % Input arguments 17 | % 18 | % P Instance of PPS 19 | % DEM GRIDobj 20 | % nal node attribute list 21 | % 22 | % Parameter name value pairs 23 | % 24 | % 'linewidth' Default = 1.5 25 | % 26 | % Output arguments 27 | % 28 | % hl handle to surface object 29 | % hp handle to points 30 | % 31 | % Example 32 | % 33 | % 34 | % 35 | % See also: PPS/plotc 36 | % 37 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 38 | % Date: 6. November, 2015 39 | 40 | p = inputParser; 41 | p.FunctionName = 'PPS/plotc'; 42 | addParameter(p,'linewidth',1.5); 43 | parse(p,varargin{:}); 44 | 45 | if nargin == 1 46 | cova = P.S.distance; 47 | else 48 | cova = getcovariate(P,cova); 49 | end 50 | 51 | [x,y,c] = STREAMobj2XY(P.S,cova); 52 | 53 | z = x*0; 54 | ht = surface([x x],[y y],[z z],[c c],... 55 | 'facecolor','none',... 56 | 'edgecolor','flat',... 57 | 'linewidth',p.Results.linewidth); 58 | if nargout >= 1 59 | hl = ht; 60 | end 61 | 62 | if ishold 63 | keephold = true; 64 | else 65 | keephold = false; 66 | end 67 | 68 | hold on 69 | hp = plotpoints(P); 70 | 71 | if ~keephold 72 | hold off 73 | end 74 | 75 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/private/drainagebasins_mex.c: -------------------------------------------------------------------------------- 1 | // file: drainagebasins_mex.c 2 | // drainage basin delineation using the FlowDirObj class 3 | #include "mex.h" 4 | #include "matrix.h" 5 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 6 | { 7 | mwSize numel; // use mwIndex 8 | mwIndex index, ix, ixc; 9 | uint32_T *ixp; 10 | uint32_T *ixcp; 11 | uint32_T DBcounter; 12 | uint32_T *D; 13 | double *siz; 14 | 15 | if( nrhs > 3 || nlhs > 1 ) { 16 | mexErrMsgTxt("Need 3 inputs and no more than 1 output"); 17 | } 18 | 19 | ixp = mxGetData(prhs[0]); 20 | ixcp = mxGetData(prhs[1]); 21 | siz = mxGetPr(prhs[2]); 22 | numel = mxGetNumberOfElements(prhs[0]); 23 | 24 | /* Create an m-by-n mxArray and either copy initial values into it or create a new one with zeros*/ 25 | // double precision 26 | // plhs[0] = mxCreateDoubleMatrix((mwSize) siz[0],(mwSize) siz[1], mxREAL); 27 | /* pointer into drainage basins*/ 28 | // D = mxGetPr(plhs[0]); 29 | 30 | // uint32 31 | plhs[0] = mxCreateNumericMatrix((mwSize) siz[0],(mwSize) siz[1], mxUINT32_CLASS, mxREAL); 32 | D = mxGetData(plhs[0]); 33 | 34 | /* set pointer to last element in index arrays */ 35 | ixp = ixp + numel; 36 | ixcp = ixcp + numel; 37 | DBcounter = 0; 38 | 39 | for( index= 0; index<=numel; index++ ) { 40 | 41 | ix = (mwIndex) *ixp-- -1; 42 | ixc = (mwIndex) *ixcp-- -1; 43 | 44 | if (D[ixc] == 0) { 45 | DBcounter = DBcounter + 1; 46 | D[ixc] = DBcounter; 47 | } 48 | 49 | D[ix] = D[ixc]; 50 | } 51 | 52 | return; 53 | } -------------------------------------------------------------------------------- /toolbox/compilemexfiles.m: -------------------------------------------------------------------------------- 1 | function compilemexfiles 2 | 3 | %COMPILEMEXFILES compile mex-functions that come with TopoToolbox 2 4 | % 5 | % Syntax 6 | % 7 | % compilemexfiles 8 | % 9 | % Description 10 | % 11 | % TopoToolbox 2 comes with a few mex-functions that have been 12 | % written in C and that must be compiled prior to usage. While all 13 | % functions have been written in plain m-code, the usage of 14 | % mex-functions enhances the speed at which some functions are 15 | % evaluated. compilemexfiles compiles all these files to run on your 16 | % system. Prior to running compilemexfiles run 17 | % 18 | % mex -setup 19 | % 20 | % and locate a compiler on your system. 21 | % 22 | % Available mex-functions 23 | % 24 | % All mex-functions are located in private directories 25 | % 26 | % @FLOWobj/private 27 | % dependencemap_mex.c 28 | % drainagebasins_mex.c 29 | % flowacc_mex.c 30 | % steepestneighbor_mex.c 31 | % tsort_mex.c 32 | % 33 | % Author: Wolfgang Schwanghart (w.schwanghart[at]geo.uni-potsdam.de) 34 | % Date: 30. January, 2013 35 | 36 | 37 | 38 | location = which('compilemexfiles'); 39 | [pathstr,~,~] = fileparts(location); 40 | 41 | newFolder = [pathstr filesep '@FLOWobj' filesep 'private']; 42 | oldFolder = cd(newFolder); 43 | 44 | files = dir('*.c'); 45 | 46 | try 47 | for r = 1:numel(files) 48 | funname = files(r).name; 49 | mex('-largeArrayDims',funname) 50 | % mex('-R2018a',funname) 51 | end 52 | catch err 53 | cd(oldFolder); 54 | rethrow(err) 55 | end 56 | cd(oldFolder); 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /toolbox/@GRIDobj/griddedcontour.m: -------------------------------------------------------------------------------- 1 | function C = griddedcontour(DEM,level,fourconn) 2 | 3 | %GRIDDEDCONTOUR plot contours on grid 4 | % 5 | % Syntax 6 | % 7 | % C = griddedcontour(DEM,n) 8 | % C = griddedcontour(DEM,levels) 9 | % C = griddedcontour(...,fourconn) 10 | % 11 | % Description 12 | % 13 | % griddedcontour wraps the function contour and approximates the lines 14 | % on a grid. 15 | % 16 | % Input arguments 17 | % 18 | % DEM grid (class: GRIDobj) 19 | % n number of contour levels 20 | % levels vector with levels (if only one specific level should be 21 | % returned, use [level level]). 22 | % fourconn true or false (default). If true, gridded contours will be 23 | % modified to be four-connected lines. 24 | % 25 | % Output arguments 26 | % 27 | % C instance of GRIDobj 28 | % 29 | % Example 30 | % 31 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 32 | % C = griddedcontour(DEM,[100:100:2000]); 33 | % imageschs(DEM,dilate(C,ones(3))); 34 | % 35 | % See also: GRIDobj, GRIDobj/imageschs, GRIDobj/contour 36 | % 37 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 38 | % Date: 3. June, 2024 39 | 40 | arguments 41 | DEM GRIDobj 42 | level {mustBeNumeric} 43 | fourconn = false 44 | end 45 | 46 | % Compute contour levels 47 | [x,y] = contour(DEM,level); 48 | 49 | C = GRIDobj(DEM,'logical'); 50 | C.name = 'griddedcontour'; 51 | 52 | I = ~isnan(x); 53 | 54 | C.Z(coord2ind(DEM,x(I),y(I))) = true; 55 | 56 | if nargin == 3 57 | if fourconn 58 | C.Z = bwmorph(C.Z,'diag'); 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /toolbox/GIStools/geotiffextent.m: -------------------------------------------------------------------------------- 1 | function geotiffextent(filename) 2 | 3 | %GEOTIFFEXTENT Plot extent of geotiffs in a folder 4 | % 5 | % Syntax 6 | % 7 | % geotiffextent(folder) 8 | % 9 | % Description 10 | % 11 | % This tiny tool takes a folder as input and returns a plot with 12 | % patches that indicate the extent of each geotiff in the folder. Note 13 | % that currently the function only reads the bounding box of each tif. 14 | % Thus, in order for the function to properly work, all tifs in the 15 | % directory should have the same coordinate system. 16 | % 17 | % Input arguments 18 | % 19 | % folder folder with tifs. 20 | % 21 | % Output arguments 22 | % 23 | % none 24 | % 25 | % 26 | % See also: GRIDobj, geotiffinfo 27 | % 28 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 29 | % Date: 26. February, 2025 30 | 31 | arguments 32 | filename = '.' 33 | end 34 | 35 | if isempty(filename) 36 | filename = '.'; 37 | end 38 | 39 | if isfolder(filename) 40 | files = dir([filename filesep '*.tif']); 41 | x = cell(size(files)); 42 | y = cell(size(files)); 43 | parfevalOnAll(gcp(), @warning, 0, 'off'); 44 | parfor r = 1:numel(files) 45 | info = geotiffinfo([files(r).folder filesep files(r).name]); 46 | xx = info.BoundingBox(:,1); 47 | yy = info.BoundingBox(:,2); 48 | x{r} = [xx(1) xx(2) xx(2) xx(1) xx(1)]'; 49 | y{r} = [yy(1) yy(1) yy(2) yy(2) yy(1)]'; 50 | end 51 | parfevalOnAll(gcp(), @warning, 0, 'on'); 52 | end 53 | 54 | X = horzcat(x{:}); 55 | Y = horzcat(y{:}); 56 | 57 | patch(X,Y,[.9 .9 .9]); 58 | 59 | -------------------------------------------------------------------------------- /toolbox/@FLOWobj/flowconvergence.m: -------------------------------------------------------------------------------- 1 | function N = flowconvergence(FD) 2 | 3 | %FLOWCONVERGENCE Compute flow convergence of a digital elevation model 4 | % 5 | % Syntax 6 | % 7 | % N = flowconvergence(FD) 8 | % 9 | % Description 10 | % 11 | % flowconvergence computes the number of neighboring cells that 12 | % drain into each cell. Values in N range between 0 on ridges to 8 in 13 | % pits. N can thus be used as a measure of local flow convergence in a 14 | % digital elevation model. 15 | % 16 | % Input 17 | % 18 | % FD flow direction (class: FLOWobj) 19 | % 20 | % Output 21 | % 22 | % N grid containing the sum of contributing neighbor cells. 23 | % (class: GRIDobj) 24 | % 25 | % Example 26 | % 27 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 28 | % FD = FLOWobj(DEM,'preprocess','c'); 29 | % C = flowconvergence(FD); 30 | % imageschs(DEM,C) 31 | % 32 | % See also: FLOWOBJ 33 | % 34 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 35 | % Date: 31. August, 2024 36 | 37 | 38 | % 4/3/2016: the function now makes copies of FD.ix and FD.ixc (see 39 | % FLOWobj/flowacc 40 | 41 | ix = FD.ix; 42 | ixc = FD.ixc; 43 | 44 | switch FD.type 45 | case 'single' 46 | nr = zeros(FD.size,'uint8'); 47 | for r = 1:numel(ix) 48 | nr(ixc(r)) = nr(ixc(r))+1; 49 | end 50 | case {'multi' 'Dinf'} 51 | fr = FD.fraction; 52 | nr = zeros(FD.size); 53 | for r = 1:numel(ix) 54 | nr(ixc(r)) = nr(ixc(r)) + fr(r); 55 | end 56 | end 57 | 58 | % Prepare output 59 | N = GRIDobj(FD,nr); 60 | N.name = 'flow convergence'; -------------------------------------------------------------------------------- /toolbox/@GRIDobj/imagesc.m: -------------------------------------------------------------------------------- 1 | function h = imagesc(DEM,varargin) 2 | 3 | %IMAGESC Scale data in GRIDobj and display as image object 4 | % 5 | % Syntax 6 | % 7 | % h = imagesc(DEM) 8 | % h = imagesc(DEM,'nanstransparent',true) 9 | % 10 | % Description 11 | % 12 | % This function overloads the built-in imagesc. In contrast to imagesc, 13 | % however, the function sets nans in the DEM to transparent. For 14 | % further information see the documentation of imagesc. 15 | % 16 | % Input arguments 17 | % 18 | % DEM GRIDobj 19 | % 20 | % Parameter name/value pairs 21 | % 22 | % 'nanstransparent' {true} or false: If true, nans in DEM are 23 | % displayed fully transparent 24 | % 25 | % Output arguments 26 | % 27 | % h handle to image object 28 | % 29 | % Example 30 | % 31 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 32 | % imagesc(DEM) 33 | % 34 | % See also: GRIDobj/imageschs 35 | % 36 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 37 | % Date: 11. July, 2025 38 | 39 | %% Update on 18. Feb 2022 40 | % nans in the data are set to transparent 41 | 42 | p = inputParser; 43 | p.KeepUnmatched = true; 44 | addParameter(p,'nanstransparent',true, @(x) isscalar(x)); 45 | parse(p,varargin{:}) 46 | 47 | [x,y] = wf2XY(DEM.wf,DEM.size); 48 | ht = imagesc(x,y,DEM.Z,p.Unmatched); 49 | 50 | axis xy 51 | axis image 52 | 53 | if p.Results.nanstransparent 54 | if isscalar(ht.AlphaData) 55 | ht.AlphaData = ~isnan(DEM.Z); 56 | else 57 | ht.AlphaData = ht.AlphaData .* (~isnan(DEM.Z)); 58 | end 59 | end 60 | 61 | if nargout == 1 62 | h = ht; 63 | end 64 | -------------------------------------------------------------------------------- /toolbox/@STREAMobj/zerobaselevel.m: -------------------------------------------------------------------------------- 1 | function [z,zbase] = zerobaselevel(S,DEM) 2 | 3 | %ZEROBASELEVEL Set base level of stream elevation to zero 4 | % 5 | % Syntax 6 | % 7 | % z0 = zerobaselevel(S,DEM) 8 | % z0 = zerobaselevel(S,z) 9 | % [z0,zb] = ... 10 | % 11 | % Description 12 | % 13 | % ZEROBASELEVEL returns a node-attribute list of elevation values where 14 | % all values are adjusted so that stream outlet elevations are zero. 15 | % 16 | % Input arguments 17 | % 18 | % S STREAMobj 19 | % DEM digital elevation model (GRIDobj) 20 | % z node-attribute list of elevation values 21 | % 22 | % Output arguments 23 | % 24 | % z0 node-attribute list of elevation values 25 | % zb node-attribute list with base level values. zb is calculated 26 | % by zb = z-z0 or zb = getnal(S,DEM)-z0. 27 | % 28 | % Example 29 | % 30 | % DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); 31 | % FD = FLOWobj(DEM); 32 | % S = STREAMobj(FD,'minarea',1e6,'unit','map'); 33 | % subplot(2,1,1) 34 | % plotdz(S,DEM); 35 | % z0 = zerobaselevel(S,DEM); 36 | % subplot(2,1,2) 37 | % plotdz(S,z0) 38 | % 39 | % See also: STREAMobj, STREAMobj/plotdz, STREAMobj/getnal 40 | % 41 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 42 | % Date: 14. June, 2024 43 | 44 | arguments 45 | S STREAMobj 46 | DEM {mustBeGRIDobjOrNal(DEM,S)} 47 | end 48 | 49 | % get node attribute list with elevation values 50 | z = ezgetnal(S,DEM); 51 | 52 | % set the base level of all streams to zero 53 | zbase = z; 54 | for r = numel(S.ixc):-1:1 55 | zbase(S.ix(r)) = zbase(S.ixc(r)); 56 | end 57 | z = z-zbase; -------------------------------------------------------------------------------- /toolbox/IOtools/hydrosheds2FLOWobj.m: -------------------------------------------------------------------------------- 1 | function FD = hydrosheds2FLOWobj(file) 2 | 3 | %HYDROSHEDS2FLOWOBJ Import Hydrosheds flow direction raster to FLOWobj 4 | % 5 | % Syntax 6 | % 7 | % FD = hydrosheds2FLOWobj(file) 8 | % FD = hydrosheds2FLOWobj(FLOWDIR) 9 | % 10 | % Description 11 | % 12 | % hydrosheds2FLOWobj converts hydroshed flow direction grids to a 13 | % FLOWobj. DEM and flow directions grids can be downloaded from here: 14 | % https://hydrosheds.cr.usgs.gov/ 15 | % 16 | % Input arguments 17 | % 18 | % file location of file and filename (char) 19 | % FLOWDIR GRIDobj with flow directions from hydrosheds 20 | % 21 | % Output arguments 22 | % 23 | % FD FLOWobj 24 | % 25 | % See also: FLOWobj, GRIDobj 26 | % 27 | % Author: Wolfgang Schwanghart (schwangh[at]uni-potsdam.de) 28 | % Date: 1. August, 2025 29 | 30 | if isa(file,'GRIDobj') 31 | FDIR = file; 32 | else 33 | warning off 34 | FDIR = GRIDobj(file); 35 | warning on 36 | end 37 | 38 | 39 | nr = prod(FDIR.size); 40 | wf = FDIR.wf; 41 | siz = FDIR.size; 42 | INAN = ~isnan(FDIR); 43 | 44 | IX = find(INAN.Z); 45 | GC = FDIR.Z(INAN.Z); 46 | 47 | clear FDIR 48 | clear INAN 49 | 50 | gc = 2.^(0:7); 51 | nrrows = siz(1); 52 | offsets = [nrrows nrrows+1 1 -nrrows+1 -nrrows -nrrows-1 -1 nrrows-1]; 53 | 54 | ix = []; 55 | ixc = []; 56 | 57 | for r = 1:numel(gc) 58 | I = GC == gc(r); 59 | ix = [ix;IX(I)]; 60 | ixc = [ixc;IX(I)+offsets(r)]; 61 | end 62 | clear GC IX I 63 | 64 | M = sparse(ix,ixc,true,nr,nr); 65 | clear ix ixc 66 | FD = FLOWobj(M,'wf',wf,'size',siz,'algorithm','toposort','cellsize',wf2cellsize(wf)); 67 | 68 | --------------------------------------------------------------------------------