This repository contains small collection of scripts that can be used to:
- Compute the binary mask of a basin from its boundaries provided as an esri shapefile.
- Extract the boundaries of a basin from its raster binary mask.
Installation:
Setup minimal conda installation using Miniconda
Create Python Virtual Environment
Examples:
Conversion from shapefile boundaries to raster binary mask:
python convert_shp_to_raster.py './data/input/Indus.dir/Indus.shp' --res=0.5
Conversion from raster binary mask to shapefile boundaries:
python convert_raster_to_shp.py './data/output/shapefile_to_raster/Indus/Indus.tiff'
- numpy: The fundamental package for scientific computing with Python
- xarray: xarray: N-D labeled arrays and datasets in Python
- pandas: Python Data Analysis Library
- geopandas: Python tools for geographic data
- rasterio: access to geospatial raster data
- fiona: reads and writes geographic data files
- shapely: Manipulation and analysis of geometric objects in the Cartesian plane.
- cartopy: Python package designed to produce maps and other geospatial data analyses.
- matplotlib: Library for creating static, animated, and interactive visualizations in Python.
The content of this project is licensed under the Creative Commons Attribution 4.0 Attribution license and the source code is licensed under the MIT license.