PythonでJAXAの人工衛星だいち(ALOS)の世界標高データ活用(2)
前回: https://shikuuk.blogspot.com/2025/07/jaxaalospython.html 第2部はさきほどDownloadした「N030E130_N035E135.zip」に含まれている5×5のTileを1枚の大きなModelに結合する処理(モザイク処理と呼ぶそうです)のCodeをGemini先生にお願いしました。 ※JAXAさま AW3D30 DSM data map Download Page参照 ( https://www.eorc.jaxa.jp/ALOS/en/aw3d30/data/index.htm ) import rasterio import numpy as np import os from rasterio.enums import Resampling from rasterio.merge import merge # Ensure merge is imported def merge_elevation_tiles ( tile_dir , output_filepath ) : """ Reads all GeoTIFF elevation tiles in the specified directory, merges them into a single GeoTIFF file, and saves it. Args: tile_dir (str): Path to the directory containing GeoTIFF files. output_filepath (str): Output path for the merged GeoTIFF file. Returns: str: Path to the merged GeoTIFF file (on success), or None (on failure). "...