Metadata-Version: 2.1
Name: pyflwdir
Version: 0.4.2
Summary: Fast methods to work with hydro- and topography data in pure Python.
Home-page: https://gitlab.com/deltares/wflow/pyflwdir/
Author: Dirk Eilander
Author-email: dirk.eilander@deltares.nl
License: MIT
Download-URL: https://gitlab.com/deltares/wflow/pyflwdir/-/archive/0.4.2/pyflwdir-0.4.2.tar.gz
Description: .. image:: https://gitlab.com/deltares/wflow/pyflwdir/badges/master/coverage.svg
           :target: https://gitlab.com/deltares/wflow/pyflwdir/commits/master
        
        ################################################################################
        PyFlwDir
        ################################################################################
        
        Fast methods to work with hydro- and topography data in pure Python. 
        
        Methods include:
        
        - flow direction upscaling
        - basin delineation
        - pfafstetter subbasins delineation
        - upstream accumulation
        - up- and downstream tracing and arithmetics
        - strahler stream order
        - hydrologically adjusting elevation
        - height above nearest drainage
        - *many more!*
        
        
        Example
        =======
        
        Here we show an example of a 30 arcsec D8 map of the Rhine basin which is saved in 
        as 8-bit GeoTiff. We read the flow direction, including meta-data using `rasterio <https://rasterio.readthedocs.io/en/latest/>`_ 
        to begin with.
        
        .. code-block:: python
        
            import rasterio
            with rasterio.open('data/rhine_d8.tif', 'r') as src:
                flwdir = src.read(1)
                transform = src.transform
                latlon = src.crs.to_epsg() == 4326
        
        Next, we parse this data to a **FlwdirRaster** object, the core object 
        to work with flow direction data. The most common way to initialize a `FlwdirRaster` object 
        is based on gridded flow direction data in D8, LDD or NEXTXY format using 
        the **pyflwdir.from_array** method. Optional arguments describe the geospatial
        location of the gridded data. In this step the D8 data is parsed to an actionable format.
        
        .. code-block:: python
        
            import pyflwdir
            flw = pyflwdir.from_array(flwdir, ftype='d8', transform=transform, latlon=latlon)
            # When printing the FlwdirRaster instance we see its attributes. 
            print(flw)
        
        Now all pyflwdir FlwdirRaster methods are available, for instance the stream_order 
        method which returns a map with the Strahler order of each cell. 
        
        Browse the `docs API <https://deltares.gitlab.io/wflow/pyflwdir/reference.html>`_ for all methods
        
        .. code-block:: python
        
            stream_order = flw.stream_order()
        
        Getting started
        ===============
        
        Install the package from pip using
        
        .. code-block:: console
        
            $ pip install pyflwdir
        
        
        Development and Testing
        =======================
        
        See `CONTRIBUTING.rst <CONTRIBUTING.rst/>`__
        
        Documentation
        =============
        
        See `docs <https://deltares.gitlab.io/wflow/pyflwdir/>`__
        
        License
        =======
        
        See `LICENSE <LICENSE>`__
        
        Authors
        =======
        
        See `AUTHORS.txt <AUTHORS.txt>`__
        
        Changes
        =======
        
        See `CHANGESLOG.rst <CHANGELOG.rst>`__
        
        
        
Keywords: hydrology watershed basins stream pyflwdir wflow
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Hydrology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.6
Provides-Extra: dev
Provides-Extra: optional
