{"id":20027408,"url":"https://github.com/huidaecho/grass-lfp-deprecated","last_synced_at":"2025-07-11T17:37:06.369Z","repository":{"id":138941518,"uuid":"100851023","full_name":"HuidaeCho/grass-lfp-deprecated","owner":"HuidaeCho","description":"GRASS GIS Shell Script for Creating the Longest Flow Path","archived":false,"fork":false,"pushed_at":"2020-02-27T03:54:27.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T17:22:31.337Z","etag":null,"topics":["gis","grass-gis","hydrology","longest-flow-path"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HuidaeCho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-08-20T09:23:49.000Z","updated_at":"2024-11-11T02:23:30.000Z","dependencies_parsed_at":"2023-09-24T17:54:24.488Z","dependency_job_id":null,"html_url":"https://github.com/HuidaeCho/grass-lfp-deprecated","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"e6aaa4aa20226eb8d7a08f285606f316204ffff2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuidaeCho%2Fgrass-lfp-deprecated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuidaeCho%2Fgrass-lfp-deprecated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuidaeCho%2Fgrass-lfp-deprecated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuidaeCho%2Fgrass-lfp-deprecated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuidaeCho","download_url":"https://codeload.github.com/HuidaeCho/grass-lfp-deprecated/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241460047,"owners_count":19966516,"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":["gis","grass-gis","hydrology","longest-flow-path"],"created_at":"2024-11-13T09:10:08.789Z","updated_at":"2025-03-02T04:42:41.631Z","avatar_url":"https://github.com/HuidaeCho.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grass-lfp\nGRASS GIS Shell Script for Creating the Longest Flow Path\n\nThis shell script is a GRASS GIS module that creates longest flow paths at multiple outlet points. The longest flow path modules in GRASS GIS ([r.lfp](https://grass.osgeo.org/grass72/manuals/addons/r.lfp.html) and [v.lfp](https://grass.osgeo.org/grass72/manuals/addons/v.lfp.html)) can handle only one longest flow path at a time.\n\nI developed this module because the longest flow path tool in the ArcGIS ArcHydro toolbox was not able to process one of my study areas. It took forever to generate outputs in ArcGIS, so I needed a way to generate longest flow paths at multiple monitoring points (name for outlet points in ArcHydro) in GRASS GIS.\n\n## WARNING\n\nThis shell script is deprecated by the new [r.lfp](https://grass.osgeo.org/grass74/manuals/addons/r.lfp.html) addon, which supports multiple outlets. Converting the longest flow path raster map to vector using r.to.vect, which this script does, can result in hydrologically invalid outputs. Please see [this article](https://idea.isnew.info/how-to-delineate-stream-networks-in-grass-gis.html).\n\n## How to import the flow direction raster from ArcGIS\n\nIn ArcGIS, export the flow direction raster to fdr.tif.\n\n```\n# import fdr.tif into a new raster map \u003cfdr\u003e\nr.in.gdal input=fdr.tif output=fdr\n\n# convert ArcGIS flow directions to GRASS GIS flow directions\nr.mapcalc expression=\"drain=int(8-log(fdr,2))\"\n```\n\nFor more information about flow direction conversion, see [this article](https://idea.isnew.info/how-to-import-arcgis-flow-direction-into-grass-gis.html).\n\n## How to import monitoring points from ArcGIS\n\nIn ArcGIS, export monitoroing points to mp.shp.\n\n```\n# import the monitoring points shapefile into a new vector map \u003cmp\u003e\nv.in.ogr input=mp.shp output=mp\n\n# drop unnecessary columns\nv.db.dropcolumn map=mp columns=OBJECTID_1,OBJECTID_2,AREA,PERIMETER,AL_SITES_G,AL_SITES_1,OBJECTID,STATION_NO,SNAME,DA_MI2,SGRF1_ID,REALTIME,NONET_REAL,FIRSTYEAR,YEARSREC,HCDN,HBM,DISTRICT,STATE,AGENCY,NASQAN2,BENCHMRK,NAWQALIP,ONREACH,MATCHID,COMPACT,BORDER,NWS_SITE,NRCS_SITE,HUC6_MVPSI,SENTINEL_S,FURNISHED,HUC6,USGS_SITE,WHO,PROPOSED,SITE_TYPE,QW_SITE,ACTIVE_K,SITE_STATU,SCORE,ID,POLYGONID,SCALE,ANGLE,HydroID,GageID,HydroCode,FType,Name,RiverID\n\n# rename the JunctionID column to id\nv.db.renamecolumn map=mp column=JunctionID,id\n```\n\n## How to create longest flow paths\n\n```\n# create a new vector map \u003clfp\u003e with longest flow paths for all outlet points\nlfp.sh outlets=mp idattr=id drainage=drain output=lfp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuidaecho%2Fgrass-lfp-deprecated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuidaecho%2Fgrass-lfp-deprecated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuidaecho%2Fgrass-lfp-deprecated/lists"}