Repository navigation
Fix/barriers: remove isochrones inside large barriers areas - #534
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Valhalla generates internal isochrones inside barriers because it evaluates connectivity strictly through network topology, not geographic containment. In economic terms, it models supply chains along defined infrastructure lines rather than assuming a blanket regional embargo.RAPIDA's routing engine converts spatial road data into a binary optimized Direct Acyclic Graph (DAG). When a barrier polygon (like a flood extent or landslide zone) is introduced, the system applies it as a dynamic impedance, meaning it only deactivates the specific road segments that physically intersect the polygon's boundary. It effectively builds a tariff wall around the zone, severing external trade routes while leaving the internal market infrastructure intact. If a health facility—the service provider—is located inside this barrier, Valhalla evaluates the immediately adjacent, unsevered roads and calculates a local catchment area. It routes along this trapped internal network until the paths hit the penalized perimeter edges. The engine successfully maps a localized economy of accessible nodes, completely unaware that the entire geographic zone is compromised and functionally offline.For crisis mitigation, this default behavior creates a severe analytical distortion. RAPIDA’s connectivity analysis is designed to quantify the actual post-crisis reach of the health system by modeling a population's real-world ability to traverse a compromised landscape. A facility trapped within a disaster zone effectively has a functional reach of zero. By generating isochrones for these trapped facilities, Valhalla falsely signals available healthcare capacity. This skews the automated intersection of isochrones with population grids and miscalculates the true headcount of disconnected people. Programmatically filtering out these trapped origins before routing ensures the data accurately reflects the total loss of service provision in the affected area