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

Flood Timeseries Dataset #85

Closed
wants to merge 4 commits into from
Closed

Flood Timeseries Dataset #85

wants to merge 4 commits into from

Conversation

annehaley
Copy link
Collaborator

@annehaley annehaley commented Oct 25, 2024

Resolves #75.

This PR adds the simulated flood timeseries dataset created by Jack Watson. This involves the addition of a custom ingest function to split a single zip file item into many tiff file items. The current implementation is not abstracted; it relies on the presence of vrt files in the zip and relies on the file names to assert ordering.

Additionally, this PR adds animation controls to the current layer slider so that the user can automatically step through the layers on a dataset. The video (2x speed) below demonstrates this behavior on the flood timeseries dataset.

uvdat_flood_timeseries.mp4

@annehaley annehaley marked this pull request as ready for review October 25, 2024 17:21
@annehaley annehaley requested a review from jjnesbitt October 25, 2024 17:21
# this was built for the Boston Flood Timeseries dataset.
import large_image_converter

if file_item.file_type == 'zip':
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if file_item.file_type == 'zip':
if file_item.file_type != 'zip':
return

Comment on lines +50 to +53
def split_raster_zip(file_item, style_options):
"""For each raster image in a zip file, create a new FileItem."""
# NOTE: This implementation is not abstract;
# this was built for the Boston Flood Timeseries dataset.
Copy link
Member

Choose a reason for hiding this comment

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

If this is the case, I think the function should be labeled as such.

def create_raster_map_layer(file_item, style_options):
"""Save a RasterMapLayer from a FileItem's contents."""
if style_options is None:
style_options = {}
if file_item.file_type == 'zip':
Copy link
Member

Choose a reason for hiding this comment

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

Similar to my other comment, if the logic for extracting this data is specific to the boston flood timeseries dataset, a comment here explaining that would be good. That way, in the future, we know this is not general behavior.

@annehaley
Copy link
Collaborator Author

After a team discussion about changing the relationships between Projects, Datasets, and Layers, we decided that this implementation will soon be non-applicable. This PR will be closed and revisited after the design change.

@annehaley annehaley closed this Nov 6, 2024
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.

Revisit time-varying raster dataset (flood simulation)
2 participants