This repository provides a Jupyter Notebook designed for processing geospatial and hyperspectral data to extract pixel values and coordinates within defined polygon areas. The tool combines information from shapefiles and hyperspectral images to generate comprehensive CSV files suitable for land-use analysis, environmental monitoring, or solar panel site assessments.
- Geospatial Data Processing: Efficiently reads hyperspectral TIFF images and shapefiles to analyze land characteristics.
- Pixel Data Extraction: Retrieves pixel values and coordinates within polygons defined in shapefiles.
- CSV Generation: Combines shapefile properties, geographic coordinates, and spectral band data into a structured CSV output.
- Customizable Analysis: Suitable for diverse applications, including barren land assessment and solar energy suitability studies.
Ensure you have the following Python libraries installed:
pip install geopandas rasterio shapely fiona numpy pandas
- Hyperspectral Image: GeoTIFF file containing multi-band imagery data (e.g.,
GoogleEarth_image_with_L_Band.tif
). - Shapefile: Vector data defining polygons for the areas of interest (e.g.,
barren.shp
).
-
Clone the Repository
git clone https://github.com/mahmoodalikhan1999/hyperspectral-data-processing cd Satellite_Imagery_Shapefile_to_CSV
-
Prepare Input Files
- Place the required hyperspectral image and shapefile in the project directory.
-
Run the Jupyter Notebook
- Open and execute
CSVs_Generator.ipynb
in Jupyter Notebook or JupyterLab.
- Open and execute
-
Specify Parameters
- Customize file paths and processing parameters as needed.
-
Generate CSV
- The output CSV (e.g.,
barren.csv
) will be saved in the specified directory.
- The output CSV (e.g.,
-
Load Hyperspectral Data:
Reads and visualizes the spectral data from the TIFF image. -
Define Polygon Areas:
Extracts pixel data within polygon regions specified in the shapefile. -
Generate CSV File:
Outputs comprehensive data, including coordinates, spectral values, and polygon properties.
- Land Use Analysis: Evaluate land characteristics for urban planning and environmental studies.
- Solar Panel Assessment: Analyze barren land for solar energy suitability.
- Environmental Monitoring: Track changes in land cover and usage over time.
geopandas
rasterio
shapely
fiona
numpy
pandas
This project is open for use and adaptation in accordance with the repository's license.