GeoAnalyze


NameGeoAnalyze JSON
Version 1.2.5 PyPI version JSON
download
home_pageNone
SummaryA Python package offering toolkits for geospatial processing, watershed delineation, and hydrologic analysis.
upload_time2025-07-09 08:38:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords gis watershed hydrology spatial analysis raster vector
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GeoAnalyze

| <big>Status</big> | <big>Description</big> |
| --- | --- |
| **PyPI**| ![PyPI - Version](https://img.shields.io/pypi/v/GeoAnalyze) ![PyPI - Status](https://img.shields.io/pypi/status/GeoAnalyze) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/GeoAnalyze) ![PyPI - Wheel](https://img.shields.io/pypi/wheel/GeoAnalyze) |
| **GitHub** | ![GitHub commit activity](https://img.shields.io/github/commit-activity/t/debpal/GeoAnalyze) ![GitHub last commit](https://img.shields.io/github/last-commit/debpal/GeoAnalyze) [![flake8](https://github.com/debpal/GeoAnalyze/actions/workflows/linting.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/linting.yml) [![mypy](https://github.com/debpal/GeoAnalyze/actions/workflows/typing.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/typing.yml) [![pytest](https://github.com/debpal/GeoAnalyze/actions/workflows/testing.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/testing.yml) |
| **Codecov** | [![codecov](https://codecov.io/gh/debpal/GeoAnalyze/graph/badge.svg?token=9OW3TRHI7C)](https://codecov.io/gh/debpal/GeoAnalyze)  |
| **Read** _the_ **Docs** | ![Read the Docs](https://img.shields.io/readthedocs/GeoAnalyze) |
| **PePy** | ![Pepy Total Downloads](https://img.shields.io/pepy/dt/GeoAnalyze) |
| **License** | ![GitHub License](https://img.shields.io/github/license/debpal/GeoAnalyze) |


`GeoAnalyze` is a Python package designed to streamline geoprocessing by handling internal complexities and intermediate steps. Conceptualized and launched on October 10, 2024, this package is tailored for users with limited geospatial processing experience, allowing them to focus on desired outputs. Leveraging open-source geospatial Python modules, `GeoAnalyze` aims to empower users by providing high-level geoprocessing tools with fewer lines of code. This fast package is also useful for the users who has no access of paid GIS software packages.


## Wateshed Delineation

The `GeoAnalyze.Watershed` and `GeoAnalyze.Stream` classes provide fast and scalable watershed delineation functions by leveraging the computational efficiency of the PyPI package 
[pyflwdir](https://github.com/Deltares/pyflwdir), without requiring a detailed understanding of it. These functions can be executed either individually or simultaneously.

### *Hydrology*

- Basin area extraction from an extended Digital Elevation Model (DEM)
- DEM pit filling
- Slope calculation
- Slope classification
- Aspect determination
- Flow direction mapping
- Flow accumulation computation
- Stream extraction
- Subbasin generation


The computational efficiency of these functions is demonstrated in the following output figure.
All delineation files—including basin area, flow direction, flow accumulation, slope, stream, outlets, and subbasins—can be generated within 30 seconds from a raster containing 14 million cells.

![All delineation files from DEM](https://github.com/debpal/GeoAnalyze/raw/main/docs/_static/dem_all_delineation.png)



### *Stream Network*

- Determines the adjacent downstream segment for each stream segment
- Retrieves adjacent upstream segments associated with each stream segment
- Builds full connectivity structures from upstream to downstream
- Computes connectivity structures from downstream to upstream
- Removes all upstream connectivity up to headwaters for targeted stream segments
- Merges split stream segments either between two junction points or from a junction point upstream until a headwater is reached
- Detects junctions, drainage points, main outlets, and headwaters within the stream network
- Computes Strahler and Shreve orders of stream segments
- Includes multiple functions for generating random boxes around selected stream segments


## Geoprocessing

The `GeoAnalyze` package leverages the existing PyPI packages, such as, [rasterio](https://github.com/rasterio/rasterio),
[geopandas](https://github.com/geopandas/geopandas), and [shapely](https://github.com/shapely/shapely),
to perform geoprocessing efficiently while reducing implementation complexity.
Instead of requiring multiple lines of code to handle intermediate steps,
the `GeoAnalyze.Raster` and `GeoAnalyze.Shape` classes streamline the process by automating these operations. 
Furthermore, the `GeoAnalyze.Visual` class assists in raster and vector data plotting and visualization.
This allows users to execute geoprocessing tasks more efficiently, reducing code length while ensuring accuracy and scalability.


### *Raster*
  
- Rasterizing input geometries
- Rescaling raster resolution
- Transforming raster values
- Clipping a raster using a shapefile
- Overlaying geometries onto a raster
- Managing Coordinate Reference System (CRS)
- Handling NoData values in a raster  
- Generating boundary polygons from a raster
- Reclassifying raster values
- Trimming and extending rasters
- Filling missing values in raster regions
- Computing raster statistics
- Counting unique raster values
- Extracting raster values using a mask or range filter
- Merging multiple raster files
- Rewriting a raster with a different driver


### *Shapefile*

- Vectorizing a raster array
- Aggregating geometries from multiple shapefiles
- Executing spatial joins on geometries
- Reprojecting the CRS
- Filling polygons
- Performing column operations on a shapefile


### *Visualization*

- Quick view of a raster array
- Quick view of shapefile geometries



## File Operations (Irrespective of Extensions)

When managing GIS files, each main file is often associated with several auxiliary files. For example, a shapefile
is commonly accompanied by `.shp`, `.cpg`, `.dbf`, `.prj`, and `.shx` files, which are necessary for the shapefile to function correctly.
In geoprocessing, these associated files must be handled together to prevent errors or data loss.
The `GeoAnalyze.File` class simplifies this process by ensuring that any operation performed
on a main file automatically includes its auxiliary files, making file management more efficient and error-free.

* Deleting files in a folder.
* Transferring files from the source folder to the destination folder.
* Renaming files in a folder.
* Copying files from the source folder and renames them in the destination folder.
* Extracting files with the same extension from a folder.

## Easy Installation

To install, use pip:

```bash
pip install GeoAnalyze
```

## Quickstart
A brief example of how to start:

```python
>>> import GeoAnalyze
>>> watershed = GeoAnalyze.Watershed()
>>> stream = GeoAnalyze.Stream()
```

## Documentation

For detailed information, see the [documentation](https://geoanalyze.readthedocs.io/en/latest/).

## Support

If this project has been helpful and you'd like to contribute to its development, consider sponsoring with a coffee! Support will help maintain, improve, and expand this open-source project, ensuring continued valuable tools for the community.


[![Buy Me a Coffee](https://img.shields.io/badge/☕_Buy_me_a_coffee-FFDD00?style=for-the-badge)](https://www.buymeacoffee.com/debasish_pal)







            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "GeoAnalyze",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "GIS, Watershed, Hydrology, Spatial analysis, Raster, Vector",
    "author": null,
    "author_email": "Debasish Pal <bestdebasish@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/15/70/809d30da230af954e5e02502bf177a0c088d8d4d120b59a2cbae821fad98/geoanalyze-1.2.5.tar.gz",
    "platform": null,
    "description": "# GeoAnalyze\r\n\r\n| <big>Status</big> | <big>Description</big> |\r\n| --- | --- |\r\n| **PyPI**| ![PyPI - Version](https://img.shields.io/pypi/v/GeoAnalyze) ![PyPI - Status](https://img.shields.io/pypi/status/GeoAnalyze) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/GeoAnalyze) ![PyPI - Wheel](https://img.shields.io/pypi/wheel/GeoAnalyze) |\r\n| **GitHub** | ![GitHub commit activity](https://img.shields.io/github/commit-activity/t/debpal/GeoAnalyze) ![GitHub last commit](https://img.shields.io/github/last-commit/debpal/GeoAnalyze) [![flake8](https://github.com/debpal/GeoAnalyze/actions/workflows/linting.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/linting.yml) [![mypy](https://github.com/debpal/GeoAnalyze/actions/workflows/typing.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/typing.yml) [![pytest](https://github.com/debpal/GeoAnalyze/actions/workflows/testing.yml/badge.svg)](https://github.com/debpal/GeoAnalyze/actions/workflows/testing.yml) |\r\n| **Codecov** | [![codecov](https://codecov.io/gh/debpal/GeoAnalyze/graph/badge.svg?token=9OW3TRHI7C)](https://codecov.io/gh/debpal/GeoAnalyze)  |\r\n| **Read** _the_ **Docs** | ![Read the Docs](https://img.shields.io/readthedocs/GeoAnalyze) |\r\n| **PePy** | ![Pepy Total Downloads](https://img.shields.io/pepy/dt/GeoAnalyze) |\r\n| **License** | ![GitHub License](https://img.shields.io/github/license/debpal/GeoAnalyze) |\r\n\r\n\r\n`GeoAnalyze` is a Python package designed to streamline geoprocessing by handling internal complexities and intermediate steps. Conceptualized and launched on October 10, 2024, this package is tailored for users with limited geospatial processing experience, allowing them to focus on desired outputs. Leveraging open-source geospatial Python modules, `GeoAnalyze` aims to empower users by providing high-level geoprocessing tools with fewer lines of code. This fast package is also useful for the users who has no access of paid GIS software packages.\r\n\r\n\r\n## Wateshed Delineation\r\n\r\nThe `GeoAnalyze.Watershed` and `GeoAnalyze.Stream` classes provide fast and scalable watershed delineation functions by leveraging the computational efficiency of the PyPI package \r\n[pyflwdir](https://github.com/Deltares/pyflwdir), without requiring a detailed understanding of it. These functions can be executed either individually or simultaneously.\r\n\r\n### *Hydrology*\r\n\r\n- Basin area extraction from an extended Digital Elevation Model (DEM)\r\n- DEM pit filling\r\n- Slope calculation\r\n- Slope classification\r\n- Aspect determination\r\n- Flow direction mapping\r\n- Flow accumulation computation\r\n- Stream extraction\r\n- Subbasin generation\r\n\r\n\r\nThe computational efficiency of these functions is demonstrated in the following output figure.\r\nAll delineation files\u2014including basin area, flow direction, flow accumulation, slope, stream, outlets, and subbasins\u2014can be generated within 30 seconds from a raster containing 14 million cells.\r\n\r\n![All delineation files from DEM](https://github.com/debpal/GeoAnalyze/raw/main/docs/_static/dem_all_delineation.png)\r\n\r\n\r\n\r\n### *Stream Network*\r\n\r\n- Determines the adjacent downstream segment for each stream segment\r\n- Retrieves adjacent upstream segments associated with each stream segment\r\n- Builds full connectivity structures from upstream to downstream\r\n- Computes connectivity structures from downstream to upstream\r\n- Removes all upstream connectivity up to headwaters for targeted stream segments\r\n- Merges split stream segments either between two junction points or from a junction point upstream until a headwater is reached\r\n- Detects junctions, drainage points, main outlets, and headwaters within the stream network\r\n- Computes Strahler and Shreve orders of stream segments\r\n- Includes multiple functions for generating random boxes around selected stream segments\r\n\r\n\r\n## Geoprocessing\r\n\r\nThe `GeoAnalyze` package leverages the existing PyPI packages, such as, [rasterio](https://github.com/rasterio/rasterio),\r\n[geopandas](https://github.com/geopandas/geopandas), and [shapely](https://github.com/shapely/shapely),\r\nto perform geoprocessing efficiently while reducing implementation complexity.\r\nInstead of requiring multiple lines of code to handle intermediate steps,\r\nthe `GeoAnalyze.Raster` and `GeoAnalyze.Shape` classes streamline the process by automating these operations. \r\nFurthermore, the `GeoAnalyze.Visual` class assists in raster and vector data plotting and visualization.\r\nThis allows users to execute geoprocessing tasks more efficiently, reducing code length while ensuring accuracy and scalability.\r\n\r\n\r\n### *Raster*\r\n  \r\n- Rasterizing input geometries\r\n- Rescaling raster resolution\r\n- Transforming raster values\r\n- Clipping a raster using a shapefile\r\n- Overlaying geometries onto a raster\r\n- Managing Coordinate Reference System (CRS)\r\n- Handling NoData values in a raster  \r\n- Generating boundary polygons from a raster\r\n- Reclassifying raster values\r\n- Trimming and extending rasters\r\n- Filling missing values in raster regions\r\n- Computing raster statistics\r\n- Counting unique raster values\r\n- Extracting raster values using a mask or range filter\r\n- Merging multiple raster files\r\n- Rewriting a raster with a different driver\r\n\r\n\r\n### *Shapefile*\r\n\r\n- Vectorizing a raster array\r\n- Aggregating geometries from multiple shapefiles\r\n- Executing spatial joins on geometries\r\n- Reprojecting the CRS\r\n- Filling polygons\r\n- Performing column operations on a shapefile\r\n\r\n\r\n### *Visualization*\r\n\r\n- Quick view of a raster array\r\n- Quick view of shapefile geometries\r\n\r\n\r\n\r\n## File Operations (Irrespective of Extensions)\r\n\r\nWhen managing GIS files, each main file is often associated with several auxiliary files. For example, a shapefile\r\nis commonly accompanied by `.shp`, `.cpg`, `.dbf`, `.prj`, and `.shx` files, which are necessary for the shapefile to function correctly.\r\nIn geoprocessing, these associated files must be handled together to prevent errors or data loss.\r\nThe `GeoAnalyze.File` class simplifies this process by ensuring that any operation performed\r\non a main file automatically includes its auxiliary files, making file management more efficient and error-free.\r\n\r\n* Deleting files in a folder.\r\n* Transferring files from the source folder to the destination folder.\r\n* Renaming files in a folder.\r\n* Copying files from the source folder and renames them in the destination folder.\r\n* Extracting files with the same extension from a folder.\r\n\r\n## Easy Installation\r\n\r\nTo install, use pip:\r\n\r\n```bash\r\npip install GeoAnalyze\r\n```\r\n\r\n## Quickstart\r\nA brief example of how to start:\r\n\r\n```python\r\n>>> import GeoAnalyze\r\n>>> watershed = GeoAnalyze.Watershed()\r\n>>> stream = GeoAnalyze.Stream()\r\n```\r\n\r\n## Documentation\r\n\r\nFor detailed information, see the [documentation](https://geoanalyze.readthedocs.io/en/latest/).\r\n\r\n## Support\r\n\r\nIf this project has been helpful and you'd like to contribute to its development, consider sponsoring with a coffee! Support will help maintain, improve, and expand this open-source project, ensuring continued valuable tools for the community.\r\n\r\n\r\n[![Buy Me a Coffee](https://img.shields.io/badge/\u2615_Buy_me_a_coffee-FFDD00?style=for-the-badge)](https://www.buymeacoffee.com/debasish_pal)\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python package offering toolkits for geospatial processing, watershed delineation, and hydrologic analysis.",
    "version": "1.2.5",
    "project_urls": {
        "Documentation": "https://geoanalyze.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/debpal/GeoAnalyze"
    },
    "split_keywords": [
        "gis",
        " watershed",
        " hydrology",
        " spatial analysis",
        " raster",
        " vector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d209f7f38cac63dec647a8056d2dbfc3268e9b96685aac9846c9369f67f5690",
                "md5": "3bd22f11c324464f073b7446f7de8df4",
                "sha256": "c6b104cb3f9f6805b60d5462555b39a73a5be43505c79dda711ca4a62c637784"
            },
            "downloads": -1,
            "filename": "geoanalyze-1.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3bd22f11c324464f073b7446f7de8df4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 38234,
            "upload_time": "2025-07-09T08:38:49",
            "upload_time_iso_8601": "2025-07-09T08:38:49.400393Z",
            "url": "https://files.pythonhosted.org/packages/9d/20/9f7f38cac63dec647a8056d2dbfc3268e9b96685aac9846c9369f67f5690/geoanalyze-1.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1570809d30da230af954e5e02502bf177a0c088d8d4d120b59a2cbae821fad98",
                "md5": "74e2a168527988763bb99f672acb59d7",
                "sha256": "f6a8f316539df7d63c977235456d7da3d1658d58eaad5d426de7779fd4bbeba2"
            },
            "downloads": -1,
            "filename": "geoanalyze-1.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "74e2a168527988763bb99f672acb59d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1406002,
            "upload_time": "2025-07-09T08:38:50",
            "upload_time_iso_8601": "2025-07-09T08:38:50.914171Z",
            "url": "https://files.pythonhosted.org/packages/15/70/809d30da230af954e5e02502bf177a0c088d8d4d120b59a2cbae821fad98/geoanalyze-1.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 08:38:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "debpal",
    "github_project": "GeoAnalyze",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "geoanalyze"
}
        
Elapsed time: 1.45799s