add readme and requirements

This commit is contained in:
VALLONGOL 2025-05-06 15:25:23 +02:00
parent aff8df7701
commit 0cf34d5664
3 changed files with 155 additions and 1 deletions

3
.gitignore vendored
View File

@ -6,4 +6,5 @@ map_elevation/
elevation_cache/ elevation_cache/
__pycache__/ __pycache__/
_build/ _build/
_dist/ _dist/
_req_packages/

109
README.md Normal file
View File

@ -0,0 +1,109 @@
## GeoElevation Tool
**(English Presentation Below)**
**IT** | [EN](#english-presentation)
Questo strumento fornisce un'interfaccia grafica (GUI) per interagire con i dati di elevazione digitale del terreno (DEM), principalmente utilizzando i dataset NASADEM HGT. Permette agli utenti di:
* **Ottenere l'Elevazione Puntuale:** Inserire coordinate geografiche (latitudine e longitudine) per recuperare l'elevazione di un punto specifico.
* **Visualizzare Dati DEM:**
* Mostrare un'immagine di anteprima (browse image) del tile DEM corrispondente al punto selezionato.
* Generare e visualizzare una rappresentazione 3D interattiva del tile DEM, con opzioni per lo smoothing e l'interpolazione per una resa più realistica del terreno.
* **Scaricare Aree DEM:** Definire un'area geografica (bounding box) per scaricare automaticamente tutti i tile NASADEM HGT necessari per coprire tale area. I file vengono memorizzati in una cache locale per un accesso futuro più rapido.
* **Visualizzare Aree Scaricate:** Creare e mostrare un'immagine composita delle anteprime (browse images) di tutti i tile scaricati per un'area definita.
Lo strumento gestisce l'autenticazione con NASA Earthdata Login (tramite file `.netrc`), il download dei dati, l'estrazione e la conversione necessarie per la visualizzazione.
### Caratteristiche Principali
* Interfaccia utente intuitiva basata su Tkinter.
* Recupero dell'elevazione per coordinate specifiche.
* Download automatico e caching dei tile NASADEM (file HGT e immagini di anteprima).
* Visualizzazione 2D delle immagini di anteprima dei tile.
* Visualizzazione 3D interattiva dei dati di elevazione con:
* Smoothing Gaussiano opzionale per ridurre il rumore.
* Interpolazione Spline per una superficie del terreno più liscia e realistica.
* Controllo della densità della griglia di rendering per bilanciare dettaglio e prestazioni.
* Download di tile DEM per aree geografiche definite.
* Creazione di immagini composite per le aree scaricate.
* Utilizzo di multiprocessing per operazioni di visualizzazione lunghe, mantenendo la GUI reattiva.
### Requisiti
* Python 3.x
* Tkinter (solitamente incluso con Python)
* Requests
* NumPy
* Matplotlib
* Pillow (PIL Fork)
* Rasterio (per la lettura dei file HGT)
* SciPy (per lo smoothing e l'interpolazione nella visualizzazione 3D)
È necessario configurare un file `.netrc` nella propria directory home con le credenziali per `urs.earthdata.nasa.gov` per scaricare i dati DEM protetti.
---
---
## GeoElevation Tool
**(Presentazione in Italiano Sopra)**
**EN** | [IT](#geoelevation-tool-1)
This tool provides a Graphical User Interface (GUI) for interacting with digital elevation model (DEM) data, primarily utilizing the NASADEM HGT datasets. It allows users to:
* **Get Point Elevation:** Input geographic coordinates (latitude and longitude) to retrieve the elevation of a specific point.
* **Visualize DEM Data:**
* Display a browse image (preview) of the DEM tile corresponding to the selected point.
* Generate and display an interactive 3D representation of the DEM tile, with options for smoothing and interpolation for a more realistic terrain rendering.
* **Download DEM Areas:** Define a geographical area (bounding box) to automatically download all necessary NASADEM HGT tiles covering that area. Files are stored in a local cache for faster future access.
* **Visualize Downloaded Areas:** Create and show a composite image of the browse images for all downloaded tiles within a defined area.
The tool handles authentication with NASA Earthdata Login (via a `.netrc` file), data downloading, extraction, and the necessary conversions for visualization.
### Key Features
* Intuitive Tkinter-based user interface.
* Elevation retrieval for specific coordinates.
* Automatic download and caching of NASADEM tiles (HGT files and browse images).
* 2D visualization of tile browse images.
* Interactive 3D visualization of elevation data featuring:
* Optional Gaussian smoothing to reduce noise.
* Spline interpolation for a smoother, more realistic terrain surface.
* Control over the rendering grid density to balance detail and performance.
* DEM tile download for defined geographical areas.
* Composite image creation for downloaded areas.
* Utilizes multiprocessing for lengthy visualization tasks, keeping the GUI responsive.
### Requirements
* Python 3.x
* Tkinter (usually included with Python)
* Requests
* NumPy
* Matplotlib
* Pillow (PIL Fork)
* Rasterio (for reading HGT files)
* SciPy (for smoothing and interpolation in 3D visualization)
A `.netrc` file in your home directory must be configured with credentials for `urs.earthdata.nasa.gov` to download protected DEM data.
---
**Suggerimenti Aggiuntivi per il tuo `README.md`:**
* **Istruzioni di Installazione:**
* Come clonare il repository.
* Come installare le dipendenze (es. `pip install -r requirements.txt`).
* Come configurare il file `.netrc`.
* **Istruzioni di Esecuzione:**
* Come lanciare lo script (es. `python -m geoelevation`).
* Se fornisci un eseguibile, come lanciarlo.
* **Struttura del Progetto (opzionale):** Una breve descrizione dei file/moduli principali.
* **Screenshot:** Un paio di screenshot della GUI in azione possono essere molto utili.
* **Limitazioni Note / TODO:** Se ci sono funzionalità incomplete o problemi noti.
* **Licenza:** Specifica la licenza sotto cui rilasci il codice.
* **Come Contribuire (opzionale):** Se sei aperto a contributi.
Spero questo ti sia d'aiuto!

44
requirements.txt Normal file
View File

@ -0,0 +1,44 @@
# Requirements generated by DependencyAnalyzer for GeoElevation
# Python Version (analysis env): 3.13.3
# --- Standard Library Modules Used (part of Python 3.13.3) ---
# io (Used in: geoelevation\elevation_manager.py)
# logging (Used in: geoelevation\elevation_gui.py, geoelevation\elevation_manager.py, geoelevation\image_processor.py, ...)
# math (Used in: geoelevation\elevation_gui.py, geoelevation\elevation_manager.py, geoelevation\image_processor.py)
# multiprocessing (Used in: geoelevation\__main__.py, geoelevation\elevation_gui.py)
# netrc (Used in: geoelevation\elevation_manager.py)
# os (Used in: geoelevation\__main__.py, geoelevation\elevation_gui.py, geoelevation\elevation_manager.py, ...)
# re (Used in: geoelevation\_version.py)
# sys (Used in: geoelevation\__main__.py)
# threading (Used in: geoelevation\elevation_gui.py)
# time (Used in: geoelevation\elevation_manager.py, geoelevation\visualizer.py)
# tkinter (Used in: geoelevation\__main__.py, geoelevation\elevation_gui.py)
# traceback (Used in: geoelevation\__main__.py, geoelevation\elevation_gui.py)
# typing (Used in: geoelevation\elevation_gui.py, geoelevation\elevation_manager.py, geoelevation\image_processor.py, ...)
# zipfile (Used in: geoelevation\elevation_manager.py)
# --- External Dependencies (for pip install) ---
# Found (imported as 'PIL') in: geoelevation\image_processor.py, geoelevation\visualizer.py
# Detected version: 11.2.1
Pillow
# Found in: geoelevation\visualizer.py
# Detected version: 3.10.1
matplotlib
# Found in: geoelevation\elevation_gui.py, geoelevation\elevation_manager.py, geoelevation\visualizer.py
# Detected version: 2.2.5
numpy
# Found in: geoelevation\elevation_manager.py
# Detected version: 1.4.3
rasterio
# Found in: geoelevation\elevation_manager.py
# Detected version: 2.32.3
requests
# Found in: geoelevation\visualizer.py
# Detected version: 1.15.2
scipy