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 support for velocity mosaics from granule stacks without a common reference date #57

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

asjohnston-asf
Copy link
Member

@asjohnston-asf asjohnston-asf commented Dec 13, 2024

No description provided.

@asjohnston-asf asjohnston-asf requested a review from a team as a code owner December 13, 2024 21:42
src/opera_disp_tms/generate_sw_vel_tile.py Outdated Show resolved Hide resolved
bbox = create_buffered_bbox(geotransform.to_gdal(), frame_map_array.shape, 90) # EPSG:3857 is in meters
granule_xrs = [sw_disp.load_sw_disp_granule(x, bbox) for x in granules]
granule_xrs = [sw_disp.load_sw_disp_granule(x, bbox) for x in sorted_granules]
align_to_common_reference_date(granule_xrs)
Copy link
Contributor

@forrestfwilliams forrestfwilliams Dec 16, 2024

Choose a reason for hiding this comment

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

When this function is called we're not currently guaranteed to have all granules between two dates. For example, if we're trying to get velocity between date1 and date5, there might be granules like:

date1_date2, date1_date3 date3_date4, date4_date5

but calling find_needed_granules here with the minmax strategy would only load date1_date3, and date4_date5.

Two possible ways to accomplish this:

  1. All ways download all granules between two dates, even if some granules will not be needed
  2. Dynamically find the set of granules needed to reconstruct the full deformation history and load them so they can be used in align_to_common_reference_date

Copy link
Member Author

@asjohnston-asf asjohnston-asf Dec 16, 2024

Choose a reason for hiding this comment

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

The two core use cases I see brewing have been:

For a particular frame...

  • ...give me a single data band representing net/cumulative displacement from Date A to Date B. This satisfies the needs of the cumulative displacement and secant velocity visualizations.
  • ...give me a time series of data bands, each representing net/cumulative displacement from a common reference date, for all available time steps from Date A to Date B. This satisfies the needs of the velocity-via-linear-regression visualization.

I suspect these are also the data-preparation steps data users will need to do for most analysis using this data set. I'm somewhat eager to revisit find_needed_granules, update_reference_date, and align_to_common_reference_date to provide a better interface for those two more generic use cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose the latter time-series approach satisfies all use cases, but when you only care about total change the former approach would be faster and require less data access.

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.

2 participants