rivamap

an automated river analysis and mapping engine

https://github.com/isikdogan/rivamap

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: sciencedirect.com, ieee.org
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary

Keywords

automated-river-analysis mapping river river-networks
Last synced: 5 months ago · JSON representation

Repository

an automated river analysis and mapping engine

Basic Info
  • Host: GitHub
  • Owner: isikdogan
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 86.9 KB
Statistics
  • Stars: 76
  • Watchers: 14
  • Forks: 33
  • Open Issues: 4
  • Releases: 1
Topics
automated-river-analysis mapping river river-networks
Created over 10 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

RivaMap: An Automated River Analysis and Mapping Engine

Build Status Coverage Status

Related papers

  • F. Isikdogan, A.C. Bovik, and P. Passalacqua, "RivaMap: an automated river analysis and mapping engine," Remote Sensing of Environment, Special Issue on Big Remotely Sensed Data, 2017. [Read at ScienceDirect], [PDF]
  • F. Isikdogan, A.C. Bovik, and P. Passalacqua, "Automatic channel network extraction from remotely sensed images by singularity analysis," IEEE Geoscience and Remote Sensing Letters, 12, 11, 2218-2221, 2015. [Read at IEEExplore], [PDF]

Dependencies and Installation

Dependencies: * OpenCV 2.4 * Python 3.x * Numpy * Scipy * Matplotlib * GDAL * pyshp

Installing from PyPI:

$ sudo pip install rivamap

Installing from GitHub:

$ git clone https://github.com/isikdogan/rivamap.git
$ sudo python setup.py install

Example Use:

See example.ipynb

Example Results

Example Result Example Result Example Result Example Result

Reference

Function

Description

preprocess.mndwi

Computes the modified normalized difference water index.

Inputs:
green: green band (e.g. Landsat 8 band 3)
mir: middle infrared band (e.g. Landsat 8 band 6)

Returns:
mndwi: mndwi response

preprocess.contrastStretch

Applies contrast stretch to an input image. Inputs and outputs an image.

preprocess.im2double

Converts image datatype to float. Inputs and outputs an image.

preprocess.double2im

Converts double data array to image. Inputs and outputs an image.

singularity_index.SingularityIndexFilters

Creates the filters that are needed for computing the modified multiscale singularity index response. The filters can be used for processing many input images once the filters are created.

Keyword arguments:
minScale: minimum scale sigma (default 1.2 pixels)
nrScales: number of scales (default 15)

singularity_index.applyMMSI

Applies the filters to a given input image to compute the modified multiscale singularity index response. Estimates the width and the dominant orientation angle for each spatial location.

Inputs:
I1: input image (e.g. Landsat NIR band or MNDWI)
filters: an instance of SingularityIndexFilters class that contains precomputed filters
togglePolarity: changes polarity, use if the rivers are darker than land in the input image (i.e. SAR images)

Returns:
psi: the singularity index response
widthMap: estimated width at each spatial location (x,y)
orient: local orientation at each spatial location (x,y)

delineate.extractCenterlines

Uses the previously computed singularity index response (psi) and the dominant orientation (orient) to extract centerlines.

Inputs: (can be obtained by running applyMMSI function)
psi: the singularity index response
orient: local orientation at each spatial location (x,y)

Returns:
nms: Non-maxima suppressed singularity index response (centerlines)

delineate.thresholdCenterlines

Uses a continuity-preserving hysteresis thresholding to classify centerlines.

Inputs:
nms: Non-maxima suppressed singularity index response

Keyword Arguments:
bimodal: true if the areas of rivers in the image are sufficiently large that the distribution of psi is bimodal
tLow: lower threshold (automatically set if bimodal=True)
tHigh: higher threshold (automatically set if bimodal=True)

Returns:
centerlines: a binary matrix that indicates centerline locations

georef.loadGeoMetadata

Reads metadata from a GeoTIFF file.

Inputs:
filepath: the path to the file

Returns:
gm: metadata

georef.saveAsGeoTiff

Saves a raster image as a GeoTIFF file

Inputs:
gm: georeferencing metadata
I: raster image
filepath: save destination

georef.pix2lonlat

Convers pixel coordinates into longitude and latitude.

Inputs:
gm: georeferencing metadata
x, y: pixel coordinates

Returns:
lon, lat: longitude and latitude

georef.lonlat2pix

Convers longitude and latitude into pixel coordinates.

Inputs:
gm: georeferencing metadata
lon, lat: longitude and latitude

Returns:
x, y: pixel coordinates

georef.exportCSVfile

Exports (coordinate, width) pairs to a comma separated text file.

Inputs:
centerlines: a binary matrix that indicates centerline locations
widthMap: estimated width at each spatial location (x,y)
gm: georeferencing metadata filepath: the path to the file

georef.exportShapeFile [NEW]

Exports line segments to a ShapeFile.

Inputs:
centerlines: a binary matrix that indicates centerline locations
widthMap: estimated width at each spatial location (x,y)
gm: georeferencing metadata filepath: the path to the file

visualization.generateRasterMap

Generates a raster map of channels. It draws a line of length w(x, y) and orientation θ(x, y) at each spatial location.

Inputs:
centerlines: a binary matrix that indicates centerline locations
orient: local orientation at each spatial location (x,y)
widthMap: estimated width at each spatial location (x,y)

Keyword Arguments:
thickness: thickness of the lines (default 3)

Returns:
raster: the raster map

visualization.generateVectorMap

Generates a vector map of channels. It draws a line of length w(x, y) and orientation θ(x, y) at each spatial location.

Inputs:
centerlines: a binary matrix that indicates centerline locations
orient: local orientation at each spatial location (x,y)
widthMap: estimated width at each spatial location (x,y)
saveDest: output figure save destination

Keyword Arguments:
thickness: thickness of the lines (default 0.2)

Returns:
None (saves the figure at saveDest)

visualization.quiverPlot

Generates a quiver plot that shows channel orientation and singularity index response strength.

Inputs:
psi: singularity index response
orient: local orientation at each spatial location (x,y)
saveDest: output figure save destination

Returns:
None (saves the figure at saveDest)

Owner

  • Name: Leo Isikdogan
  • Login: isikdogan
  • Kind: user
  • Location: Cupertino, CA

GitHub Events

Total
  • Issues event: 3
  • Watch event: 5
  • Push event: 1
Last Year
  • Issues event: 3
  • Watch event: 5
  • Push event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 73
  • Total Committers: 2
  • Avg Commits per committer: 36.5
  • Development Distribution Score (DDS): 0.192
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Leo Isikdogan l****o@i****m 59
jay j****n@u****u 14
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 10
  • Total pull requests: 2
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 9
  • Total pull request authors: 1
  • Average comments per issue: 1.6
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 1 minute
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • unaschneck (2)
  • shCampos (1)
  • mossydidar (1)
  • OmiDeLmI (1)
  • lan-ling (1)
  • elbeejay (1)
  • huangjingyuan7 (1)
  • LabSR-UT (1)
  • GustavoWillyNagel (1)
Pull Request Authors
  • elbeejay (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 4 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 4
  • Total versions: 2
  • Total maintainers: 1
pypi.org: rivamap

An automated river analysis and mapping engine.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 4
  • Downloads: 4 Last month
Rankings
Forks count: 7.0%
Dependent packages count: 7.4%
Dependent repos count: 7.7%
Stargazers count: 8.5%
Average: 19.1%
Downloads: 65.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • matplotlib *
  • numpy *
  • opencv-python *
  • pyshp *
  • scipy *
setup.py pypi
  • gdal *
  • matplotlib *
  • numpy *
  • scipy *