├── .gitignore ├── CITATION.cff ├── LICENSE ├── README.md ├── bld.bat ├── build.sh ├── docs ├── .buildinfo ├── .nojekyll ├── Makefile ├── _images │ ├── birch_crop.png │ ├── neches_topo_crop.jpg │ └── yukon_crop.png ├── _sources │ ├── index.rst.txt │ ├── installation.rst.txt │ ├── quickstart.rst.txt │ ├── remindex.rst.txt │ └── vizindex.rst.txt ├── _static │ ├── basic.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.js.LICENSE.txt │ │ ├── bootstrap.js.map │ │ ├── fontawesome.js │ │ ├── fontawesome.js.LICENSE.txt │ │ ├── fontawesome.js.map │ │ ├── pydata-sphinx-theme.js │ │ └── pydata-sphinx-theme.js.map │ ├── searchtools.js │ ├── sphinx_highlight.js │ ├── styles │ │ ├── pydata-sphinx-theme.css │ │ ├── pydata-sphinx-theme.css.map │ │ └── theme.css │ ├── vendor │ │ └── fontawesome │ │ │ └── webfonts │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.ttf │ │ │ └── fa-solid-900.woff2 │ └── webpack-macros.html ├── genindex.html ├── index.html ├── installation.html ├── make.bat ├── objects.inv ├── py-modindex.html ├── quickstart.html ├── remindex.html ├── search.html ├── searchindex.js ├── source │ ├── conf.py │ ├── index.rst │ ├── installation.rst │ ├── quickstart.rst │ ├── remindex.rst │ └── vizindex.rst └── vizindex.html ├── environment.yml ├── meta.yaml ├── riverrem ├── REMMaker.py ├── RasterViz.py └── __init__.py ├── setup.py └── tests ├── smith_SRTM.tif ├── test_local.py └── test_url.py /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | cache/ 3 | riverrem/.osm_cache/ 4 | __pycache__/ 5 | venv/ 6 | test_dems/ 7 | *.tif 8 | *.kmz 9 | *.aux.xml 10 | *.dbf 11 | *.shp 12 | *.shx 13 | *.prj -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.0.0 2 | message: "If you use this software, please cite it as below." 3 | authors: 4 | - family-names: "Larrieu" 5 | given-names: "Kenneth" 6 | orcid: "https://orcid.org/0000-0003-1706-3879" 7 | title: "RiverREM" 8 | version: 1.1.0 9 | date-released: 2022-08-13 10 | url: "https://github.com/OpenTopography/RiverREM" 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![NSF-1948997](https://img.shields.io/badge/NSF-1948997-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1948997) [![NSF-1948994](https://img.shields.io/badge/NSF-1948994-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1948994) [![NSF-1948857](https://img.shields.io/badge/NSF-1948857-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1948857) 2 | 3 | [![Conda](https://img.shields.io/conda/v/conda-forge/riverrem?color=success)](https://anaconda.org/conda-forge/riverrem) [![Conda](https://img.shields.io/conda/dn/conda-forge/riverrem?color=success)](https://anaconda.org/conda-forge/riverrem) 4 | 5 | # RiverREM 6 | 7 | RiverREM is a Python package for automatically generating river relative elevation model (REM) visualizations from nothing but an input digital elevation model (DEM). The package uses the OpenStreetMap API to retrieve river centerline geometries over the DEM extent. Interpolation of river elevations is automatically handled using a sampling scheme based on raster resolution and river sinuosity to create striking high-resolution visualizations without interpolation artefacts straight out of the box and without additional manual steps. The package also contains a helper class for creating DEM raster visualizations. See the [documentation](https://opentopography.github.io/RiverREM/) pages for more details. 8 | 9 | For more information on REMs and this project see [this OpenTopography blog post](https://opentopography.org/blog/new-package-automates-river-relative-elevation-model-rem-generation). 10 | 11 | ![neches_REM](docs/_images/neches_topo_crop.jpg) 12 | 13 | ## Installation 14 | 15 | ### Install method 1 (recommended): New environment with conda/mamba 16 | 17 | Make a new Python environment with RiverREM installed: 18 | 19 | ```bash 20 | conda create -n rem_env riverrem 21 | ``` 22 | 23 | The above command creates a new Python environment named `rem_env` with the `riverrem` package installed. 24 | 25 | > [!NOTE] 26 | > [`mamba`](https://github.com/conda-forge/miniforge/releases/latest) is recommended over `conda` or `pip` as it is able to solve environment dependencies quickly and robustly. If you are using `mamba`, replace `conda` with `mamba` in the above command. 27 | 28 | The environment can then be activated: 29 | 30 | ```bash 31 | conda activate rem_env 32 | ``` 33 | 34 | Alternatively, the environment can be linked to an IDE like PyCharm. 35 | 36 | 37 | ### Install method 2: Existing environment 38 | 39 | Install via conda/mamba: 40 | 41 | ```bash 42 | conda install -c conda-forge riverrem 43 | ``` 44 | 45 | ### Install method 3: Repository clone 46 | 47 | Clone this repo and create a conda environment from the `environment.yml`: 48 | 49 | ```bash 50 | git clone https://github.com/opentopography/RiverREM.git 51 | cd RiverREM 52 | conda env create -n rem_env --file environment.yml 53 | ``` 54 | 55 | ## Usage 56 | 57 | 1. Get a DEM for the area of interest. Some sources for free topographic data: 58 | 59 | - [OpenTopography](https://opentopography.org/) 60 | - [USGS](https://apps.nationalmap.gov/downloader/) 61 | - [Comprehensive list of DEM sources](https://github.com/DahnJ/Awesome-DEM) 62 | 63 | 2. Create an REM visualization with default arguments: 64 | 65 | ```python 66 | from riverrem.REMMaker import REMMaker 67 | # provide the DEM file path and desired output directory 68 | rem_maker = REMMaker(dem='/path/to/dem.tif', out_dir='/out/dir/') 69 | # create an REM 70 | rem_maker.make_rem() 71 | # create an REM visualization with the given colormap 72 | rem_maker.make_rem_viz(cmap='topo') 73 | ``` 74 | 75 | Options for adjusting colormaps, shading, interpolation parameters, and more are detailed in the [documentation](https://opentopography.github.io/RiverREM/). 76 | 77 | ![yukon_flats_REM](docs/_images/yukon_crop.png) 78 | 79 | ## Troubleshooting 80 | 81 | - No river in DEM extent or inaccurate centerline: Use the [OSM editor](https://www.openstreetmap.org/edit) to 82 | create/modify river centerline(s). Alternatively, a user-provided centerline can be input to override the OSM centerline. See the [documentation](https://opentopography.github.io/RiverREM) for more details. 83 | 84 | ## Issues 85 | 86 | Submitting [issues](https://github.com/OpenTopography/RiverREM/issues), bugs, or suggested feature improvements are highly encouraged for this repository. 87 | 88 | ## References 89 | 90 | This is the OpenTopography fork of https://github.com/klarrieu/RiverREM by Kenneth Larrieu. This package was made possible and inspired by the following: 91 | 92 | - The [beautiful REMs](https://www.dnr.wa.gov/publications/ger_presentations_dmt_2016_coe.pdf) popularized by [Daniel Coe](https://dancoecarto.com/creating-rems-in-qgis-the-idw-method) 93 | - [DahnJ](https://github.com/DahnJ)'s implementation of [REMs using xarray](https://github.com/DahnJ/REM-xarray) 94 | - Geoff Boeing's [OSMnx](https://geoffboeing.com/publications/osmnx-complex-street-networks/) Python package leveraging the OSM Overpass API 95 | - The [UNAVCO](https://www.unavco.org/) Student Internship Program 96 | - The team at [OpenTopography](https://opentopography.org/) for supporting this effort under the following U.S. National Science Foundation award numbers: 1948997, 1948994, 1948857. 97 | 98 | 99 | ![birch_creek_REM](docs/_images/birch_crop.png) 100 | -------------------------------------------------------------------------------- /bld.bat: -------------------------------------------------------------------------------- 1 | "%PYTHON%" setup.py install 2 | if errorlevel 1 exit 1 3 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | $PYTHON setup.py install 2 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 52696a585ac673acd6b58aa6f867d527 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/.nojekyll -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_images/birch_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_images/birch_crop.png -------------------------------------------------------------------------------- /docs/_images/neches_topo_crop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_images/neches_topo_crop.jpg -------------------------------------------------------------------------------- /docs/_images/yukon_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_images/yukon_crop.png -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | Welcome to RiverREM's documentation! 2 | ==================================== 3 | 4 | Source code: `https://github.com/OpenTopography/RiverREM `_ 5 | 6 | OT blog post: `link `_ 7 | 8 | .. image:: ../_images/neches_topo_crop.jpg 9 | 10 | 11 | 12 | RiverREM is a Python package for automatically generating river relative elevation model (REM) visualizations from nothing but an input digital elevation model (DEM). The package uses the OpenStreetMap API to retrieve river centerline geometries over the DEM extent. Interpolation of river elevations is automatically handled using a sampling scheme based on raster resolution and river sinuosity to create striking high-resolution visualizations out of the box and without the need for additional manual steps. The package also contains a helper class for creating DEM raster visualizations. 13 | 14 | .. toctree:: 15 | :maxdepth: 2 16 | :caption: Contents: 17 | 18 | installation 19 | quickstart 20 | remindex 21 | vizindex 22 | 23 | 24 | 25 | Indices and tables 26 | ------------------- 27 | 28 | * :ref:`genindex` 29 | * :ref:`modindex` 30 | * :ref:`search` 31 | -------------------------------------------------------------------------------- /docs/_sources/installation.rst.txt: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | Installation 4 | *************** 5 | 6 | Installation method 1 (recommended): New environment with conda/mamba 7 | -------------------------------------------------------------------------------------- 8 | 9 | Make a new Python environment with RiverREM installed: 10 | 11 | .. code-block:: bash 12 | 13 | conda create -n rem_env riverrem 14 | 15 | 16 | .. note:: 17 | :code:`mamba` is recommended over :code:`conda` as it is able to solve environment dependencies quickly and robustly. If you are using :code:`mamba`, replace :code:`conda` with :code:`mamba` in the above command. 18 | 19 | 20 | The environment can then be activated: 21 | 22 | .. code-block:: bash 23 | 24 | conda activate rem_env 25 | 26 | Installation method 2: Existing environment 27 | ----------------------------------------------------- 28 | 29 | Install via conda/mamba 30 | 31 | .. code-block:: bash 32 | 33 | conda install -c conda-forge riverrem 34 | 35 | 36 | Installation method 3: Repository clone 37 | ----------------------------------------------------- 38 | 39 | Clone the GitHub repository and create a conda environment from the :code:`environment.yml` 40 | 41 | 42 | .. code-block:: bash 43 | 44 | git clone https://github.com/opentopography/RiverREM.git 45 | cd RiverREM 46 | conda env create -n rem_env --file environment.yml 47 | 48 | 49 | Confirm installation works 50 | -------------------------------- 51 | 52 | After installing, you should be able to open a Python interpreter and import without errors: 53 | 54 | .. code-block:: python 55 | 56 | from riverrem.REMMaker import REMMaker 57 | 58 | 59 | Continue to the Quickstart to start making REMs. 60 | 61 | -------------------------------------------------------------------------------- /docs/_sources/quickstart.rst.txt: -------------------------------------------------------------------------------- 1 | Quickstart 2 | ********** 3 | 4 | First, ensure you have gone through :ref:`Installation ` of RiverREM. 5 | 6 | Input DEM 7 | ------------ 8 | 9 | After installing RiverREM, you'll need a digital elevation model (DEM) for the area of interest. Some sources for free topographic data: 10 | 11 | - `OpenTopography `_ 12 | - `USGS `_ 13 | - `Comprehensive list of DEM sources `_ 14 | 15 | To read the DEM into a :code:`REMMaker` object, we run the following code: 16 | 17 | .. code-block:: python 18 | 19 | from riverrem.REMMaker import REMMaker 20 | # provide the DEM file path and desired output directory 21 | rem_maker = REMMaker(dem='/path/to/dem.tif') 22 | 23 | The :code:`REMMaker` accepts other arguments to specify things like custom river centerlines and output locations. See the :ref:`REM Module documentation ` for more. 24 | 25 | 26 | 27 | Making an REM 28 | ------------------- 29 | 30 | Next, we can create an REM from the input DEM. If a centerline shapefile was not provided, RiverREM will automatically identify the largest river in the DEM domain using OpenStreetMaps. 31 | 32 | .. code-block:: python 33 | 34 | # create an REM 35 | rem_maker.make_rem() 36 | 37 | 38 | Running this produces an output REM, containing the detrended elevation values (elevation heights relative to the river). The raw REM can be visualized using a GIS program such as QGIS and processed/analyzed manually if desired. 39 | 40 | 41 | Making a colorful REM visualization 42 | ---------------------------------------- 43 | 44 | Lastly, we apply shading and color mapping to the REM to make a colorful visualization: 45 | 46 | .. code-block:: python 47 | 48 | # create an REM visualization with the given colormap 49 | rem_maker.make_rem_viz(cmap='topo') 50 | 51 | 52 | Visualization options 53 | ----------------------------- 54 | 55 | By default, the colormap is applied to a logarithmically-transformed REM elevation values. This is used to emphasize elevation differences closer to the river and make the river geomorphology more prominent. 56 | 57 | Any named colormap from `matplotlib `_, `seaborn `_, or `cmocean `_ can be specified for the :code:`cmap` parameter. Alternatively, a custom colormap can be specified in the form of a function that takes numeric inputs in the 0-255 range and outputs (R, G, B) tuples in the 0-1 range. 58 | 59 | The color relief REM is also blended with a hillshade raster to give a 3D shadow effect. Vertical exaggeration can be adjusted with the :code:`z` parameter. The amount of hillshade/color blending can be specified by the :code:`blend_percent` parameter. 60 | 61 | For a fill list of options and descriptions of methods, see :ref:`REM Module documentation `. 62 | 63 | -------------------------------------------------------------------------------- /docs/_sources/remindex.rst.txt: -------------------------------------------------------------------------------- 1 | .. _rem-module: 2 | 3 | REM Module 4 | ********** 5 | 6 | This module can be used to automatically produce visualizations of river relative elevation 7 | models (REMs) from an input DEM. 8 | 9 | River centerlines 10 | ------------------- 11 | 12 | River centerlines used to create REMs are automatically retrieved from the OpenStreetMap (OSM) API. If a desired river segment is not listed on OSM, a new river centerline can be created/edited `on the OSM site `_ (clear the OSM cache folder after using the OSM editor to get the updated centerline). Alternatively, if OSM is up to date but the input DEM has older river topography, a user-provided centerline shapefile can be input, overriding the OSM centerline. 13 | 14 | Points sampled along the river centerline(s) are output as a shapefile along with each output REM raster. These points can be viewed to help ensure that the applied centerline is accurate. 15 | 16 | Handling large datasets 17 | --------------------------- 18 | 19 | For very large/high resolution DEMs, interpolation can take a long time. While this module is designed to work well using the default settings on a variety of datasets, interpolation can be sped up by changing the following parameters from default values: 20 | 21 | - decreasing :code:`interp_pts` (fewer total centerline sample points) 22 | - decreasing :code:`k` (fewer centerline samples per interpolation) 23 | - increasing :code:`eps` (less accurate interpolation) 24 | - increasing :code:`workers` (if more CPU threads are available) 25 | - increasing :code:`chunk_size` (if more RAM is available) 26 | 27 | REMMaker module 28 | ---------------------- 29 | 30 | .. automodule:: riverrem.REMMaker 31 | :members: clear_osm_cache 32 | 33 | .. autoclass:: riverrem.REMMaker.REMMaker 34 | :members: make_rem, make_rem_viz 35 | -------------------------------------------------------------------------------- /docs/_sources/vizindex.rst.txt: -------------------------------------------------------------------------------- 1 | DEM Visualization Module 2 | ************************ 3 | 4 | This module contains a helper class (RasterViz) that is invoked by the REM module to create visualizations. 5 | It can also be used standalone to create customized visualizations of DEM/REM rasters. 6 | 7 | RasterViz module 8 | ------------------- 9 | 10 | .. automodule:: riverrem.RasterViz 11 | 12 | .. autoclass:: riverrem.RasterViz.RasterViz 13 | :members: make_aspect, make_color_relief, make_hillshade, make_hillshade_color, make_roughness, make_slope 14 | -------------------------------------------------------------------------------- /docs/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Sphinx stylesheet -- basic theme. 3 | */ 4 | 5 | /* -- main layout ----------------------------------------------------------- */ 6 | 7 | div.clearer { 8 | clear: both; 9 | } 10 | 11 | div.section::after { 12 | display: block; 13 | content: ''; 14 | clear: left; 15 | } 16 | 17 | /* -- relbar ---------------------------------------------------------------- */ 18 | 19 | div.related { 20 | width: 100%; 21 | font-size: 90%; 22 | } 23 | 24 | div.related h3 { 25 | display: none; 26 | } 27 | 28 | div.related ul { 29 | margin: 0; 30 | padding: 0 0 0 10px; 31 | list-style: none; 32 | } 33 | 34 | div.related li { 35 | display: inline; 36 | } 37 | 38 | div.related li.right { 39 | float: right; 40 | margin-right: 5px; 41 | } 42 | 43 | /* -- sidebar --------------------------------------------------------------- */ 44 | 45 | div.sphinxsidebarwrapper { 46 | padding: 10px 5px 0 10px; 47 | } 48 | 49 | div.sphinxsidebar { 50 | float: left; 51 | width: 230px; 52 | margin-left: -100%; 53 | font-size: 90%; 54 | word-wrap: break-word; 55 | overflow-wrap : break-word; 56 | } 57 | 58 | div.sphinxsidebar ul { 59 | list-style: none; 60 | } 61 | 62 | div.sphinxsidebar ul ul, 63 | div.sphinxsidebar ul.want-points { 64 | margin-left: 20px; 65 | list-style: square; 66 | } 67 | 68 | div.sphinxsidebar ul ul { 69 | margin-top: 0; 70 | margin-bottom: 0; 71 | } 72 | 73 | div.sphinxsidebar form { 74 | margin-top: 10px; 75 | } 76 | 77 | div.sphinxsidebar input { 78 | border: 1px solid #98dbcc; 79 | font-family: sans-serif; 80 | font-size: 1em; 81 | } 82 | 83 | div.sphinxsidebar #searchbox form.search { 84 | overflow: hidden; 85 | } 86 | 87 | div.sphinxsidebar #searchbox input[type="text"] { 88 | float: left; 89 | width: 80%; 90 | padding: 0.25em; 91 | box-sizing: border-box; 92 | } 93 | 94 | div.sphinxsidebar #searchbox input[type="submit"] { 95 | float: left; 96 | width: 20%; 97 | border-left: none; 98 | padding: 0.25em; 99 | box-sizing: border-box; 100 | } 101 | 102 | 103 | img { 104 | border: 0; 105 | max-width: 100%; 106 | } 107 | 108 | /* -- search page ----------------------------------------------------------- */ 109 | 110 | ul.search { 111 | margin-top: 10px; 112 | } 113 | 114 | ul.search li { 115 | padding: 5px 0; 116 | } 117 | 118 | ul.search li a { 119 | font-weight: bold; 120 | } 121 | 122 | ul.search li p.context { 123 | color: #888; 124 | margin: 2px 0 0 30px; 125 | text-align: left; 126 | } 127 | 128 | ul.keywordmatches li.goodmatch a { 129 | font-weight: bold; 130 | } 131 | 132 | /* -- index page ------------------------------------------------------------ */ 133 | 134 | table.contentstable { 135 | width: 90%; 136 | margin-left: auto; 137 | margin-right: auto; 138 | } 139 | 140 | table.contentstable p.biglink { 141 | line-height: 150%; 142 | } 143 | 144 | a.biglink { 145 | font-size: 1.3em; 146 | } 147 | 148 | span.linkdescr { 149 | font-style: italic; 150 | padding-top: 5px; 151 | font-size: 90%; 152 | } 153 | 154 | /* -- general index --------------------------------------------------------- */ 155 | 156 | table.indextable { 157 | width: 100%; 158 | } 159 | 160 | table.indextable td { 161 | text-align: left; 162 | vertical-align: top; 163 | } 164 | 165 | table.indextable ul { 166 | margin-top: 0; 167 | margin-bottom: 0; 168 | list-style-type: none; 169 | } 170 | 171 | table.indextable > tbody > tr > td > ul { 172 | padding-left: 0em; 173 | } 174 | 175 | table.indextable tr.pcap { 176 | height: 10px; 177 | } 178 | 179 | table.indextable tr.cap { 180 | margin-top: 10px; 181 | background-color: #f2f2f2; 182 | } 183 | 184 | img.toggler { 185 | margin-right: 3px; 186 | margin-top: 3px; 187 | cursor: pointer; 188 | } 189 | 190 | div.modindex-jumpbox { 191 | border-top: 1px solid #ddd; 192 | border-bottom: 1px solid #ddd; 193 | margin: 1em 0 1em 0; 194 | padding: 0.4em; 195 | } 196 | 197 | div.genindex-jumpbox { 198 | border-top: 1px solid #ddd; 199 | border-bottom: 1px solid #ddd; 200 | margin: 1em 0 1em 0; 201 | padding: 0.4em; 202 | } 203 | 204 | /* -- domain module index --------------------------------------------------- */ 205 | 206 | table.modindextable td { 207 | padding: 2px; 208 | border-collapse: collapse; 209 | } 210 | 211 | /* -- general body styles --------------------------------------------------- */ 212 | 213 | div.body { 214 | min-width: 360px; 215 | max-width: 800px; 216 | } 217 | 218 | div.body p, div.body dd, div.body li, div.body blockquote { 219 | -moz-hyphens: auto; 220 | -ms-hyphens: auto; 221 | -webkit-hyphens: auto; 222 | hyphens: auto; 223 | } 224 | 225 | a.headerlink { 226 | visibility: hidden; 227 | } 228 | 229 | a:visited { 230 | color: #551A8B; 231 | } 232 | 233 | h1:hover > a.headerlink, 234 | h2:hover > a.headerlink, 235 | h3:hover > a.headerlink, 236 | h4:hover > a.headerlink, 237 | h5:hover > a.headerlink, 238 | h6:hover > a.headerlink, 239 | dt:hover > a.headerlink, 240 | caption:hover > a.headerlink, 241 | p.caption:hover > a.headerlink, 242 | div.code-block-caption:hover > a.headerlink { 243 | visibility: visible; 244 | } 245 | 246 | div.body p.caption { 247 | text-align: inherit; 248 | } 249 | 250 | div.body td { 251 | text-align: left; 252 | } 253 | 254 | .first { 255 | margin-top: 0 !important; 256 | } 257 | 258 | p.rubric { 259 | margin-top: 30px; 260 | font-weight: bold; 261 | } 262 | 263 | img.align-left, figure.align-left, .figure.align-left, object.align-left { 264 | clear: left; 265 | float: left; 266 | margin-right: 1em; 267 | } 268 | 269 | img.align-right, figure.align-right, .figure.align-right, object.align-right { 270 | clear: right; 271 | float: right; 272 | margin-left: 1em; 273 | } 274 | 275 | img.align-center, figure.align-center, .figure.align-center, object.align-center { 276 | display: block; 277 | margin-left: auto; 278 | margin-right: auto; 279 | } 280 | 281 | img.align-default, figure.align-default, .figure.align-default { 282 | display: block; 283 | margin-left: auto; 284 | margin-right: auto; 285 | } 286 | 287 | .align-left { 288 | text-align: left; 289 | } 290 | 291 | .align-center { 292 | text-align: center; 293 | } 294 | 295 | .align-default { 296 | text-align: center; 297 | } 298 | 299 | .align-right { 300 | text-align: right; 301 | } 302 | 303 | /* -- sidebars -------------------------------------------------------------- */ 304 | 305 | div.sidebar, 306 | aside.sidebar { 307 | margin: 0 0 0.5em 1em; 308 | border: 1px solid #ddb; 309 | padding: 7px; 310 | background-color: #ffe; 311 | width: 40%; 312 | float: right; 313 | clear: right; 314 | overflow-x: auto; 315 | } 316 | 317 | p.sidebar-title { 318 | font-weight: bold; 319 | } 320 | 321 | nav.contents, 322 | aside.topic, 323 | div.admonition, div.topic, blockquote { 324 | clear: left; 325 | } 326 | 327 | /* -- topics ---------------------------------------------------------------- */ 328 | 329 | nav.contents, 330 | aside.topic, 331 | div.topic { 332 | border: 1px solid #ccc; 333 | padding: 7px; 334 | margin: 10px 0 10px 0; 335 | } 336 | 337 | p.topic-title { 338 | font-size: 1.1em; 339 | font-weight: bold; 340 | margin-top: 10px; 341 | } 342 | 343 | /* -- admonitions ----------------------------------------------------------- */ 344 | 345 | div.admonition { 346 | margin-top: 10px; 347 | margin-bottom: 10px; 348 | padding: 7px; 349 | } 350 | 351 | div.admonition dt { 352 | font-weight: bold; 353 | } 354 | 355 | p.admonition-title { 356 | margin: 0px 10px 5px 0px; 357 | font-weight: bold; 358 | } 359 | 360 | div.body p.centered { 361 | text-align: center; 362 | margin-top: 25px; 363 | } 364 | 365 | /* -- content of sidebars/topics/admonitions -------------------------------- */ 366 | 367 | div.sidebar > :last-child, 368 | aside.sidebar > :last-child, 369 | nav.contents > :last-child, 370 | aside.topic > :last-child, 371 | div.topic > :last-child, 372 | div.admonition > :last-child { 373 | margin-bottom: 0; 374 | } 375 | 376 | div.sidebar::after, 377 | aside.sidebar::after, 378 | nav.contents::after, 379 | aside.topic::after, 380 | div.topic::after, 381 | div.admonition::after, 382 | blockquote::after { 383 | display: block; 384 | content: ''; 385 | clear: both; 386 | } 387 | 388 | /* -- tables ---------------------------------------------------------------- */ 389 | 390 | table.docutils { 391 | margin-top: 10px; 392 | margin-bottom: 10px; 393 | border: 0; 394 | border-collapse: collapse; 395 | } 396 | 397 | table.align-center { 398 | margin-left: auto; 399 | margin-right: auto; 400 | } 401 | 402 | table.align-default { 403 | margin-left: auto; 404 | margin-right: auto; 405 | } 406 | 407 | table caption span.caption-number { 408 | font-style: italic; 409 | } 410 | 411 | table caption span.caption-text { 412 | } 413 | 414 | table.docutils td, table.docutils th { 415 | padding: 1px 8px 1px 5px; 416 | border-top: 0; 417 | border-left: 0; 418 | border-right: 0; 419 | border-bottom: 1px solid #aaa; 420 | } 421 | 422 | th { 423 | text-align: left; 424 | padding-right: 5px; 425 | } 426 | 427 | table.citation { 428 | border-left: solid 1px gray; 429 | margin-left: 1px; 430 | } 431 | 432 | table.citation td { 433 | border-bottom: none; 434 | } 435 | 436 | th > :first-child, 437 | td > :first-child { 438 | margin-top: 0px; 439 | } 440 | 441 | th > :last-child, 442 | td > :last-child { 443 | margin-bottom: 0px; 444 | } 445 | 446 | /* -- figures --------------------------------------------------------------- */ 447 | 448 | div.figure, figure { 449 | margin: 0.5em; 450 | padding: 0.5em; 451 | } 452 | 453 | div.figure p.caption, figcaption { 454 | padding: 0.3em; 455 | } 456 | 457 | div.figure p.caption span.caption-number, 458 | figcaption span.caption-number { 459 | font-style: italic; 460 | } 461 | 462 | div.figure p.caption span.caption-text, 463 | figcaption span.caption-text { 464 | } 465 | 466 | /* -- field list styles ----------------------------------------------------- */ 467 | 468 | table.field-list td, table.field-list th { 469 | border: 0 !important; 470 | } 471 | 472 | .field-list ul { 473 | margin: 0; 474 | padding-left: 1em; 475 | } 476 | 477 | .field-list p { 478 | margin: 0; 479 | } 480 | 481 | .field-name { 482 | -moz-hyphens: manual; 483 | -ms-hyphens: manual; 484 | -webkit-hyphens: manual; 485 | hyphens: manual; 486 | } 487 | 488 | /* -- hlist styles ---------------------------------------------------------- */ 489 | 490 | table.hlist { 491 | margin: 1em 0; 492 | } 493 | 494 | table.hlist td { 495 | vertical-align: top; 496 | } 497 | 498 | /* -- object description styles --------------------------------------------- */ 499 | 500 | .sig { 501 | font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 502 | } 503 | 504 | .sig-name, code.descname { 505 | background-color: transparent; 506 | font-weight: bold; 507 | } 508 | 509 | .sig-name { 510 | font-size: 1.1em; 511 | } 512 | 513 | code.descname { 514 | font-size: 1.2em; 515 | } 516 | 517 | .sig-prename, code.descclassname { 518 | background-color: transparent; 519 | } 520 | 521 | .optional { 522 | font-size: 1.3em; 523 | } 524 | 525 | .sig-paren { 526 | font-size: larger; 527 | } 528 | 529 | .sig-param.n { 530 | font-style: italic; 531 | } 532 | 533 | /* C++ specific styling */ 534 | 535 | .sig-inline.c-texpr, 536 | .sig-inline.cpp-texpr { 537 | font-family: unset; 538 | } 539 | 540 | .sig.c .k, .sig.c .kt, 541 | .sig.cpp .k, .sig.cpp .kt { 542 | color: #0033B3; 543 | } 544 | 545 | .sig.c .m, 546 | .sig.cpp .m { 547 | color: #1750EB; 548 | } 549 | 550 | .sig.c .s, .sig.c .sc, 551 | .sig.cpp .s, .sig.cpp .sc { 552 | color: #067D17; 553 | } 554 | 555 | 556 | /* -- other body styles ----------------------------------------------------- */ 557 | 558 | ol.arabic { 559 | list-style: decimal; 560 | } 561 | 562 | ol.loweralpha { 563 | list-style: lower-alpha; 564 | } 565 | 566 | ol.upperalpha { 567 | list-style: upper-alpha; 568 | } 569 | 570 | ol.lowerroman { 571 | list-style: lower-roman; 572 | } 573 | 574 | ol.upperroman { 575 | list-style: upper-roman; 576 | } 577 | 578 | :not(li) > ol > li:first-child > :first-child, 579 | :not(li) > ul > li:first-child > :first-child { 580 | margin-top: 0px; 581 | } 582 | 583 | :not(li) > ol > li:last-child > :last-child, 584 | :not(li) > ul > li:last-child > :last-child { 585 | margin-bottom: 0px; 586 | } 587 | 588 | ol.simple ol p, 589 | ol.simple ul p, 590 | ul.simple ol p, 591 | ul.simple ul p { 592 | margin-top: 0; 593 | } 594 | 595 | ol.simple > li:not(:first-child) > p, 596 | ul.simple > li:not(:first-child) > p { 597 | margin-top: 0; 598 | } 599 | 600 | ol.simple p, 601 | ul.simple p { 602 | margin-bottom: 0; 603 | } 604 | 605 | aside.footnote > span, 606 | div.citation > span { 607 | float: left; 608 | } 609 | aside.footnote > span:last-of-type, 610 | div.citation > span:last-of-type { 611 | padding-right: 0.5em; 612 | } 613 | aside.footnote > p { 614 | margin-left: 2em; 615 | } 616 | div.citation > p { 617 | margin-left: 4em; 618 | } 619 | aside.footnote > p:last-of-type, 620 | div.citation > p:last-of-type { 621 | margin-bottom: 0em; 622 | } 623 | aside.footnote > p:last-of-type:after, 624 | div.citation > p:last-of-type:after { 625 | content: ""; 626 | clear: both; 627 | } 628 | 629 | dl.field-list { 630 | display: grid; 631 | grid-template-columns: fit-content(30%) auto; 632 | } 633 | 634 | dl.field-list > dt { 635 | font-weight: bold; 636 | word-break: break-word; 637 | padding-left: 0.5em; 638 | padding-right: 5px; 639 | } 640 | 641 | dl.field-list > dd { 642 | padding-left: 0.5em; 643 | margin-top: 0em; 644 | margin-left: 0em; 645 | margin-bottom: 0em; 646 | } 647 | 648 | dl { 649 | margin-bottom: 15px; 650 | } 651 | 652 | dd > :first-child { 653 | margin-top: 0px; 654 | } 655 | 656 | dd ul, dd table { 657 | margin-bottom: 10px; 658 | } 659 | 660 | dd { 661 | margin-top: 3px; 662 | margin-bottom: 10px; 663 | margin-left: 30px; 664 | } 665 | 666 | .sig dd { 667 | margin-top: 0px; 668 | margin-bottom: 0px; 669 | } 670 | 671 | .sig dl { 672 | margin-top: 0px; 673 | margin-bottom: 0px; 674 | } 675 | 676 | dl > dd:last-child, 677 | dl > dd:last-child > :last-child { 678 | margin-bottom: 0; 679 | } 680 | 681 | dt:target, span.highlighted { 682 | background-color: #fbe54e; 683 | } 684 | 685 | rect.highlighted { 686 | fill: #fbe54e; 687 | } 688 | 689 | dl.glossary dt { 690 | font-weight: bold; 691 | font-size: 1.1em; 692 | } 693 | 694 | .versionmodified { 695 | font-style: italic; 696 | } 697 | 698 | .system-message { 699 | background-color: #fda; 700 | padding: 5px; 701 | border: 3px solid red; 702 | } 703 | 704 | .footnote:target { 705 | background-color: #ffa; 706 | } 707 | 708 | .line-block { 709 | display: block; 710 | margin-top: 1em; 711 | margin-bottom: 1em; 712 | } 713 | 714 | .line-block .line-block { 715 | margin-top: 0; 716 | margin-bottom: 0; 717 | margin-left: 1.5em; 718 | } 719 | 720 | .guilabel, .menuselection { 721 | font-family: sans-serif; 722 | } 723 | 724 | .accelerator { 725 | text-decoration: underline; 726 | } 727 | 728 | .classifier { 729 | font-style: oblique; 730 | } 731 | 732 | .classifier:before { 733 | font-style: normal; 734 | margin: 0 0.5em; 735 | content: ":"; 736 | display: inline-block; 737 | } 738 | 739 | abbr, acronym { 740 | border-bottom: dotted 1px; 741 | cursor: help; 742 | } 743 | 744 | .translated { 745 | background-color: rgba(207, 255, 207, 0.2) 746 | } 747 | 748 | .untranslated { 749 | background-color: rgba(255, 207, 207, 0.2) 750 | } 751 | 752 | /* -- code displays --------------------------------------------------------- */ 753 | 754 | pre { 755 | overflow: auto; 756 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 757 | } 758 | 759 | pre, div[class*="highlight-"] { 760 | clear: both; 761 | } 762 | 763 | span.pre { 764 | -moz-hyphens: none; 765 | -ms-hyphens: none; 766 | -webkit-hyphens: none; 767 | hyphens: none; 768 | white-space: nowrap; 769 | } 770 | 771 | div[class*="highlight-"] { 772 | margin: 1em 0; 773 | } 774 | 775 | td.linenos pre { 776 | border: 0; 777 | background-color: transparent; 778 | color: #aaa; 779 | } 780 | 781 | table.highlighttable { 782 | display: block; 783 | } 784 | 785 | table.highlighttable tbody { 786 | display: block; 787 | } 788 | 789 | table.highlighttable tr { 790 | display: flex; 791 | } 792 | 793 | table.highlighttable td { 794 | margin: 0; 795 | padding: 0; 796 | } 797 | 798 | table.highlighttable td.linenos { 799 | padding-right: 0.5em; 800 | } 801 | 802 | table.highlighttable td.code { 803 | flex: 1; 804 | overflow: hidden; 805 | } 806 | 807 | .highlight .hll { 808 | display: block; 809 | } 810 | 811 | div.highlight pre, 812 | table.highlighttable pre { 813 | margin: 0; 814 | } 815 | 816 | div.code-block-caption + div { 817 | margin-top: 0; 818 | } 819 | 820 | div.code-block-caption { 821 | margin-top: 1em; 822 | padding: 2px 5px; 823 | font-size: small; 824 | } 825 | 826 | div.code-block-caption code { 827 | background-color: transparent; 828 | } 829 | 830 | table.highlighttable td.linenos, 831 | span.linenos, 832 | div.highlight span.gp { /* gp: Generic.Prompt */ 833 | user-select: none; 834 | -webkit-user-select: text; /* Safari fallback only */ 835 | -webkit-user-select: none; /* Chrome/Safari */ 836 | -moz-user-select: none; /* Firefox */ 837 | -ms-user-select: none; /* IE10+ */ 838 | } 839 | 840 | div.code-block-caption span.caption-number { 841 | padding: 0.1em 0.3em; 842 | font-style: italic; 843 | } 844 | 845 | div.code-block-caption span.caption-text { 846 | } 847 | 848 | div.literal-block-wrapper { 849 | margin: 1em 0; 850 | } 851 | 852 | code.xref, a code { 853 | background-color: transparent; 854 | font-weight: bold; 855 | } 856 | 857 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 858 | background-color: transparent; 859 | } 860 | 861 | .viewcode-link { 862 | float: right; 863 | } 864 | 865 | .viewcode-back { 866 | float: right; 867 | font-family: sans-serif; 868 | } 869 | 870 | div.viewcode-block:target { 871 | margin: -1px -10px; 872 | padding: 0 10px; 873 | } 874 | 875 | /* -- math display ---------------------------------------------------------- */ 876 | 877 | img.math { 878 | vertical-align: middle; 879 | } 880 | 881 | div.body div.math p { 882 | text-align: center; 883 | } 884 | 885 | span.eqno { 886 | float: right; 887 | } 888 | 889 | span.eqno a.headerlink { 890 | position: absolute; 891 | z-index: 1; 892 | } 893 | 894 | div.math:hover a.headerlink { 895 | visibility: visible; 896 | } 897 | 898 | /* -- printout stylesheet --------------------------------------------------- */ 899 | 900 | @media print { 901 | div.document, 902 | div.documentwrapper, 903 | div.bodywrapper { 904 | margin: 0 !important; 905 | width: 100%; 906 | } 907 | 908 | div.sphinxsidebar, 909 | div.related, 910 | div.footer, 911 | #top-link { 912 | display: none; 913 | } 914 | } -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Base JavaScript utilities for all Sphinx HTML documentation. 3 | */ 4 | "use strict"; 5 | 6 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 7 | "TEXTAREA", 8 | "INPUT", 9 | "SELECT", 10 | "BUTTON", 11 | ]); 12 | 13 | const _ready = (callback) => { 14 | if (document.readyState !== "loading") { 15 | callback(); 16 | } else { 17 | document.addEventListener("DOMContentLoaded", callback); 18 | } 19 | }; 20 | 21 | /** 22 | * Small JavaScript module for the documentation. 23 | */ 24 | const Documentation = { 25 | init: () => { 26 | Documentation.initDomainIndexTable(); 27 | Documentation.initOnKeyListeners(); 28 | }, 29 | 30 | /** 31 | * i18n support 32 | */ 33 | TRANSLATIONS: {}, 34 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 35 | LOCALE: "unknown", 36 | 37 | // gettext and ngettext don't access this so that the functions 38 | // can safely bound to a different name (_ = Documentation.gettext) 39 | gettext: (string) => { 40 | const translated = Documentation.TRANSLATIONS[string]; 41 | switch (typeof translated) { 42 | case "undefined": 43 | return string; // no translation 44 | case "string": 45 | return translated; // translation exists 46 | default: 47 | return translated[0]; // (singular, plural) translation tuple exists 48 | } 49 | }, 50 | 51 | ngettext: (singular, plural, n) => { 52 | const translated = Documentation.TRANSLATIONS[singular]; 53 | if (typeof translated !== "undefined") 54 | return translated[Documentation.PLURAL_EXPR(n)]; 55 | return n === 1 ? singular : plural; 56 | }, 57 | 58 | addTranslations: (catalog) => { 59 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 60 | Documentation.PLURAL_EXPR = new Function( 61 | "n", 62 | `return (${catalog.plural_expr})` 63 | ); 64 | Documentation.LOCALE = catalog.locale; 65 | }, 66 | 67 | /** 68 | * helper function to focus on search bar 69 | */ 70 | focusSearchBar: () => { 71 | document.querySelectorAll("input[name=q]")[0]?.focus(); 72 | }, 73 | 74 | /** 75 | * Initialise the domain index toggle buttons 76 | */ 77 | initDomainIndexTable: () => { 78 | const toggler = (el) => { 79 | const idNumber = el.id.substr(7); 80 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 81 | if (el.src.substr(-9) === "minus.png") { 82 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 83 | toggledRows.forEach((el) => (el.style.display = "none")); 84 | } else { 85 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 86 | toggledRows.forEach((el) => (el.style.display = "")); 87 | } 88 | }; 89 | 90 | const togglerElements = document.querySelectorAll("img.toggler"); 91 | togglerElements.forEach((el) => 92 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 93 | ); 94 | togglerElements.forEach((el) => (el.style.display = "")); 95 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 96 | }, 97 | 98 | initOnKeyListeners: () => { 99 | // only install a listener if it is really needed 100 | if ( 101 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 102 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 103 | ) 104 | return; 105 | 106 | document.addEventListener("keydown", (event) => { 107 | // bail for input elements 108 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 109 | // bail with special keys 110 | if (event.altKey || event.ctrlKey || event.metaKey) return; 111 | 112 | if (!event.shiftKey) { 113 | switch (event.key) { 114 | case "ArrowLeft": 115 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 116 | 117 | const prevLink = document.querySelector('link[rel="prev"]'); 118 | if (prevLink && prevLink.href) { 119 | window.location.href = prevLink.href; 120 | event.preventDefault(); 121 | } 122 | break; 123 | case "ArrowRight": 124 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 125 | 126 | const nextLink = document.querySelector('link[rel="next"]'); 127 | if (nextLink && nextLink.href) { 128 | window.location.href = nextLink.href; 129 | event.preventDefault(); 130 | } 131 | break; 132 | } 133 | } 134 | 135 | // some keyboard layouts may need Shift to get / 136 | switch (event.key) { 137 | case "/": 138 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 139 | Documentation.focusSearchBar(); 140 | event.preventDefault(); 141 | } 142 | }); 143 | }, 144 | }; 145 | 146 | // quick alias for translations 147 | const _ = Documentation.gettext; 148 | 149 | _ready(Documentation.init); 150 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '1.1.2', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This script contains the language-specific data used by searchtools.js, 3 | * namely the list of stopwords, stemmer, scorer and splitter. 4 | */ 5 | 6 | var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; 7 | 8 | 9 | /* Non-minified version is copied as a separate JS file, if available */ 10 | 11 | /** 12 | * Porter Stemmer 13 | */ 14 | var Stemmer = function() { 15 | 16 | var step2list = { 17 | ational: 'ate', 18 | tional: 'tion', 19 | enci: 'ence', 20 | anci: 'ance', 21 | izer: 'ize', 22 | bli: 'ble', 23 | alli: 'al', 24 | entli: 'ent', 25 | eli: 'e', 26 | ousli: 'ous', 27 | ization: 'ize', 28 | ation: 'ate', 29 | ator: 'ate', 30 | alism: 'al', 31 | iveness: 'ive', 32 | fulness: 'ful', 33 | ousness: 'ous', 34 | aliti: 'al', 35 | iviti: 'ive', 36 | biliti: 'ble', 37 | logi: 'log' 38 | }; 39 | 40 | var step3list = { 41 | icate: 'ic', 42 | ative: '', 43 | alize: 'al', 44 | iciti: 'ic', 45 | ical: 'ic', 46 | ful: '', 47 | ness: '' 48 | }; 49 | 50 | var c = "[^aeiou]"; // consonant 51 | var v = "[aeiouy]"; // vowel 52 | var C = c + "[^aeiouy]*"; // consonant sequence 53 | var V = v + "[aeiou]*"; // vowel sequence 54 | 55 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 56 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 57 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 58 | var s_v = "^(" + C + ")?" + v; // vowel in stem 59 | 60 | this.stemWord = function (w) { 61 | var stem; 62 | var suffix; 63 | var firstch; 64 | var origword = w; 65 | 66 | if (w.length < 3) 67 | return w; 68 | 69 | var re; 70 | var re2; 71 | var re3; 72 | var re4; 73 | 74 | firstch = w.substr(0,1); 75 | if (firstch == "y") 76 | w = firstch.toUpperCase() + w.substr(1); 77 | 78 | // Step 1a 79 | re = /^(.+?)(ss|i)es$/; 80 | re2 = /^(.+?)([^s])s$/; 81 | 82 | if (re.test(w)) 83 | w = w.replace(re,"$1$2"); 84 | else if (re2.test(w)) 85 | w = w.replace(re2,"$1$2"); 86 | 87 | // Step 1b 88 | re = /^(.+?)eed$/; 89 | re2 = /^(.+?)(ed|ing)$/; 90 | if (re.test(w)) { 91 | var fp = re.exec(w); 92 | re = new RegExp(mgr0); 93 | if (re.test(fp[1])) { 94 | re = /.$/; 95 | w = w.replace(re,""); 96 | } 97 | } 98 | else if (re2.test(w)) { 99 | var fp = re2.exec(w); 100 | stem = fp[1]; 101 | re2 = new RegExp(s_v); 102 | if (re2.test(stem)) { 103 | w = stem; 104 | re2 = /(at|bl|iz)$/; 105 | re3 = new RegExp("([^aeiouylsz])\\1$"); 106 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 107 | if (re2.test(w)) 108 | w = w + "e"; 109 | else if (re3.test(w)) { 110 | re = /.$/; 111 | w = w.replace(re,""); 112 | } 113 | else if (re4.test(w)) 114 | w = w + "e"; 115 | } 116 | } 117 | 118 | // Step 1c 119 | re = /^(.+?)y$/; 120 | if (re.test(w)) { 121 | var fp = re.exec(w); 122 | stem = fp[1]; 123 | re = new RegExp(s_v); 124 | if (re.test(stem)) 125 | w = stem + "i"; 126 | } 127 | 128 | // Step 2 129 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 130 | if (re.test(w)) { 131 | var fp = re.exec(w); 132 | stem = fp[1]; 133 | suffix = fp[2]; 134 | re = new RegExp(mgr0); 135 | if (re.test(stem)) 136 | w = stem + step2list[suffix]; 137 | } 138 | 139 | // Step 3 140 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 141 | if (re.test(w)) { 142 | var fp = re.exec(w); 143 | stem = fp[1]; 144 | suffix = fp[2]; 145 | re = new RegExp(mgr0); 146 | if (re.test(stem)) 147 | w = stem + step3list[suffix]; 148 | } 149 | 150 | // Step 4 151 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 152 | re2 = /^(.+?)(s|t)(ion)$/; 153 | if (re.test(w)) { 154 | var fp = re.exec(w); 155 | stem = fp[1]; 156 | re = new RegExp(mgr1); 157 | if (re.test(stem)) 158 | w = stem; 159 | } 160 | else if (re2.test(w)) { 161 | var fp = re2.exec(w); 162 | stem = fp[1] + fp[2]; 163 | re2 = new RegExp(mgr1); 164 | if (re2.test(stem)) 165 | w = stem; 166 | } 167 | 168 | // Step 5 169 | re = /^(.+?)e$/; 170 | if (re.test(w)) { 171 | var fp = re.exec(w); 172 | stem = fp[1]; 173 | re = new RegExp(mgr1); 174 | re2 = new RegExp(meq1); 175 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 176 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 177 | w = stem; 178 | } 179 | re = /ll$/; 180 | re2 = new RegExp(mgr1); 181 | if (re.test(w) && re2.test(w)) { 182 | re = /.$/; 183 | w = w.replace(re,""); 184 | } 185 | 186 | // and turn initial Y back to y 187 | if (firstch == "y") 188 | w = firstch.toLowerCase() + w.substr(1); 189 | return w; 190 | } 191 | } 192 | 193 | -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | html[data-theme="light"] .highlight pre { line-height: 125%; } 2 | html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | html[data-theme="light"] .highlight .hll { background-color: #fae4c2 } 7 | html[data-theme="light"] .highlight { background: #fefefe; color: #080808 } 8 | html[data-theme="light"] .highlight .c { color: #515151 } /* Comment */ 9 | html[data-theme="light"] .highlight .err { color: #A12236 } /* Error */ 10 | html[data-theme="light"] .highlight .k { color: #6730C5 } /* Keyword */ 11 | html[data-theme="light"] .highlight .l { color: #7F4707 } /* Literal */ 12 | html[data-theme="light"] .highlight .n { color: #080808 } /* Name */ 13 | html[data-theme="light"] .highlight .o { color: #00622F } /* Operator */ 14 | html[data-theme="light"] .highlight .p { color: #080808 } /* Punctuation */ 15 | html[data-theme="light"] .highlight .ch { color: #515151 } /* Comment.Hashbang */ 16 | html[data-theme="light"] .highlight .cm { color: #515151 } /* Comment.Multiline */ 17 | html[data-theme="light"] .highlight .cp { color: #515151 } /* Comment.Preproc */ 18 | html[data-theme="light"] .highlight .cpf { color: #515151 } /* Comment.PreprocFile */ 19 | html[data-theme="light"] .highlight .c1 { color: #515151 } /* Comment.Single */ 20 | html[data-theme="light"] .highlight .cs { color: #515151 } /* Comment.Special */ 21 | html[data-theme="light"] .highlight .gd { color: #005B82 } /* Generic.Deleted */ 22 | html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */ 23 | html[data-theme="light"] .highlight .gh { color: #005B82 } /* Generic.Heading */ 24 | html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */ 25 | html[data-theme="light"] .highlight .gu { color: #005B82 } /* Generic.Subheading */ 26 | html[data-theme="light"] .highlight .kc { color: #6730C5 } /* Keyword.Constant */ 27 | html[data-theme="light"] .highlight .kd { color: #6730C5 } /* Keyword.Declaration */ 28 | html[data-theme="light"] .highlight .kn { color: #6730C5 } /* Keyword.Namespace */ 29 | html[data-theme="light"] .highlight .kp { color: #6730C5 } /* Keyword.Pseudo */ 30 | html[data-theme="light"] .highlight .kr { color: #6730C5 } /* Keyword.Reserved */ 31 | html[data-theme="light"] .highlight .kt { color: #7F4707 } /* Keyword.Type */ 32 | html[data-theme="light"] .highlight .ld { color: #7F4707 } /* Literal.Date */ 33 | html[data-theme="light"] .highlight .m { color: #7F4707 } /* Literal.Number */ 34 | html[data-theme="light"] .highlight .s { color: #00622F } /* Literal.String */ 35 | html[data-theme="light"] .highlight .na { color: #912583 } /* Name.Attribute */ 36 | html[data-theme="light"] .highlight .nb { color: #7F4707 } /* Name.Builtin */ 37 | html[data-theme="light"] .highlight .nc { color: #005B82 } /* Name.Class */ 38 | html[data-theme="light"] .highlight .no { color: #005B82 } /* Name.Constant */ 39 | html[data-theme="light"] .highlight .nd { color: #7F4707 } /* Name.Decorator */ 40 | html[data-theme="light"] .highlight .ni { color: #00622F } /* Name.Entity */ 41 | html[data-theme="light"] .highlight .ne { color: #6730C5 } /* Name.Exception */ 42 | html[data-theme="light"] .highlight .nf { color: #005B82 } /* Name.Function */ 43 | html[data-theme="light"] .highlight .nl { color: #7F4707 } /* Name.Label */ 44 | html[data-theme="light"] .highlight .nn { color: #080808 } /* Name.Namespace */ 45 | html[data-theme="light"] .highlight .nx { color: #080808 } /* Name.Other */ 46 | html[data-theme="light"] .highlight .py { color: #005B82 } /* Name.Property */ 47 | html[data-theme="light"] .highlight .nt { color: #005B82 } /* Name.Tag */ 48 | html[data-theme="light"] .highlight .nv { color: #A12236 } /* Name.Variable */ 49 | html[data-theme="light"] .highlight .ow { color: #6730C5 } /* Operator.Word */ 50 | html[data-theme="light"] .highlight .pm { color: #080808 } /* Punctuation.Marker */ 51 | html[data-theme="light"] .highlight .w { color: #080808 } /* Text.Whitespace */ 52 | html[data-theme="light"] .highlight .mb { color: #7F4707 } /* Literal.Number.Bin */ 53 | html[data-theme="light"] .highlight .mf { color: #7F4707 } /* Literal.Number.Float */ 54 | html[data-theme="light"] .highlight .mh { color: #7F4707 } /* Literal.Number.Hex */ 55 | html[data-theme="light"] .highlight .mi { color: #7F4707 } /* Literal.Number.Integer */ 56 | html[data-theme="light"] .highlight .mo { color: #7F4707 } /* Literal.Number.Oct */ 57 | html[data-theme="light"] .highlight .sa { color: #00622F } /* Literal.String.Affix */ 58 | html[data-theme="light"] .highlight .sb { color: #00622F } /* Literal.String.Backtick */ 59 | html[data-theme="light"] .highlight .sc { color: #00622F } /* Literal.String.Char */ 60 | html[data-theme="light"] .highlight .dl { color: #00622F } /* Literal.String.Delimiter */ 61 | html[data-theme="light"] .highlight .sd { color: #00622F } /* Literal.String.Doc */ 62 | html[data-theme="light"] .highlight .s2 { color: #00622F } /* Literal.String.Double */ 63 | html[data-theme="light"] .highlight .se { color: #00622F } /* Literal.String.Escape */ 64 | html[data-theme="light"] .highlight .sh { color: #00622F } /* Literal.String.Heredoc */ 65 | html[data-theme="light"] .highlight .si { color: #00622F } /* Literal.String.Interpol */ 66 | html[data-theme="light"] .highlight .sx { color: #00622F } /* Literal.String.Other */ 67 | html[data-theme="light"] .highlight .sr { color: #A12236 } /* Literal.String.Regex */ 68 | html[data-theme="light"] .highlight .s1 { color: #00622F } /* Literal.String.Single */ 69 | html[data-theme="light"] .highlight .ss { color: #005B82 } /* Literal.String.Symbol */ 70 | html[data-theme="light"] .highlight .bp { color: #7F4707 } /* Name.Builtin.Pseudo */ 71 | html[data-theme="light"] .highlight .fm { color: #005B82 } /* Name.Function.Magic */ 72 | html[data-theme="light"] .highlight .vc { color: #A12236 } /* Name.Variable.Class */ 73 | html[data-theme="light"] .highlight .vg { color: #A12236 } /* Name.Variable.Global */ 74 | html[data-theme="light"] .highlight .vi { color: #A12236 } /* Name.Variable.Instance */ 75 | html[data-theme="light"] .highlight .vm { color: #7F4707 } /* Name.Variable.Magic */ 76 | html[data-theme="light"] .highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */ 77 | html[data-theme="dark"] .highlight pre { line-height: 125%; } 78 | html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 79 | html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 80 | html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 81 | html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 82 | html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e } 83 | html[data-theme="dark"] .highlight { background: #2b2b2b; color: #F8F8F2 } 84 | html[data-theme="dark"] .highlight .c { color: #FFD900 } /* Comment */ 85 | html[data-theme="dark"] .highlight .err { color: #FFA07A } /* Error */ 86 | html[data-theme="dark"] .highlight .k { color: #DCC6E0 } /* Keyword */ 87 | html[data-theme="dark"] .highlight .l { color: #FFD900 } /* Literal */ 88 | html[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */ 89 | html[data-theme="dark"] .highlight .o { color: #ABE338 } /* Operator */ 90 | html[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */ 91 | html[data-theme="dark"] .highlight .ch { color: #FFD900 } /* Comment.Hashbang */ 92 | html[data-theme="dark"] .highlight .cm { color: #FFD900 } /* Comment.Multiline */ 93 | html[data-theme="dark"] .highlight .cp { color: #FFD900 } /* Comment.Preproc */ 94 | html[data-theme="dark"] .highlight .cpf { color: #FFD900 } /* Comment.PreprocFile */ 95 | html[data-theme="dark"] .highlight .c1 { color: #FFD900 } /* Comment.Single */ 96 | html[data-theme="dark"] .highlight .cs { color: #FFD900 } /* Comment.Special */ 97 | html[data-theme="dark"] .highlight .gd { color: #00E0E0 } /* Generic.Deleted */ 98 | html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */ 99 | html[data-theme="dark"] .highlight .gh { color: #00E0E0 } /* Generic.Heading */ 100 | html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */ 101 | html[data-theme="dark"] .highlight .gu { color: #00E0E0 } /* Generic.Subheading */ 102 | html[data-theme="dark"] .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */ 103 | html[data-theme="dark"] .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */ 104 | html[data-theme="dark"] .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */ 105 | html[data-theme="dark"] .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */ 106 | html[data-theme="dark"] .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */ 107 | html[data-theme="dark"] .highlight .kt { color: #FFD900 } /* Keyword.Type */ 108 | html[data-theme="dark"] .highlight .ld { color: #FFD900 } /* Literal.Date */ 109 | html[data-theme="dark"] .highlight .m { color: #FFD900 } /* Literal.Number */ 110 | html[data-theme="dark"] .highlight .s { color: #ABE338 } /* Literal.String */ 111 | html[data-theme="dark"] .highlight .na { color: #FFD900 } /* Name.Attribute */ 112 | html[data-theme="dark"] .highlight .nb { color: #FFD900 } /* Name.Builtin */ 113 | html[data-theme="dark"] .highlight .nc { color: #00E0E0 } /* Name.Class */ 114 | html[data-theme="dark"] .highlight .no { color: #00E0E0 } /* Name.Constant */ 115 | html[data-theme="dark"] .highlight .nd { color: #FFD900 } /* Name.Decorator */ 116 | html[data-theme="dark"] .highlight .ni { color: #ABE338 } /* Name.Entity */ 117 | html[data-theme="dark"] .highlight .ne { color: #DCC6E0 } /* Name.Exception */ 118 | html[data-theme="dark"] .highlight .nf { color: #00E0E0 } /* Name.Function */ 119 | html[data-theme="dark"] .highlight .nl { color: #FFD900 } /* Name.Label */ 120 | html[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */ 121 | html[data-theme="dark"] .highlight .nx { color: #F8F8F2 } /* Name.Other */ 122 | html[data-theme="dark"] .highlight .py { color: #00E0E0 } /* Name.Property */ 123 | html[data-theme="dark"] .highlight .nt { color: #00E0E0 } /* Name.Tag */ 124 | html[data-theme="dark"] .highlight .nv { color: #FFA07A } /* Name.Variable */ 125 | html[data-theme="dark"] .highlight .ow { color: #DCC6E0 } /* Operator.Word */ 126 | html[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */ 127 | html[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */ 128 | html[data-theme="dark"] .highlight .mb { color: #FFD900 } /* Literal.Number.Bin */ 129 | html[data-theme="dark"] .highlight .mf { color: #FFD900 } /* Literal.Number.Float */ 130 | html[data-theme="dark"] .highlight .mh { color: #FFD900 } /* Literal.Number.Hex */ 131 | html[data-theme="dark"] .highlight .mi { color: #FFD900 } /* Literal.Number.Integer */ 132 | html[data-theme="dark"] .highlight .mo { color: #FFD900 } /* Literal.Number.Oct */ 133 | html[data-theme="dark"] .highlight .sa { color: #ABE338 } /* Literal.String.Affix */ 134 | html[data-theme="dark"] .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */ 135 | html[data-theme="dark"] .highlight .sc { color: #ABE338 } /* Literal.String.Char */ 136 | html[data-theme="dark"] .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */ 137 | html[data-theme="dark"] .highlight .sd { color: #ABE338 } /* Literal.String.Doc */ 138 | html[data-theme="dark"] .highlight .s2 { color: #ABE338 } /* Literal.String.Double */ 139 | html[data-theme="dark"] .highlight .se { color: #ABE338 } /* Literal.String.Escape */ 140 | html[data-theme="dark"] .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */ 141 | html[data-theme="dark"] .highlight .si { color: #ABE338 } /* Literal.String.Interpol */ 142 | html[data-theme="dark"] .highlight .sx { color: #ABE338 } /* Literal.String.Other */ 143 | html[data-theme="dark"] .highlight .sr { color: #FFA07A } /* Literal.String.Regex */ 144 | html[data-theme="dark"] .highlight .s1 { color: #ABE338 } /* Literal.String.Single */ 145 | html[data-theme="dark"] .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */ 146 | html[data-theme="dark"] .highlight .bp { color: #FFD900 } /* Name.Builtin.Pseudo */ 147 | html[data-theme="dark"] .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */ 148 | html[data-theme="dark"] .highlight .vc { color: #FFA07A } /* Name.Variable.Class */ 149 | html[data-theme="dark"] .highlight .vg { color: #FFA07A } /* Name.Variable.Global */ 150 | html[data-theme="dark"] .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */ 151 | html[data-theme="dark"] .highlight .vm { color: #FFD900 } /* Name.Variable.Magic */ 152 | html[data-theme="dark"] .highlight .il { color: #FFD900 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/scripts/bootstrap.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.3.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_static/scripts/fontawesome.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | * Copyright 2024 Fonticons, Inc. 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_static/scripts/pydata-sphinx-theme.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";function e(e){"loading"!=document.readyState?e():document.addEventListener("DOMContentLoaded",e)}const t=e=>"string"==typeof e&&/^[v\d]/.test(e)&&o.test(e),n=(e,t,n)=>{u(n);const o=((e,t)=>{const n=r(e),o=r(t),a=n.pop(),s=o.pop(),i=c(n,o);return 0!==i?i:a&&s?c(a.split("."),s.split(".")):a||s?a?-1:1:0})(e,t);return l[n].includes(o)},o=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,r=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(o);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},a=e=>"*"===e||"x"===e||"X"===e,s=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},i=(e,t)=>{if(a(e)||a(t))return 0;const[n,o]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(s(e),s(t));return n>o?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},d=Object.keys(l),u=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===d.indexOf(e))throw new Error(`Invalid operator, expected one of ${d.join("|")}`)};var m=window.matchMedia("(prefers-color-scheme: dark)");function h(e){document.documentElement.dataset.theme=m.matches?"dark":"light"}function p(e){"light"!==e&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto");var t=m.matches?"dark":"light";document.documentElement.dataset.mode=e;var n="auto"==e?t:e;document.documentElement.dataset.theme=n,document.querySelectorAll(".dropdown-menu").forEach((e=>{"dark"===n?e.classList.add("dropdown-menu-dark"):e.classList.remove("dropdown-menu-dark")})),localStorage.setItem("mode",e),localStorage.setItem("theme",n),console.log(`[PST]: Changed to ${e} mode using the ${n} theme.`),m.onchange="auto"==e?h:""}function f(){const e=document.documentElement.dataset.defaultMode||"auto",t=localStorage.getItem("mode")||e;var n,o;p(((o=(n=m.matches?["auto","light","dark"]:["auto","dark","light"]).indexOf(t)+1)===n.length&&(o=0),n[o]))}var g=()=>{let e=document.querySelectorAll("form.bd-search");return e.length?(1==e.length?e[0]:document.querySelector(":not(#pst-search-dialog) > form.bd-search")).querySelector("input"):void 0},v=()=>{const e=g(),t=document.getElementById("pst-search-dialog");e===t.querySelector("input")?t.open?t.close():t.showModal():document.activeElement===e?e.blur():(e.focus(),e.select(),e.scrollIntoView({block:"center"}))},y=0===navigator.platform.indexOf("Mac")||"iPhone"===navigator.platform;const w=({currentTarget:e,clientX:t,clientY:n})=>{if(!e.open)return;const{left:o,right:r,top:a,bottom:s}=e.getBoundingClientRect();(t"dirhtml"==DOCUMENTATION_OPTIONS.BUILDER?DOCUMENTATION_OPTIONS.pagename.endsWith("index")?`${DOCUMENTATION_OPTIONS.pagename.substring(0,DOCUMENTATION_OPTIONS.pagename.length-5)}`:`${DOCUMENTATION_OPTIONS.pagename}/`:`${DOCUMENTATION_OPTIONS.pagename}.html`;async function T(e){document.querySelector("#bd-header-version-warning").remove();const t=DOCUMENTATION_OPTIONS.VERSION,n=new Date,o=JSON.parse(localStorage.getItem("pst_banner_pref")||"{}");console.debug(`[PST] Dismissing the version warning banner on ${t} starting ${n}.`),o[t]=n,localStorage.setItem("pst_banner_pref",JSON.stringify(o))}async function S(e){e.preventDefault();const t=E();let n=e.currentTarget.getAttribute("href"),o=n.replace(t,"");try{(await fetch(n,{method:"HEAD"})).ok?location.href=n:location.href=o}catch(e){location.href=o}}async function b(){var e=document.querySelectorAll(".version-switcher__button");const o=e.length>0,r=DOCUMENTATION_OPTIONS.hasOwnProperty("theme_switcher_json_url"),a=DOCUMENTATION_OPTIONS.show_version_warning_banner;if(r&&(o||a)){const o=await async function(e){const t=E();try{var n=new URL(e)}catch(o){if(!(o instanceof TypeError))throw o;{"file:"==window.location.protocol&&console.info("[PST] looks like you're viewing this site from a local filesystem, so the version switcher won't work unless you've disabled CORS. See https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html");const o=window.location.href.indexOf(t),r=-1==o?window.location.href:window.location.href.substring(0,o);n=new URL(e,r)}}const o=await fetch(n);return await o.json()}(DOCUMENTATION_OPTIONS.theme_switcher_json_url);o&&(function(e,t){const n=E();t.forEach((e=>{e.dataset.activeVersionName="",e.dataset.activeVersion=""}));const o=(e=e.map((e=>(e.match=e.version==DOCUMENTATION_OPTIONS.theme_switcher_version_match,e.preferred=e.preferred||!1,"name"in e||(e.name=e.version),e)))).map((e=>e.preferred&&e.match)).some(Boolean);var r=!1;e.forEach((e=>{const a=document.createElement("a");a.setAttribute("class","dropdown-item list-group-item list-group-item-action py-1"),a.setAttribute("href",`${e.url}${n}`),a.setAttribute("role","option");const s=document.createElement("span");s.textContent=`${e.name}`,a.appendChild(s),a.dataset.versionName=e.name,a.dataset.version=e.version;let i=o&&e.preferred,c=!o&&!r&&e.match;(i||c)&&(a.classList.add("active"),t.forEach((t=>{t.innerText=e.name,t.dataset.activeVersionName=e.name,t.dataset.activeVersion=e.version})),r=!0),document.querySelectorAll(".version-switcher__menu").forEach((e=>{let t=a.cloneNode(!0);t.onclick=S,e.append(t)}))}))}(o,e),a&&function(e){var o=DOCUMENTATION_OPTIONS.VERSION,r=e.filter((e=>e.preferred));if(1!==r.length){const e=0==r.length?"No":"Multiple";return void console.log(`[PST] ${e} versions marked "preferred" found in versions JSON, ignoring.`)}const a=r[0].version,s=r[0].url,i=t(o)&&t(a);if(i&&n(o,a,"="))return void console.log("[PST]: This is the preferred version of the docs, not showing the warning banner.");const c=JSON.parse(localStorage.getItem("pst_banner_pref")||"{}")[o];if(null!=c){const e=new Date(c),t=(new Date-e)/864e5;if(t<14)return void console.info(`[PST] Suppressing version warning banner; was dismissed ${Math.floor(t)} day(s) ago`)}const l=document.querySelector("#bd-header-version-warning"),d=document.createElement("div"),u=document.createElement("div"),m=document.createElement("strong"),h=document.createElement("a"),p=document.createElement("a");d.classList="bd-header-announcement__content ms-auto me-auto",u.classList="sidebar-message",h.classList="btn text-wrap font-weight-bold ms-3 my-1 align-baseline pst-button-link-to-stable-version",h.href=`${s}${E()}`,h.innerText="Switch to stable version",h.onclick=S,p.classList="ms-3 my-1 align-baseline";const f=document.createElement("i");p.append(f),f.classList="fa-solid fa-xmark",p.onclick=T,u.innerText="This is documentation for ";const g=o.includes("dev")||o.includes("rc")||o.includes("pre"),v=i&&n(o,a,">");g||v?m.innerText="an unstable development version":i&&n(o,a,"<")?m.innerText=`an old version (${o})`:m.innerText=o?`version ${o}`:"an unknown version",l.appendChild(d),l.append(p),d.appendChild(u),u.appendChild(m),u.appendChild(document.createTextNode(".")),u.appendChild(h),l.classList.remove("d-none")}(o))}}function O(){const e=()=>{document.querySelectorAll(["pre",".nboutput > .output_area",".cell_output > .output",".jp-RenderedHTMLCommon",".pst-scrollable-table-container"].join(", ")).forEach((e=>{e.tabIndex=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?0:-1}))},t=function(e,t){let n=null;return(...t)=>{clearTimeout(n),n=setTimeout((()=>{e(...t)}),300)}}(e);window.addEventListener("resize",t),new MutationObserver(t).observe(document.getElementById("main-content"),{subtree:!0,childList:!0}),e()}async function N(){const e=document.querySelector(".bd-header-announcement"),{pstAnnouncementUrl:t}=e?e.dataset:null;if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`[PST]: HTTP response status not ok: ${n.status} ${n.statusText}`);const o=await n.text();if(0===o.length)return void console.log(`[PST]: Empty announcement at: ${t}`);e.innerHTML=`
${o}
`,e.classList.remove("d-none")}catch(e){console.log(`[PST]: Failed to load announcement at: ${t}`),console.error(e)}}e((async function(){await Promise.allSettled([b(),N()]);const e=document.querySelector(".pst-async-banner-revealer");if(!e)return;e.classList.remove("d-none");const t=Array.from(e.children).reduce(((e,t)=>e+t.offsetHeight),0);e.style.setProperty("height",`${t}px`),setTimeout((()=>{e.style.setProperty("height","auto")}),320)})),e((function(){p(document.documentElement.dataset.mode),document.querySelectorAll(".theme-switch-button").forEach((e=>{e.addEventListener("click",f)}))})),e((function(){if(!document.querySelector(".bd-docs-nav"))return;var e=document.querySelector("div.bd-sidebar");let t=parseInt(sessionStorage.getItem("sidebar-scroll-top"),10);if(isNaN(t)){var n=document.querySelector(".bd-docs-nav").querySelectorAll(".active");if(n.length>0){var o=n[n.length-1],r=o.getBoundingClientRect().y-e.getBoundingClientRect().y;if(o.getBoundingClientRect().y>.5*window.innerHeight){let t=.25;e.scrollTop=r-e.clientHeight*t,console.log("[PST]: Scrolled sidebar using last active link...")}}}else e.scrollTop=t,console.log("[PST]: Scrolled sidebar using stored browser position...");window.addEventListener("beforeunload",(()=>{sessionStorage.setItem("sidebar-scroll-top",e.scrollTop)}))})),e((function(){window.addEventListener("activate.bs.scrollspy",(function(){document.querySelectorAll(".bd-toc-nav a").forEach((e=>{e.parentElement.classList.remove("active")})),document.querySelectorAll(".bd-toc-nav a.active").forEach((e=>{e.parentElement.classList.add("active")}))}))})),e((()=>{(()=>{let e=document.querySelectorAll(".search-button__kbd-shortcut");y&&e.forEach((e=>e.querySelector("kbd.kbd-shortcut__modifier").innerText="⌘"))})(),window.addEventListener("keydown",(e=>{let t=g();e.shiftKey||e.altKey||(y?!e.metaKey||e.ctrlKey:e.metaKey||!e.ctrlKey)||!/^k$/i.test(e.key)?document.activeElement===t&&/Escape/i.test(e.key)&&v():(e.preventDefault(),v())}),!0),document.querySelectorAll(".search-button__button").forEach((e=>{e.onclick=v})),document.getElementById("pst-search-dialog").addEventListener("click",w)})),e((function(){const e=document.getElementById("pst-primary-sidebar"),t=document.getElementById("pst-secondary-sidebar"),n=document.getElementById("pst-primary-sidebar-modal"),o=document.getElementById("pst-secondary-sidebar-modal"),r=document.querySelector(".primary-toggle"),a=document.querySelector(".secondary-toggle"),s=(e,t)=>{Array.from(e.childNodes).forEach((e=>t.appendChild(e))),Array.from(e.classList).forEach((n=>{e.classList.remove(n),t.classList.add(n)}))};[[r,n,e],[a,o,t]].forEach((([e,t,n])=>{e&&t&&n&&(e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),s(n,t),t.showModal()})),t.addEventListener("click",w),t.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t.close())})),t.addEventListener("close",(()=>{s(t,n)})))}))})),"complete"===document.readyState?O():window.addEventListener("load",O)})(); 2 | //# sourceMappingURL=pydata-sphinx-theme.js.map -------------------------------------------------------------------------------- /docs/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /docs/_static/styles/theme.css: -------------------------------------------------------------------------------- 1 | /* Provided by Sphinx's 'basic' theme, and included in the final set of assets */ 2 | @import "../basic.css"; 3 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | {% macro head_pre_assets() %} 7 | 8 | 9 | 10 | {% endmacro %} 11 | 12 | {% macro head_js_preload() %} 13 | 14 | 15 | 16 | 17 | 18 | {% endmacro %} 19 | 20 | {% macro body_post() %} 21 | 22 | 23 | 24 | {% endmacro %} -------------------------------------------------------------------------------- /docs/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — RiverREM 1.1.2 documentation 11 | 12 | 13 | 14 | 18 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 | 62 | 63 | 64 | 65 | 66 | 81 | 82 | 83 |
84 | 85 |
86 | 87 | 88 | 220 | 221 | 222 |
223 |
224 | 225 | 226 | 227 | 228 | 229 | 230 |
231 | 232 | 233 | 234 | 316 | 317 | 318 | 327 | 328 | 329 |
330 | 331 |
332 | 333 | 334 |
335 |
336 | 337 |
338 | 339 | 340 | 341 | 342 | 343 |
344 | 345 | 346 |

Index

347 | 348 |
349 | C 350 | | M 351 | | R 352 | 353 |
354 |

C

355 | 356 | 360 |
361 | 362 |

M

363 | 364 | 376 | 393 |
394 | 395 |

R

396 | 397 | 410 | 419 |
    411 |
  • 412 | riverrem.REMMaker 413 | 414 |
  • 418 |
420 | 421 | 422 | 423 |
424 | 425 | 426 | 427 | 428 | 429 |
430 | 431 |
432 |
433 |
434 | 435 |
436 | 437 | 438 | 439 | 440 |
441 |
442 | 443 |
444 | 445 |
446 |
447 |
448 | 449 | 450 | 451 | 452 | 453 |
454 | 491 | 492 |
493 | 494 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Welcome to RiverREM’s documentation! — RiverREM 1.1.2 documentation 12 | 13 | 14 | 15 | 19 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | 62 | 64 | 65 | 66 | 67 | 68 | 83 | 84 | 85 |
86 | 87 |
88 | 89 | 90 | 226 | 227 | 228 |
229 |
230 | 231 | 232 | 233 | 234 | 235 | 236 |
237 | 238 | 239 | 240 | 322 | 323 | 324 | 333 | 334 | 335 |
336 | 337 |
338 | 339 | 340 |
341 |
342 | 343 |
344 | 345 | 346 | 347 | 348 | 349 |
350 | 351 |
352 |

Welcome to RiverREM’s documentation!#

353 |

Source code: OpenTopography/RiverREM

354 |

OT blog post: link

355 | _images/neches_topo_crop.jpg 356 |

RiverREM is a Python package for automatically generating river relative elevation model (REM) visualizations from nothing but an input digital elevation model (DEM). The package uses the OpenStreetMap API to retrieve river centerline geometries over the DEM extent. Interpolation of river elevations is automatically handled using a sampling scheme based on raster resolution and river sinuosity to create striking high-resolution visualizations out of the box and without the need for additional manual steps. The package also contains a helper class for creating DEM raster visualizations.

357 | 386 |
387 |

Indices and tables#

388 | 393 |
394 |
395 | 396 | 397 |
398 | 399 | 400 | 401 | 402 | 403 | 417 | 418 |
419 | 420 | 421 | 422 | 423 |
448 | 449 | 450 |
451 |
452 | 453 |
454 | 455 |
456 |
457 |
458 | 459 | 460 | 461 | 462 | 463 |
464 | 501 | 502 |
503 | 504 | -------------------------------------------------------------------------------- /docs/installation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Installation — RiverREM 1.1.2 documentation 12 | 13 | 14 | 15 | 19 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | 65 | 66 | 67 | 68 | 69 | 84 | 85 | 86 |
87 | 88 |
89 | 90 | 91 | 227 | 228 | 229 |
230 |
231 | 232 | 233 | 234 | 235 |
236 | 237 | 238 | 239 | 321 | 322 | 330 | 331 | 332 | 341 | 342 | 343 |
344 | 345 |
346 | 347 | 348 |
349 |
350 | 351 |
352 |
353 | 354 |
355 | 356 |
357 | 358 | 369 |
370 | 371 |
372 | 373 | 374 |
375 |
376 | 377 | 378 | 379 | 380 | 381 |
382 | 383 |
384 |

Installation#

385 | 400 |
401 |

Installation method 2: Existing environment#

402 |

Install via conda/mamba

403 |
conda install -c conda-forge riverrem
404 | 
405 |
406 |
407 |
408 |

Installation method 3: Repository clone#

409 |

Clone the GitHub repository and create a conda environment from the environment.yml

410 |
git clone https://github.com/opentopography/RiverREM.git
411 | cd RiverREM
412 | conda env create -n rem_env --file environment.yml
413 | 
414 |
415 |
416 |
417 |

Confirm installation works#

418 |

After installing, you should be able to open a Python interpreter and import without errors:

419 |
from riverrem.REMMaker import REMMaker
420 | 
421 |
422 |

Continue to the Quickstart to start making REMs.

423 |
424 |
425 | 426 | 427 |
428 | 429 | 430 | 431 | 432 | 433 | 456 | 457 |
458 | 459 | 460 | 461 | 462 |
490 | 491 | 492 |
493 |
494 | 495 |
496 | 497 |
498 |
499 |
500 | 501 | 502 | 503 | 504 | 505 |
506 | 543 | 544 |
545 | 546 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/docs/objects.inv -------------------------------------------------------------------------------- /docs/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Python Module Index — RiverREM 1.1.2 documentation 11 | 12 | 13 | 14 | 18 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | 65 | 66 | 67 | 68 | 69 | 84 | 85 | 86 |
87 | 88 |
89 | 90 | 91 | 223 | 224 | 225 |
226 |
227 | 228 | 229 | 230 | 231 | 232 | 233 |
234 | 235 | 236 | 237 | 319 | 320 | 321 | 330 | 331 | 332 |
333 | 334 |
335 | 336 | 337 |
338 |
339 | 340 |
341 | 342 | 343 | 344 | 345 | 346 |
347 | 348 | 349 |

Python Module Index

350 | 351 |
352 | r 353 |
354 | 355 | 356 | 357 | 359 | 360 | 362 | 365 | 366 | 367 | 370 | 371 | 372 | 375 |
 
358 | r
363 | riverrem 364 |
    368 | riverrem.RasterViz 369 |
    373 | riverrem.REMMaker 374 |
376 | 377 | 378 |
379 | 380 | 381 | 382 | 383 | 384 |
385 | 386 |
387 |
388 |
389 | 390 |
391 | 392 | 393 | 394 | 395 |
396 |
397 | 398 |
399 | 400 |
401 |
402 |
403 | 404 | 405 | 406 | 407 | 408 |
409 | 446 | 447 |
448 | 449 | -------------------------------------------------------------------------------- /docs/quickstart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Quickstart — RiverREM 1.1.2 documentation 12 | 13 | 14 | 15 | 19 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | 65 | 66 | 67 | 68 | 69 | 84 | 85 | 86 |
87 | 88 |
89 | 90 | 91 | 227 | 228 | 229 |
230 |
231 | 232 | 233 | 234 | 235 |
236 | 237 | 238 | 239 | 321 | 322 | 330 | 331 | 332 | 341 | 342 | 343 |
344 | 345 |
346 | 347 | 348 |
349 |
350 | 351 |
352 |
353 | 354 |
355 | 356 |
357 | 358 | 369 |
370 | 371 |
372 | 373 | 374 |
375 |
376 | 377 | 378 | 379 | 380 | 381 |
382 | 383 |
384 |

Quickstart#

385 |

First, ensure you have gone through Installation of RiverREM.

386 |
387 |

Input DEM#

388 |

After installing RiverREM, you’ll need a digital elevation model (DEM) for the area of interest. Some sources for free topographic data:

389 |
390 |
395 |
396 |

To read the DEM into a REMMaker object, we run the following code:

397 |
from riverrem.REMMaker import REMMaker
398 | # provide the DEM file path and desired output directory
399 | rem_maker = REMMaker(dem='/path/to/dem.tif')
400 | 
401 |
402 |

The REMMaker accepts other arguments to specify things like custom river centerlines and output locations. See the REM Module documentation for more.

403 |
404 |
405 |

Making an REM#

406 |

Next, we can create an REM from the input DEM. If a centerline shapefile was not provided, RiverREM will automatically identify the largest river in the DEM domain using OpenStreetMaps.

407 |
# create an REM
408 | rem_maker.make_rem()
409 | 
410 |
411 |

Running this produces an output REM, containing the detrended elevation values (elevation heights relative to the river). The raw REM can be visualized using a GIS program such as QGIS and processed/analyzed manually if desired.

412 |
413 |
414 |

Making a colorful REM visualization#

415 |

Lastly, we apply shading and color mapping to the REM to make a colorful visualization:

416 |
# create an REM visualization with the given colormap
417 | rem_maker.make_rem_viz(cmap='topo')
418 | 
419 |
420 |
421 |
422 |

Visualization options#

423 |

By default, the colormap is applied to a logarithmically-transformed REM elevation values. This is used to emphasize elevation differences closer to the river and make the river geomorphology more prominent.

424 |

Any named colormap from matplotlib, seaborn, or cmocean can be specified for the cmap parameter. Alternatively, a custom colormap can be specified in the form of a function that takes numeric inputs in the 0-255 range and outputs (R, G, B) tuples in the 0-1 range.

425 |

The color relief REM is also blended with a hillshade raster to give a 3D shadow effect. Vertical exaggeration can be adjusted with the z parameter. The amount of hillshade/color blending can be specified by the blend_percent parameter.

426 |

For a fill list of options and descriptions of methods, see REM Module documentation.

427 |
428 |
429 | 430 | 431 |
432 | 433 | 434 | 435 | 436 | 437 | 460 | 461 |
462 | 463 | 464 | 465 | 466 |
494 | 495 | 496 |
497 |
498 | 499 |
500 | 501 |
502 |
503 |
504 | 505 | 506 | 507 | 508 | 509 |
510 | 547 | 548 |
549 | 550 | -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search - RiverREM 1.1.2 documentation 10 | 11 | 12 | 13 | 17 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | 62 | 64 | 65 | 66 | 67 | 68 | 83 | 84 | 85 |
86 | 87 |
88 | 89 | 90 | 222 | 223 | 224 |
225 |
226 | 227 | 228 | 229 | 230 | 231 | 232 |
233 | 234 | 235 | 236 | 318 | 319 | 320 | 329 | 330 | 331 |
332 | 333 |
334 | 335 | 336 |
337 |
338 | 339 |
340 | 341 | 342 |
343 |

Search

344 | 350 | 351 | 366 |
367 |
368 | 377 | 378 | 379 | 380 | 381 | 382 |
383 | 384 |
385 |
386 |
387 | 388 |
389 | 390 | 391 | 392 | 393 |
394 |
395 | 396 |
397 | 398 |
399 |
400 |
401 | 402 | 403 | 404 | 405 | 406 |
407 | 444 | 445 |
446 | 447 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({"alltitles": {"Confirm installation works": [[1, "confirm-installation-works"]], "Contents:": [[0, null]], "DEM Visualization Module": [[4, null]], "Handling large datasets": [[3, "handling-large-datasets"]], "Indices and tables": [[0, "indices-and-tables"]], "Input DEM": [[2, "input-dem"]], "Installation": [[1, null]], "Installation method 1 (recommended): New environment with conda/mamba": [[1, "installation-method-1-recommended-new-environment-with-conda-mamba"]], "Installation method 2: Existing environment": [[1, "installation-method-2-existing-environment"]], "Installation method 3: Repository clone": [[1, "installation-method-3-repository-clone"]], "Making a colorful REM visualization": [[2, "making-a-colorful-rem-visualization"]], "Making an REM": [[2, "making-an-rem"]], "Quickstart": [[2, null]], "REM Module": [[3, null]], "REMMaker module": [[3, "module-riverrem.REMMaker"]], "RasterViz module": [[4, "module-riverrem.RasterViz"]], "River centerlines": [[3, "river-centerlines"]], "Visualization options": [[2, "visualization-options"]], "Welcome to RiverREM\u2019s documentation!": [[0, null]]}, "docnames": ["index", "installation", "quickstart", "remindex", "vizindex"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst", "installation.rst", "quickstart.rst", "remindex.rst", "vizindex.rst"], "indexentries": {"clear_osm_cache() (in module riverrem.remmaker)": [[3, "riverrem.REMMaker.clear_osm_cache", false]], "make_aspect() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_aspect", false]], "make_color_relief() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_color_relief", false]], "make_hillshade() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_hillshade", false]], "make_hillshade_color() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_hillshade_color", false]], "make_rem() (riverrem.remmaker.remmaker method)": [[3, "riverrem.REMMaker.REMMaker.make_rem", false]], "make_rem_viz() (riverrem.remmaker.remmaker method)": [[3, "riverrem.REMMaker.REMMaker.make_rem_viz", false]], "make_roughness() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_roughness", false]], "make_slope() (riverrem.rasterviz.rasterviz method)": [[4, "riverrem.RasterViz.RasterViz.make_slope", false]], "module": [[3, "module-riverrem.REMMaker", false], [4, "module-riverrem.RasterViz", false]], "rasterviz (class in riverrem.rasterviz)": [[4, "riverrem.RasterViz.RasterViz", false]], "remmaker (class in riverrem.remmaker)": [[3, "riverrem.REMMaker.REMMaker", false]], "riverrem.rasterviz": [[4, "module-riverrem.RasterViz", false]], "riverrem.remmaker": [[3, "module-riverrem.REMMaker", false]]}, "objects": {"riverrem": [[3, 0, 0, "-", "REMMaker"], [4, 0, 0, "-", "RasterViz"]], "riverrem.REMMaker": [[3, 1, 1, "", "REMMaker"], [3, 3, 1, "", "clear_osm_cache"]], "riverrem.REMMaker.REMMaker": [[3, 2, 1, "", "make_rem"], [3, 2, 1, "", "make_rem_viz"]], "riverrem.RasterViz": [[4, 1, 1, "", "RasterViz"]], "riverrem.RasterViz.RasterViz": [[4, 2, 1, "", "make_aspect"], [4, 2, 1, "", "make_color_relief"], [4, 2, 1, "", "make_hillshade"], [4, 2, 1, "", "make_hillshade_color"], [4, 2, 1, "", "make_roughness"], [4, 2, 1, "", "make_slope"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "terms": {"": 3, "0": [2, 3, 4], "1": [0, 2, 3, 4], "10": 3, "100": [3, 4], "1000": 3, "1000000": 3, "12": 3, "2": 0, "25": 3, "255": 2, "3": [0, 4], "315": 4, "360": 4, "3857": 4, "3d": 2, "4": 3, "45": 4, "5": 3, "60": 4, "90": 4, "By": 2, "For": [2, 3], "If": [1, 2, 3], "It": 4, "The": [0, 1, 2, 3], "These": 3, "To": 2, "abl": 1, "abov": 1, "accept": [2, 4], "accur": 3, "accuraci": 3, "activ": 1, "actual": 3, "addit": [0, 3, 4], "adjust": 2, "after": [1, 2, 3], "all": [3, 4], "allow": 3, "along": 3, "also": [0, 2, 4], "alt": 4, "altern": [2, 3], "altitud": 4, "amount": 2, "an": [0, 3], "analyz": 2, "ani": 2, "api": [0, 3], "appli": [2, 3], "appropri": 3, "ar": [1, 3], "area": 2, "arg": [3, 4], "argument": [2, 4], "asc": 4, "ascii": 4, "aspect": 4, "automat": [0, 2, 3], "avail": 3, "azim": 4, "azimuth": 4, "b": 2, "band": 4, "base": 0, "been": [3, 4], "between": 3, "bind": 4, "blend": [2, 3, 4], "blend_perc": [2, 3, 4], "blog": 0, "bool": [3, 4], "box": 0, "c": 1, "cach": [3, 4], "cache_dir": [3, 4], "call": 4, "can": [1, 2, 3, 4], "cd": 1, "cell": 3, "centerlin": [0, 2], "centerline_shp": 3, "chang": 3, "chunk": 3, "chunk_siz": 3, "class": [0, 3, 4], "clear": 3, "clear_osm_cach": 3, "clone": 0, "close": 3, "closer": [2, 4], "cmap": [2, 3, 4], "cmocean": [2, 3], "coastal": 4, "code": [0, 2], "color": [0, 3, 4], "colormap": [2, 3, 4], "colormap_refer": [3, 4], "com": 1, "command": 1, "composit": 4, "comprehens": 2, "conda": [0, 4], "configur": 4, "confirm": 0, "contain": [0, 2, 4], "continu": 1, "cpu": 3, "creat": [0, 1, 2, 3, 4], "current": [3, 4], "custom": [2, 4], "data": 2, "dataset": [0, 4], "date": 3, "decreas": 3, "default": [2, 3, 4], "degre": 4, "dem": [0, 3], "depend": [1, 3], "deriv": 4, "descript": 2, "design": 3, "desir": [2, 3], "detrend": 2, "differ": [2, 3, 4], "difficult": 4, "digit": [0, 2], "directori": [2, 3, 4], "docker": 4, "docker_run": 4, "document": 2, "doesn": 3, "domain": 2, "e": [3, 4], "each": [3, 4], "earth": [3, 4], "edit": 3, "editor": 3, "effect": 2, "either": 4, "elev": [0, 2, 3, 4], "emphas": [2, 3], "ensur": [2, 3], "env": 1, "environ": [0, 4], "ep": 3, "epsg": 4, "error": [1, 3], "estim": 3, "exagger": [2, 3, 4], "exist": 0, "expens": 3, "extens": 4, "extent": 0, "factor": [3, 4], "fals": [3, 4], "faster": [3, 4], "fewer": 3, "file": [1, 2, 3, 4], "fill": 2, "find": 3, "finish": 3, "first": 2, "float": [3, 4], "folder": 3, "follow": [2, 3], "forg": 1, "form": 2, "format": 4, "fraction": 3, "free": 2, "from": [0, 1, 2, 3, 4], "function": 2, "g": [2, 3, 4], "galleri": [3, 4], "gdal": 4, "gener": 0, "geometri": 0, "geomorphologi": 2, "georast": 4, "georeferenc": 3, "geotiff": [3, 4], "get": 3, "gi": 2, "git": 1, "github": 1, "give": 2, "given": [2, 3], "gone": 2, "googl": [3, 4], "greater": [3, 4], "ha": [3, 4], "handl": 0, "handler": [3, 4], "have": [2, 4], "height": 2, "help": 3, "helper": [0, 4], "high": [0, 3], "higher": 3, "hillshad": [2, 3, 4], "hillshda": [3, 4], "how": 3, "html": [3, 4], "http": [1, 3, 4], "i": [0, 1, 2, 3, 4], "identifi": 2, "idw": 3, "imag": [3, 4], "img": 4, "import": [1, 2], "increas": 3, "index": 0, "input": [0, 3, 4], "instal": [0, 2], "instead": 4, "int": 3, "intend": 4, "interest": [2, 3], "interp_pt": 3, "interpol": [0, 3], "interpret": 1, "invok": 4, "k": 3, "kd": 3, "kmz": [3, 4], "kwarg": [3, 4], "larg": [0, 4], "largest": 2, "lastli": 2, "length": 3, "less": 3, "light": 4, "like": 2, "limit": 3, "link": 0, "list": [2, 3], "ll": 2, "local": 4, "locat": 2, "log": 4, "log_scal": 4, "logarithm": [2, 3], "long": 3, "lower": 3, "mai": [3, 4], "make": [0, 1, 3, 4], "make_aspect": 4, "make_color_relief": 4, "make_hillshad": 4, "make_hillshade_color": 4, "make_kmz": [3, 4], "make_png": [3, 4], "make_rem": [2, 3], "make_rem_viz": [2, 3], "make_rough": 4, "make_slop": 4, "mamba": 0, "mani": 3, "manual": [0, 2], "map": [2, 4], "matplotlib": [2, 3, 4], "maximum": 3, "method": [0, 2, 3, 4], "model": [0, 2, 3], "modul": [0, 2], "more": [2, 3, 4], "multidirect": 4, "must": 4, "n": 1, "name": [2, 3, 4], "nearest": 3, "need": [0, 2], "neighbor": 3, "new": [0, 3], "next": 2, "none": 3, "note": 3, "noth": 0, "number": 3, "numer": 2, "object": 2, "older": 3, "onli": 4, "open": 1, "openstreetmap": [0, 2, 3], "opentopographi": [0, 1, 2], "opposit": [3, 4], "option": [0, 3, 4], "order": 3, "org": [3, 4], "osgeo": 4, "osm": 3, "osm_cach": 3, "ot": 0, "other": 2, "out": 0, "out_dir": [3, 4], "out_ext": 4, "output": [2, 3, 4], "outsid": 4, "over": [0, 1], "overrid": [3, 4], "packag": 0, "page": 0, "paramet": [2, 3, 4], "path": [2, 3, 4], "per": 3, "percent": [3, 4], "pixel": [3, 4], "png": [3, 4], "point": 3, "post": 0, "pretti": [3, 4], "process": [2, 3], "produc": [2, 3, 4], "product": 3, "program": 2, "project": 4, "promin": 2, "provid": [2, 3], "python": [0, 1, 4], "qgi": 2, "queri": 3, "quickli": 1, "quickstart": [0, 1], "r": 2, "ram": 3, "rang": 2, "raster": [0, 2, 3, 4], "rasterviz": 0, "raw": [2, 3], "read": 2, "recommend": 0, "rel": [0, 2, 3], "relief": [2, 3, 4], "rem": [0, 1, 4], "rem_env": 1, "rem_mak": 2, "remmak": [0, 1, 2], "replac": 1, "repositori": 0, "resolut": [0, 3], "respect": 4, "retriev": [0, 3], "return": [3, 4], "rgb": 4, "river": [0, 2], "riverrem": [1, 2, 3, 4], "robustli": 1, "rough": 4, "routin": 3, "run": [2, 3, 4], "sampl": [0, 3], "scale": [3, 4], "scheme": 0, "seaborn": [2, 3, 4], "search": 0, "see": [2, 3, 4], "segment": 3, "set": 3, "shade": [2, 3], "shadow": 2, "shapefil": [2, 3], "shell": 4, "should": 1, "sinuos": [0, 3], "sinuou": 3, "site": 3, "slope": 4, "so": [3, 4], "solv": 1, "some": 2, "sourc": [0, 2, 4], "specifi": [2, 3], "sped": 3, "stabl": [3, 4], "standalon": 4, "start": 1, "step": 0, "str": [3, 4], "strike": 0, "t": 3, "take": [2, 3, 4], "terrain": 4, "thi": [2, 3, 4], "thing": 2, "thread": 3, "through": [2, 3], "tif": [2, 4], "time": 3, "toler": 3, "topo": [2, 3, 4], "topograph": 2, "topographi": 3, "total": 3, "transform": 2, "tree": 3, "true": [3, 4], "tupl": 2, "type": [3, 4], "up": 3, "updat": 3, "us": [0, 1, 2, 3, 4], "user": 3, "usg": 2, "util": 4, "valu": [2, 3], "variat": 4, "varieti": 3, "veri": 3, "vertic": [2, 3, 4], "via": 1, "view": 3, "visual": [0, 3], "wa": 2, "we": 2, "weight": [3, 4], "well": [3, 4], "whether": 3, "while": 3, "without": [0, 1], "work": [0, 3, 4], "worker": 3, "yet": 4, "yml": 1, "you": [1, 2], "z": [2, 3, 4], "zero": 4}, "titles": ["Welcome to RiverREM\u2019s documentation!", "Installation", "Quickstart", "REM Module", "DEM Visualization Module"], "titleterms": {"": 0, "1": 1, "2": 1, "3": 1, "an": 2, "centerlin": 3, "clone": 1, "color": 2, "conda": 1, "confirm": 1, "content": 0, "dataset": 3, "dem": [2, 4], "document": 0, "environ": 1, "exist": 1, "handl": 3, "indic": 0, "input": 2, "instal": 1, "larg": 3, "make": 2, "mamba": 1, "method": 1, "modul": [3, 4], "new": 1, "option": 2, "quickstart": 2, "rasterviz": 4, "recommend": 1, "rem": [2, 3], "remmak": 3, "repositori": 1, "river": 3, "riverrem": 0, "tabl": 0, "visual": [2, 4], "welcom": 0, "work": 1}}) -------------------------------------------------------------------------------- /docs/source/conf.py: -------------------------------------------------------------------------------- 1 | # -- Path setup -------------------------------------------------------------- 2 | 3 | # If extensions (or modules to document with autodoc) are in another directory, 4 | # add these directories to sys.path here. If the directory is relative to the 5 | # documentation root, use os.path.abspath to make it absolute, like shown here. 6 | # 7 | import os 8 | import sys 9 | sys.path.insert(0, os.path.abspath('../../')) 10 | 11 | autodoc_mock_imports = ['gdal'] 12 | 13 | # Configuration file for the Sphinx documentation builder. 14 | # 15 | # For the full list of built-in configuration values, see the documentation: 16 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 17 | 18 | # -- Project information ----------------------------------------------------- 19 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 20 | 21 | project = 'RiverREM' 22 | copyright = '2025, Kenneth Larrieu' 23 | author = 'Kenneth Larrieu' 24 | release = '1.1.2' 25 | 26 | # -- General configuration --------------------------------------------------- 27 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [ 33 | 'sphinx.ext.duration', 34 | 'sphinx.ext.doctest', 35 | 'sphinx.ext.autodoc', 36 | ] 37 | 38 | templates_path = ['_templates'] 39 | exclude_patterns = [] 40 | 41 | 42 | 43 | # -- Options for HTML output ------------------------------------------------- 44 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 45 | 46 | html_theme = 'pydata_sphinx_theme' 47 | html_static_path = ['_static'] 48 | 49 | 50 | # General configuration 51 | html_theme_options = {'icon_links': [{'name': 'GitHub', 52 | 'url': 'https://github.com/OpenTopography/RiverREM', 53 | 'icon': 'fa-brands fa-square-github', 54 | 'type': 'fontawesome'}], 55 | 'external_links': [ 56 | {'name': 'OpenTopography', 57 | 'url': 'https://opentopography.org'}]} 58 | 59 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to RiverREM's documentation! 2 | ==================================== 3 | 4 | Source code: `https://github.com/OpenTopography/RiverREM `_ 5 | 6 | OT blog post: `link `_ 7 | 8 | .. image:: ../_images/neches_topo_crop.jpg 9 | 10 | 11 | 12 | RiverREM is a Python package for automatically generating river relative elevation model (REM) visualizations from nothing but an input digital elevation model (DEM). The package uses the OpenStreetMap API to retrieve river centerline geometries over the DEM extent. Interpolation of river elevations is automatically handled using a sampling scheme based on raster resolution and river sinuosity to create striking high-resolution visualizations out of the box and without the need for additional manual steps. The package also contains a helper class for creating DEM raster visualizations. 13 | 14 | .. toctree:: 15 | :maxdepth: 2 16 | :caption: Contents: 17 | 18 | installation 19 | quickstart 20 | remindex 21 | vizindex 22 | 23 | 24 | 25 | Indices and tables 26 | ------------------- 27 | 28 | * :ref:`genindex` 29 | * :ref:`modindex` 30 | * :ref:`search` 31 | -------------------------------------------------------------------------------- /docs/source/installation.rst: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | Installation 4 | *************** 5 | 6 | Installation method 1 (recommended): New environment with conda/mamba 7 | -------------------------------------------------------------------------------------- 8 | 9 | Make a new Python environment with RiverREM installed: 10 | 11 | .. code-block:: bash 12 | 13 | conda create -n rem_env riverrem 14 | 15 | 16 | .. note:: 17 | :code:`mamba` is recommended over :code:`conda` as it is able to solve environment dependencies quickly and robustly. If you are using :code:`mamba`, replace :code:`conda` with :code:`mamba` in the above command. 18 | 19 | 20 | The environment can then be activated: 21 | 22 | .. code-block:: bash 23 | 24 | conda activate rem_env 25 | 26 | Installation method 2: Existing environment 27 | ----------------------------------------------------- 28 | 29 | Install via conda/mamba 30 | 31 | .. code-block:: bash 32 | 33 | conda install -c conda-forge riverrem 34 | 35 | 36 | Installation method 3: Repository clone 37 | ----------------------------------------------------- 38 | 39 | Clone the GitHub repository and create a conda environment from the :code:`environment.yml` 40 | 41 | 42 | .. code-block:: bash 43 | 44 | git clone https://github.com/opentopography/RiverREM.git 45 | cd RiverREM 46 | conda env create -n rem_env --file environment.yml 47 | 48 | 49 | Confirm installation works 50 | -------------------------------- 51 | 52 | After installing, you should be able to open a Python interpreter and import without errors: 53 | 54 | .. code-block:: python 55 | 56 | from riverrem.REMMaker import REMMaker 57 | 58 | 59 | Continue to the Quickstart to start making REMs. 60 | 61 | -------------------------------------------------------------------------------- /docs/source/quickstart.rst: -------------------------------------------------------------------------------- 1 | Quickstart 2 | ********** 3 | 4 | First, ensure you have gone through :ref:`Installation ` of RiverREM. 5 | 6 | Input DEM 7 | ------------ 8 | 9 | After installing RiverREM, you'll need a digital elevation model (DEM) for the area of interest. Some sources for free topographic data: 10 | 11 | - `OpenTopography `_ 12 | - `USGS `_ 13 | - `Comprehensive list of DEM sources `_ 14 | 15 | To read the DEM into a :code:`REMMaker` object, we run the following code: 16 | 17 | .. code-block:: python 18 | 19 | from riverrem.REMMaker import REMMaker 20 | # provide the DEM file path and desired output directory 21 | rem_maker = REMMaker(dem='/path/to/dem.tif') 22 | 23 | The :code:`REMMaker` accepts other arguments to specify things like custom river centerlines and output locations. See the :ref:`REM Module documentation ` for more. 24 | 25 | 26 | 27 | Making an REM 28 | ------------------- 29 | 30 | Next, we can create an REM from the input DEM. If a centerline shapefile was not provided, RiverREM will automatically identify the largest river in the DEM domain using OpenStreetMaps. 31 | 32 | .. code-block:: python 33 | 34 | # create an REM 35 | rem_maker.make_rem() 36 | 37 | 38 | Running this produces an output REM, containing the detrended elevation values (elevation heights relative to the river). The raw REM can be visualized using a GIS program such as QGIS and processed/analyzed manually if desired. 39 | 40 | 41 | Making a colorful REM visualization 42 | ---------------------------------------- 43 | 44 | Lastly, we apply shading and color mapping to the REM to make a colorful visualization: 45 | 46 | .. code-block:: python 47 | 48 | # create an REM visualization with the given colormap 49 | rem_maker.make_rem_viz(cmap='topo') 50 | 51 | 52 | Visualization options 53 | ----------------------------- 54 | 55 | By default, the colormap is applied to a logarithmically-transformed REM elevation values. This is used to emphasize elevation differences closer to the river and make the river geomorphology more prominent. 56 | 57 | Any named colormap from `matplotlib `_, `seaborn `_, or `cmocean `_ can be specified for the :code:`cmap` parameter. Alternatively, a custom colormap can be specified in the form of a function that takes numeric inputs in the 0-255 range and outputs (R, G, B) tuples in the 0-1 range. 58 | 59 | The color relief REM is also blended with a hillshade raster to give a 3D shadow effect. Vertical exaggeration can be adjusted with the :code:`z` parameter. The amount of hillshade/color blending can be specified by the :code:`blend_percent` parameter. 60 | 61 | For a fill list of options and descriptions of methods, see :ref:`REM Module documentation `. 62 | 63 | -------------------------------------------------------------------------------- /docs/source/remindex.rst: -------------------------------------------------------------------------------- 1 | .. _rem-module: 2 | 3 | REM Module 4 | ********** 5 | 6 | This module can be used to automatically produce visualizations of river relative elevation 7 | models (REMs) from an input DEM. 8 | 9 | River centerlines 10 | ------------------- 11 | 12 | River centerlines used to create REMs are automatically retrieved from the OpenStreetMap (OSM) API. If a desired river segment is not listed on OSM, a new river centerline can be created/edited `on the OSM site `_ (clear the OSM cache folder after using the OSM editor to get the updated centerline). Alternatively, if OSM is up to date but the input DEM has older river topography, a user-provided centerline shapefile can be input, overriding the OSM centerline. 13 | 14 | Points sampled along the river centerline(s) are output as a shapefile along with each output REM raster. These points can be viewed to help ensure that the applied centerline is accurate. 15 | 16 | Handling large datasets 17 | --------------------------- 18 | 19 | For very large/high resolution DEMs, interpolation can take a long time. While this module is designed to work well using the default settings on a variety of datasets, interpolation can be sped up by changing the following parameters from default values: 20 | 21 | - decreasing :code:`interp_pts` (fewer total centerline sample points) 22 | - decreasing :code:`k` (fewer centerline samples per interpolation) 23 | - increasing :code:`eps` (less accurate interpolation) 24 | - increasing :code:`workers` (if more CPU threads are available) 25 | - increasing :code:`chunk_size` (if more RAM is available) 26 | 27 | REMMaker module 28 | ---------------------- 29 | 30 | .. automodule:: riverrem.REMMaker 31 | :members: clear_osm_cache 32 | 33 | .. autoclass:: riverrem.REMMaker.REMMaker 34 | :members: make_rem, make_rem_viz 35 | -------------------------------------------------------------------------------- /docs/source/vizindex.rst: -------------------------------------------------------------------------------- 1 | DEM Visualization Module 2 | ************************ 3 | 4 | This module contains a helper class (RasterViz) that is invoked by the REM module to create visualizations. 5 | It can also be used standalone to create customized visualizations of DEM/REM rasters. 6 | 7 | RasterViz module 8 | ------------------- 9 | 10 | .. automodule:: riverrem.RasterViz 11 | 12 | .. autoclass:: riverrem.RasterViz.RasterViz 13 | :members: make_aspect, make_color_relief, make_hillshade, make_hillshade_color, make_roughness, make_slope 14 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - defaults 4 | dependencies: 5 | - python>=3.6 6 | - numpy<2.0 7 | - gdal>=3.7, <3.9 8 | - conda-forge::osmnx<2.0, >=1.3 9 | - dataclasses 10 | - seaborn 11 | - cmocean 12 | - scipy>=1.6.0 13 | - shapely>=2.0 14 | - pandas 15 | - requests 16 | - geopandas 17 | - bottleneck 18 | - numexpr 19 | -------------------------------------------------------------------------------- /meta.yaml: -------------------------------------------------------------------------------- 1 | package: 2 | name: "riverrem" 3 | version: "1.1.2" 4 | 5 | source: 6 | git_rev: v1.1.2 7 | git_url: https://github.com/OpenTopography/RiverREM 8 | 9 | requirements: 10 | host: 11 | - python 12 | - setuptools 13 | build: 14 | - python >=3.6 15 | run: 16 | - python>=3.6 17 | - gdal>=3.7, <3.9 18 | - conda-forge::osmnx<2.0, >=1.3 19 | - dataclasses 20 | - seaborn 21 | - cmocean 22 | - scipy>=1.6.0 23 | - shapely>=2.0 24 | - pandas 25 | - requests 26 | - geopandas 27 | - bottleneck 28 | - numexpr 29 | 30 | about: 31 | home: https://github.com/OpenTopography/RiverREM 32 | license: GPL-3.0-only 33 | license_familY: GPL 34 | license_file: LICENSE 35 | summary: "Make river relative elevation models (REMs) from an input digital elevation model (DEM)." 36 | 37 | extra: 38 | recipe-maintainers: 39 | - klarrieu 40 | -------------------------------------------------------------------------------- /riverrem/__init__.py: -------------------------------------------------------------------------------- 1 | name = 'riverrem' 2 | __version__ = '1.1.0' 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="RiverREM", 8 | version="1.1.2", 9 | author="Kenneth Larrieu", 10 | author_email="kennylarrieu@gmail.com", 11 | description="Make river relative elevation models (REM) and REM visualizations from an input digital elevation model (DEM).", 12 | long_description=long_description, 13 | long_description_content_type="text/markdown", 14 | url="https://github.com/OpenTopography/RiverREM", 15 | packages=setuptools.find_packages(), 16 | classifiers=( 17 | "Programming Language :: Python :: 3", 18 | "License :: OSI Approved :: BSD 3-Clause License", 19 | "Operating System :: OS Independent", 20 | ), 21 | ) 22 | -------------------------------------------------------------------------------- /tests/smith_SRTM.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenTopography/RiverREM/d1efd6c765b8e9a0ae6c22dbea1e2d3a278c8dbe/tests/smith_SRTM.tif -------------------------------------------------------------------------------- /tests/test_local.py: -------------------------------------------------------------------------------- 1 | from riverrem.REMMaker import REMMaker 2 | 3 | test_dem = './tests/smith_SRTM.tif' 4 | 5 | if __name__ == "__main__": 6 | rem_maker = REMMaker(dem=test_dem) 7 | rem_maker.make_rem_viz(cmap='Blues', z=10) 8 | -------------------------------------------------------------------------------- /tests/test_url.py: -------------------------------------------------------------------------------- 1 | from riverrem.REMMaker import REMMaker 2 | 3 | test_dem = "http://download.osgeo.org/geotiff/samples/usgs/m30dem.tif" 4 | 5 | if __name__ == "__main__": 6 | rem_maker = REMMaker(dem=test_dem) 7 | rem_maker.make_rem_viz(cmap='Blues', z=10) 8 | --------------------------------------------------------------------------------