{"id":18368907,"url":"https://github.com/cheginit/curviriver","last_synced_at":"2025-04-06T17:31:54.709Z","repository":{"id":202160466,"uuid":"704637058","full_name":"cheginit/curviriver","owner":"cheginit","description":"Curvilinear Mesh Generator for Rivers","archived":false,"fork":false,"pushed_at":"2025-01-24T18:39:48.000Z","size":3030,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T04:03:06.977Z","etag":null,"topics":["curvilinear","hydrology","mesh","mesh-generator","river"],"latest_commit_sha":null,"homepage":"https://curviriver.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheginit.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-13T17:41:11.000Z","updated_at":"2025-01-24T18:39:46.000Z","dependencies_parsed_at":"2023-12-05T16:12:32.447Z","dependency_job_id":"58af9bf8-aa6a-4d13-bda1-ee332e5a1352","html_url":"https://github.com/cheginit/curviriver","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.1428571428571429,"last_synced_commit":"4ee512c6c7c310c1dec1a731762a8875bfebc13b"},"previous_names":["cheginit/curviriver"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheginit%2Fcurviriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheginit%2Fcurviriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheginit%2Fcurviriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheginit%2Fcurviriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheginit","download_url":"https://codeload.github.com/cheginit/curviriver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522435,"owners_count":20952551,"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":["curvilinear","hydrology","mesh","mesh-generator","river"],"created_at":"2024-11-05T23:27:49.889Z","updated_at":"2025-04-06T17:31:53.964Z","avatar_url":"https://github.com/cheginit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://raw.githubusercontent.com/cheginit/curviriver/main/doc/source/_static/logo-text.png\n    :target: https://curviriver.readthedocs.io\n\n|\n\nCurviRiver: Curvilinear Mesh Generator for Rivers\n=================================================\n\n.. image:: https://github.com/cheginit/curviriver/actions/workflows/test.yml/badge.svg\n   :target: https://github.com/cheginit/curviriver/actions/workflows/test.yml\n   :alt: CI\n\n.. image:: https://img.shields.io/pypi/v/curviriver.svg\n    :target: https://pypi.python.org/pypi/curviriver\n    :alt: PyPi\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/curviriver.svg\n    :target: https://anaconda.org/conda-forge/curviriver\n    :alt: Conda Version\n\n.. image:: https://codecov.io/gh/cheginit/curviriver/graph/badge.svg\n    :target: https://codecov.io/gh/cheginit/curviriver\n    :alt: CodeCov\n\n.. image:: https://img.shields.io/pypi/pyversions/curviriver.svg\n    :target: https://pypi.python.org/pypi/curviriver\n    :alt: Python Versions\n\n|\n\n.. image:: https://static.pepy.tech/badge/curviriver\n    :target: https://pepy.tech/project/curviriver\n    :alt: Downloads\n\n.. image:: https://www.codefactor.io/repository/github/cheginit/curviriver/badge/main\n    :target: https://www.codefactor.io/repository/github/cheginit/curviriver/overview/main\n    :alt: CodeFactor\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: black\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\n    :target: https://github.com/pre-commit/pre-commit\n    :alt: pre-commit\n\n|\n\nFeatures\n--------\n\nCurviRiver takes as input a Polygon of a river segment and generates a 2/3D\ncurvilinear mesh that can be used for hydrodynamic or hydrological modeling.\nThe mesh is generated in the following main steps:\n\n- Determining the centerline of the input Polygon using Voroni diagram\n  and Dijkstra's algorithm,\n- Smoothing the generated centerline with a B-spline curve,\n- Computing the tangent angles of the centerline at each point along\n  the centerline and generating cross-sections perpendicular to the\n  centerline at given intervals,\n- Generating a 2D mesh from vertices of the cross-sections,\n- Generating a 3D mesh if depth data is provided, by determining the depth of\n  2D mesh vertices from the depth data using Inverse Distance Weighting (IDW).\n\nInstallation\n------------\n\nYou can install CurviRiver using ``pip``:\n\n.. code-block:: console\n\n    $ pip install curviriver\n\nor using ``conda`` (``mamba``):\n\n.. code-block:: console\n\n    $ conda install -c conda-forge curviriver\n\nQuick start\n-----------\n\nWe demonstrate capabilities of CurviRiver by generating a\ncurvilinear mesh along a portion of the Columbia River and\ninterpolating\n`eHydro \u003chttps://www.sam.usace.army.mil/Missions/Spatial-Data-Branch/eHYDRO/\u003e`__\ntopobathy data on to the generated mesh vertices. Please visit the\n`example gallery \u003chttps://curviriver.readthedocs.io/en/latest/gallery.html\u003e`__\nfor more examples.\n\nFirst, we use `PyGeoHydro \u003chttps://docs.hyriver.io/readme/pygeohydro.html\u003e`__\nto retrieve eHydro data for a part of the Columbia River that topobathy data are\navailable. We get both the survey outline and the bathymetry data.\nThen, we use the survey outline polygon to generate a curvilinear mesh.\nWe use the ``poly_segmentize`` function for this purpose that has two\nparameters: Spacing in streamwise direction and number of points in\ncross-stream direction. The function returns a ``geopandas.GeoSeries``\nof the cross-sections, vertices of which are the mesh points.\n\n.. code:: python\n\n    from pygeohydro import EHydro\n    import curviriver as cr\n\n    ehydro = EHydro(\"outlines\")\n    geom = ehydro.survey_grid.loc[ehydro.survey_grid[\"OBJECTID\"] == 210, \"geometry\"].iloc[0]\n    outline = ehydro.bygeom(geom, ehydro.survey_grid.crs)\n\n    poly = outline.convex_hull.unary_union\n    spacing_streamwise = 2000\n    xs_npts = 5\n    stream = cr.poly_segmentize(poly, outline.crs, spacing_streamwise, xs_npts)\n\n.. image:: https://raw.githubusercontent.com/cheginit/curviriver/main/doc/source/_static/curvilinear.png\n  :target: https://github.com/cheginit/curviriver\n\nContributing\n------------\n\nContributions are very welcomed. Please read\n`CONTRIBUTING.rst \u003chttps://github.com/cheginit/curviriver/blob/main/CONTRIBUTING.rst\u003e`__\nfile for instructions.\n\nSupport\n-------\n\nThe work for this project is funded by USGS through Water Resources Research Institutes\n(`WRRI \u003chttps://water.usgs.gov/wrri/index.php\u003e`__).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheginit%2Fcurviriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheginit%2Fcurviriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheginit%2Fcurviriver/lists"}