{"id":25723497,"url":"https://github.com/cs-si/bas","last_synced_at":"2025-02-25T20:36:54.690Z","repository":{"id":225353404,"uuid":"746697903","full_name":"CS-SI/BAS","owner":"CS-SI","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-14T08:28:42.000Z","size":1239,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-14T09:31:52.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CS-SI.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T13:52:53.000Z","updated_at":"2025-02-14T08:28:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"c00ee21f-6af4-47dc-9c06-078f4edfa432","html_url":"https://github.com/CS-SI/BAS","commit_stats":null,"previous_names":["cs-si/bas"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CS-SI%2FBAS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CS-SI%2FBAS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CS-SI%2FBAS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CS-SI%2FBAS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CS-SI","download_url":"https://codeload.github.com/CS-SI/BAS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240744925,"owners_count":19850856,"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":[],"created_at":"2025-02-25T20:36:53.886Z","updated_at":"2025-02-25T20:36:54.584Z","avatar_url":"https://github.com/CS-SI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BAS\n[ Buffer Around Sections]\n\n\u003e Derive river width from a binary watermask and a set of sections\n\nBAS is a simple Python-based toolbox designed to compute river widths from a space-borne watermask given a set of section (line geometries) set along the river.\n\n## Download\n\nMain version available on github : https://github.com/CS-SI/BAS\n\n## Installation\n\n### With conda and a yml file\n\nThe toolbox works in a specific environment that can be installed through conda using the environment_bas.yml file\n\n```shell\nconda env create -f environment_bas_py38.yml # for python 3.8\n# or\nconda env create -f environment_bas_py310.yml # for python 3.10\n\n# then install BAS (make sure you are in the source directory)\npip install -e .\n\n# then try to access the entry point\nrun_bas -h\n```\n\n### General\n\nUsing a virtual environment is strongly recommended.\n\n#### Locally\n\nIf you have python-3.12 and `sw1Dto2D` is already installed, then running this command will install BAS requirements\n\n```bash\n# if gdal is not yet installed \npip install GDAL==`gdal-config --version`\n\npip install -e .\n\n# then try to access the entry point\nrun_bas -h\n```\n\nThis entrypoint is to compute BAS widths on Surfwater-like watermasks.\n\n#### On TREX cluster\n\n```bash\n# On TREX cluster load a working version of python 3.12\nmodule load otb/9.0.0-python3.12\n\n# then create a dedicated virtual env\npython3 -m venv ${YOUR_VENV_PATH}\n\n# you will need sw1dto2d for python 3.12\ncd ${SW1DTO2D_DIR_PATH}\n${YOUR_VENV_PATH}/bin/pip install -e .\n\n# then go back to your source directory to install BAS module\ncd ${BAS_DIR_PATH}\n${YOUR_VENV_PATH}/bin/pip install -e .\n\n# then try to access the entry point\nsource ${YOUR_VENV_PATH}/bin/activate\nrun_bas -h\n```\n\nThis entrypoint is to compute BAS widths on Surfwater-like watermasks.\n\n## Examples\n\nTo run examples, use the entrypoint\n\n```bash\nrun_examples\n```\n\n## Usage\n\nTo use BAS on Surfwater-like watermasks, here is the general command\n\n```bash\nrun_bas -w /path/to/water_mask.tif -dt YYYYmmddThhmmss -r /path/to/eu_sword_reaches_hb23_v16.shp -n /path/to/eu_sword_nodes_hb23_v16.shp -o /path/to/output/directory\n```\n\nThis will only save a csv file with widths data. You can had `--more_outputs` to also save the cleaned watermask and the shapefile.  \n\n\n## Features\n\nUsing the BAS toolbox, you can perform two tasks :\n\n- Given a watermask (as a GeoTiff file), a set on centerline reaches (as a shapefile of LineString) and a set of sections (as a shapefile of LineString),\nderive the river widths along the sections\n- If the sections lines are not available, using the centerline reaches (as a shapefile of LineString) and a set of segmentation points (as a shapefile of Point),\nyou can draw the sections yourself\n\n\n## License\n\nBAS is licensed by [CS GROUP](https://www.c-s.fr/) under\nthe [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\nA copy of this license is provided in the [LICENSE](LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs-si%2Fbas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcs-si%2Fbas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs-si%2Fbas/lists"}