Skip to content

Add getArgusImagery function for FRF tower orthophoto retrieval#20

Merged
SBFRF merged 4 commits into
mainfrom
feature/argus-imagery-issue-18
Jan 29, 2026
Merged

Add getArgusImagery function for FRF tower orthophoto retrieval#20
SBFRF merged 4 commits into
mainfrom
feature/argus-imagery-issue-18

Conversation

@SBFRF

@SBFRF SBFRF commented Jan 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds getArgusImagery() function to retrieve Argus orthophoto imagery from the FRF coastal imaging server (coastalimaging.erdc.dren.mil)
  • Adds threadGetArgusImagery() for non-blocking background downloads
  • Supports image types: timex, var, snap, brightest, darkest
  • Images available every 30 minutes; function rounds input time to nearest interval

Test plan

  • Unit tests added for URL construction, time rounding, error handling
  • Unit tests for threaded version verify non-blocking behavior
  • All tests pass (pytest tests/test_getDataFRF.py -v -m "not slow")
  • Manual test with network access to verify actual image retrieval

Closes #18

🤖 Generated with Claude Code

SBFRF and others added 2 commits January 26, 2026 13:00
Implements issue #18 - adds functions to retrieve Argus imagery from the
coastalimaging.erdc.dren.mil server:

- getArgusImagery(): Synchronous retrieval of Argus orthophotos
  - Supports image types: timex, var, snap, brightest, darkest
  - Rounds time to nearest 30-minute interval
  - Returns dict with image array, time, epochtime, and metadata

- threadGetArgusImagery(): Non-blocking background download version
  - Returns filename immediately while download proceeds in background

Closes #18

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SBFRF

SBFRF commented Jan 27, 2026

Copy link
Copy Markdown
Owner Author

Additional changes in this update

This PR now also includes:

New utility function

  • get_geotiff_extent(): Parses GeoTIFF ModelTiepointTag and ModelPixelScaleTag to extract matplotlib extent (uses tifffile, no GDAL needed)

New example script

  • examples/test_wave_and_imagery.py: Demonstrates wave data + imagery overlay
    • Fetches wave data from all FRF gauges (last 30 days)
    • Retrieves satellite imagery via getSatelliteImagery()
    • Retrieves Argus orthophoto via getArgusImagery()
    • Converts Argus State Plane coords to lat/lon using geoprocess.FRFcoord()
    • Creates 2-panel figure: wave height time series (top) + gauge locations over imagery with Argus overlay at 50% opacity (bottom)

Test

python examples/test_wave_and_imagery.py

- Add findArgusImagery() wrapper function that searches for nearest
  available imagery when exact time is not available
- Supports two search modes:
  - method=0: Nearest in TIME (bidirectional search)
  - method=1: Nearest in HISTORY (backward only, for operational use)
- Fix image type names: 'brightest'->'bright', 'darkest'->'dark'
- Add search_window_hours parameter (default 24h)
- Returns time_requested and time_offset_minutes in result dict
- Update test_wave_and_imagery.py to use new wrapper

Closes #18

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@SBFRF SBFRF left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

lgtm

Update valid_types in test to match actual server naming:
- 'brightest' -> 'bright'
- 'darkest' -> 'dark'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SBFRF
SBFRF merged commit 27c74c6 into main Jan 29, 2026
4 checks passed
@SBFRF
SBFRF deleted the feature/argus-imagery-issue-18 branch January 29, 2026 22:08
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.

create function to grab Argus imagery

1 participant