Function lupnt::LoadLolaDem¶
Defined in File lola_dem.h
Function Documentation¶
-
LunarDem lupnt::LoadLolaDem(double lat_deg, double lon_deg, double half_width_m = 5000.0, double max_res = 20.0, const std::filesystem::path &dem_file = {})¶
Load the appropriate PGDA product-78 DEM for a query latitude/longitude.
Selects the nearest site (
SelectLolaSite), ensures its GeoTIFF is downloaded/cached (DownloadLolaDem), then crops a2*half_width_msquare window centered on the tile and downsamples it to at mostmax_resgrid spacing via the existingLoadTiff.When
dem_fileis non-empty it overrides the site download entirely: the given GeoTIFF is loaded/cropped/downsampled directly (noDownloadLolaDem, no network access). The site metadata attached to the returnedLunarDemis still the nearestSelectLolaSiteentry for the query lat/lon (a synthetic label, since the explicit file may be any tile). This is the path used to run surface scenarios against a small bundled fixture tile.- Parameters:
lat_deg – Query latitude [deg] (negative near the south pole).
lon_deg – Query east longitude [deg].
half_width_m – Half-width of the square crop window [m] about the tile center.
max_res – Maximum output grid spacing [m] (downsampling target).
dem_file – Optional explicit GeoTIFF path; if set, skips site select/download.
- Returns:
The cropped/downsampled
LunarDem.