Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to crop regional analysis destinations to origin extents #939

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

ansoncfit
Copy link
Member

This PR adds a flag (CROP_DESTINATIONS) to crop destination grids to the web mercator extents used for origins. This setting can be useful for reducing computation, especially for auto analyses in large regions.

@ansoncfit ansoncfit marked this pull request as ready for review April 17, 2024 18:24
@ansoncfit ansoncfit requested a review from abyrd April 17, 2024 18:24
@ansoncfit ansoncfit changed the base branch from dev to patches-pre-7.2 April 18, 2024 01:04
Copy link
Member

@abyrd abyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is implemented as a flag, so it's considered a more off-label feature. Presence of the flag only changes conditional branch selection on a small, readily identifiable bit of code in a way that's already used in Taui site generation. The method RegionalTask#getWebMercatorExtents appears to only be called from methods run by workers. For these reasons, the risk of adverse effects on the main backend system is low.

We noted that although this is called CROP_DESTINATIONS it just makes the destination grid match the origin grid, which could make the travel time grid larger rather than smaller. But the grids containing the opportunity densities are effectively cropped by wrapping with GridTransformWrapper. We verified that these GridTransformWrappers are applied on a per-grid basis, not in some way that would make assumptions about the conditional code changed in this PR.

Looks good.

@ansoncfit ansoncfit merged commit d783ec9 into patches-pre-7.2 Apr 18, 2024
3 checks passed
@ansoncfit ansoncfit deleted the crop-destinations branch April 18, 2024 01:14
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.

None yet

2 participants