Metadata-Version: 2.4
Name: meteogis
Version: 1.0.1
Summary: A Python package for meteorological GIS data processing and analysis.
Author-email: David Akinduyile <thatpythonguy96@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/Thatpythonguy96/meteogis
Project-URL: Documentation, https://meteogis.readthedocs.io/en/latest/
Keywords: meteorology,GIS,data processing,analysis,Python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.5.1
Requires-Dist: rasterio>=1.5.0
Requires-Dist: geopandas>=1.1.4
Requires-Dist: pyogrio>=0.8
Requires-Dist: pandas>=2.2.0
Requires-Dist: pyproj>=3.7.0
Requires-Dist: shapely>=2.1.0
Requires-Dist: scipy>=1.18.0
Requires-Dist: xarray>=2026.7.0
Requires-Dist: netCDF4>=1.7.4
Dynamic: license-file

# MeteoGIS

**MeteoGIS** is a lightweight Python toolkit for geospatial processing and climate index analysis. It provides utilities for raster/vector conversion, geospatial file handling, and hydrometeorological indices like SPI and SPEI.

## Features

- Climate index analysis
  - Standardized Precipitation Index (`SPI`)
  - Standardized Precipitation-Evapotranspiration Index (`SPEI`)
- Raster utilities
  - Clipping
  - Contour generation
  - Hillshade and raster algebra
  - Polygonize raster data
  - Raster-to-point extraction
- Vector utilities
  - Buffer, clip, dissolve, merge, reproject, simplify, and union features
- I/O helpers for reading and writing geospatial formats

## Requirements

- Python 3.9+
- numpy
- rasterio
- geopandas
- xarray
- scipy
- pandas

> Additional dependencies such as `pandas`, `scipy`, `netCDF4`, `shapely`, and `fiona` may be required for specific conversion and analysis modules.

## Installation

```bash
pip install meteogis
```

## Quick Start

Import tools directly from the package or from the submodules:

```python
import numpy as np
from meteogis.analysis.spi import spi
from meteogis.analysis.spei import spei
from meteogis.read_file import read_file
from meteogis.to_file import to_file

# Example: compute SPI from a pandas Series or xarray-like object
rainfall = read_file("Rainfall_1990-2024.nc")
spi_values = spi(rainfall, thresh=3)

# Example: compute SPEI from precipitation and PET series
spei_values = spei(preci, pet, window=6)

# Write a raster
array = np.ones((100, 100), dtype="float32")
to_file(
    array, "rainfall.tif",
    xsize=100, ysize=100,
    crs="EPSG:4326",
    geotransform=(3.0, 0.01, 0, 9.0, 0, -0.01),
)

# Write a vector layer
stations = [
    (Point(3.9, 7.4), {"name": "Ibadan", "rainfall_mm": 120}),
    (Point(7.5, 9.1), {"name": "Abuja", "rainfall_mm": 95}),
]
to_file(stations, "stations.geojson", crs="EPSG:4326")

# Example: convert a shapefile to GeoJSON
geojson_from_shp = read_file('ne_10m_geography_regions_polys.shp')

# Read a raster data
dataset = read_file("rainfall.tif")
print(dataset.array.shape, dataset.crs)
```

## Project Structure

- `src/meteogis/analysis/` — climate and hydrological index functions
- `src/meteogis/raster/` — raster processing helpers
- `src/meteogis/vector/` — vector geometry operations
- `src/meteogis/io/` — read/write helpers for geospatial data
## Contributing

Contributions are welcome.

1. Fork the repository
2. Create a feature branch
3. Add or update tests and documentation
4. Submit a pull request

## License

This project is licensed under the MIT License.

## Author

David Akinduyile — thatpythonguy96@gmail.com
