Cómo crear un Raster Geoespacial a partir de un Embalse proyectado con Python y hatariTools - Tutorial

La tarea de modificar rasters geoespaciales considerando elementos futuros puede ser compleja con las herramientas SIG disponibles. Hemos optimizado la forma en que podemos representar la superficie de embalses futuros (o actuales) en un raster geoespacial. Este tutorial muestra el proceso completo para crear un raster geoespacial (archivo TIF) basado en los contornos de la presa y la extensión del embalse.

Tutorial


Código

#!pip install hatariTools
from hatariTools.geospatialTools.rasterTools import modifyRasterwithRasterOnMask, modifyRasterwithElevOnMask
wholeRasterPath = "../rst/tsfDem10m.tif"
partialRasterPath = "../output/damElev.tif"
maskLayerPath = "../shp/damEnvelope_v2.shp"
modifiedRasterPath = "../output/demWithDam.tif"
modifyRasterwithRasterOnMask(wholeRasterPath,
                             partialRasterPath,
                             maskLayerPath,
                             modifiedRasterPath)
wholeRasterPath = "../output/demWithDam.tif"
elevValue = 670
maskLayerPath = "../shp/tailingsEnvelope_v2.shp"
modifiedRasterPath = "../output/demWithReservoir.tif"
modifyRasterwithElevOnMask(wholeRasterPath,
                           elevValue,
                           maskLayerPath,
                           modifiedRasterPath)

Datos de ingreso

Puede descargar los datos de ingreso desde este enlace.

 

Suscríbete a nuestro boletín electrónico

Suscríbase a nuestro boletín gratuito para recibir noticias, datos interesantes y fechas de nuestros cursos en recursos hídricos.

 

Posted on August 19, 2025 and filed under TutorialPython, Modelamiento.