{"id":15663930,"url":"https://github.com/gaelysam/rivermapper","last_synced_at":"2025-05-06T18:47:37.708Z","repository":{"id":78701111,"uuid":"54711545","full_name":"gaelysam/rivermapper","owner":"gaelysam","description":"Python script to transform a Digital Elevation Model (DEM) image into a map of rivers.","archived":false,"fork":false,"pushed_at":"2018-01-14T00:09:08.000Z","size":18,"stargazers_count":20,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T05:48:02.991Z","etag":null,"topics":["dem","digital-elevation-model","map","rivers","slope"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaelysam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-25T10:15:46.000Z","updated_at":"2024-10-10T03:18:27.000Z","dependencies_parsed_at":"2023-03-12T05:11:53.482Z","dependency_job_id":null,"html_url":"https://github.com/gaelysam/rivermapper","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"67a53e1224c7d3d1d8eb0082de91222823821c1f"},"previous_names":["gaelysam/rivermapper","gael-de-sailly/rivermapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaelysam%2Frivermapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaelysam%2Frivermapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaelysam%2Frivermapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaelysam%2Frivermapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaelysam","download_url":"https://codeload.github.com/gaelysam/rivermapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252748937,"owners_count":21798408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dem","digital-elevation-model","map","rivers","slope"],"created_at":"2024-10-03T13:40:32.236Z","updated_at":"2025-05-06T18:47:37.666Z","avatar_url":"https://github.com/gaelysam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# River Mapper\n\nPython script to transform a Digital Elevation Model (DEM) image into a map of rivers.\nYou need Python 3 with `numpy` and `imageio`.\n\nScript execution:\n`rivermapper.py input_image.tif output_image.tif [-l sea_level] [-s random_seed] [-c contrast] [-d output_bit_depth]`\nor:\n`rivermapper.py -i input_image.tif -o output_image.tif [-l sea_level] [-s random_seed] [-c contrast] [-d output_bit_depth]`\n\nUsed RAM: around 10 Mo per milion pixels (400 Mo for a 6001x6001 [SRTM image](http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp))\nTime taken: it can take several minutes. The same SRTM image takes arount 20 minutes. Please be patient.\n\nIt should support most of image types (PNG, TIFF, JPG, BMP, ...) and bit depths (8, 16, 32, 64).\n\nBehaviour:\n* It creates river systems from start points (pixels near the sea, or on the edge of the map), by analysing the slope to find in which direction the water will flow, on every pixel. Rivers are the points that receive the water from numerous pixels (usually some thousands, or even millions).\n* It supports basins. There are generally not naturals, but still exist in most of the DEM, because of approximative data. It find the simplest way to get the river escape the basin.\n* It can't determine rivers positions on too flat areas, because we need some slope to know where the water flows. In this case, rivers are set randomly.\n* We obviously can't know how much water comes from outside of the map. So, the rivers that are on the edge of the map may have a smaller value than in the reality. There is not this problem for an island.\n\nAn example with the [Corsica](https://en.wikipedia.org/wiki/Corsica) island:\n\nThe original image in zip file: [corsica.zip](https://github.com/Gael-de-Sailly/rivermapper/files/189394/corse.zip)\n\nEnhanced DEM to show the mountains and the valleys: ![corsica_enhanced](https://cloud.githubusercontent.com/assets/6905002/14042963/5371a7d0-f27f-11e5-946b-9ddafe1e0e91.png)\nRivers map built with RiverMapper: ![corsica_rivers](https://cloud.githubusercontent.com/assets/6905002/14042964/5ba01284-f27f-11e5-9fb9-77d98d53972c.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaelysam%2Frivermapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaelysam%2Frivermapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaelysam%2Frivermapper/lists"}