Skip to content

Conversation

@songololo
Copy link
Collaborator

Experimental tiled version for processing large extents

@songololo
Copy link
Collaborator Author

songololo commented Nov 21, 2025

Seems to be working now - False by default but can be turned on to process larger files in chunks, e.g.

athens_demo.py

# %%
# skyview factor for SOLWEIG - tiled
skyviewfactor_algorithm.generate_svf(
    dsm_path=input_path_str + "/DSM.tif",
    bbox=total_extents,
    out_dir=output_folder_path_str + "/svf_tiled",
    dem_path=input_path_str + "/DEM.tif",
    cdsm_path=output_folder_path_str + "/CDSM.tif",
    trans_veg_perc=3,
    use_tiled_loading=True,
    tile_size=200,
)

# %%
# Tiled
SRC = solweig_runner_core.SolweigRunCore(
    "demos/data/athens/configsolweig_tiled.ini",
    "demos/data/athens/parametersforsolweig.json",
    use_tiled_loading=True,
    tile_size=200,
)
SRC.run()

PS - 200 used for testing but 1000 or 2000 probably better range to chunk

@songololo
Copy link
Collaborator Author

PS - the motivation with this change is to handle large files which would sometimes cause machine to run out of RAM. It also makes it easier for the downstream implementation in the rust version to use the GPU, which would otherwise be overwhelmed the GPU buffers for large files. In combination with the float32 change this makes memory easier to manage and large files easier to process.

@songololo
Copy link
Collaborator Author

The shadow matrices (SVF) for anisotropic sky were still prohibitively large so these are now converted to uint8

@biglimp
Copy link
Collaborator

biglimp commented Nov 27, 2025

Strange. I Though I left a comment here but it seem to have disappeared.

Your buffer parameter specifying the overlap between the tiles, is it 150 one way or both ways (i.e. merging at 75 meters or 150 meters)? How do you merge (just sharp transition at buffer edge of do you blend)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants