Metadata-Version: 2.2
Name: GeoAnalyze
Version: 1.0.0
Summary: A Python package designed to provide toolkits for geospatial analysis.
Author-email: Debasish Pal <bestdebasish@gmail.com>
Project-URL: Homepage, https://github.com/debpal/GeoAnalyze
Project-URL: Documentation, http://GeoAnalyze.readthedocs.io/
Keywords: Raster,Shapefile,Geoprocessing
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Hydrology
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: geopandas
Requires-Dist: rasterio
Requires-Dist: fiona
Requires-Dist: pyflwdir

# 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 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** | [![Documentation Status](https://readthedocs.org/projects/geoanalyze/badge/?version=latest)](https://geoanalyze.readthedocs.io/en/latest/?badge=latest) |
| **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.


## Delineation Functions

The `GeoAnalyze.Watershed` and `GeoAnalyze.Stream` class provides 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.

* Basin area extraction from extended Digital Elevation Model (DEM).
* Pit filling of DEM.
* Slope.
* Flow direction.
* Flow accumulation.
* Stream extraction.
* Subbaisn generation.
* Stream link.
* Main outlet and junction points.

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)

 
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.
This allows users to execute geoprocessing tasks more efficiently, reducing code length while ensuring accuracy and scalability.


* Counting raster values and NoData cells
* Changing raster resolution
* Reprojecting the raster's Coordinate Reference System (CRS)
* Clipping raster using shapefiles
* Generating rasters from input geometries
* Handling NoData values in rasters
* Extracting raster boundary polygons
* Performing column analysis on shapefiles
* Reprojecting the CRS of shapefiles
* Filling polygons
* Executing spatial joins on geometries
* Merging shapefiles

## 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
>>> file = GeoAnalyze.File()
```

## Documentation

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

## 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)






