fix: support SingleImageSatellite in POST /images download path - #27
Merged
mateuspinto merged 1 commit intoJul 6, 2026
Merged
Conversation
POST /images failed for every SingleImageSatellite (all DEMs, soil products) with "ImageCollection.__init__() missing 1 required positional argument: 'args'": download_multiple_images_async unconditionally calls satellite.imageCollection(ee_feature), which single-image classes do not implement, so the base-class stub returns ee.ImageCollection() with no arguments. Static datasets have no time dimension, so the collection-resolution machinery does not apply. Branch before it and resolve a single getDownloadURL ZIP saved as <shortName>.zip in the existing cache dir, reusing the retry/timeout policy of the collection path. The download passes scale=satellite.pixelSize explicitly: composited images (e.g. USGS3DEP1m's mosaic()) lose their source projection and would otherwise export at the 1-degree default scale. Verified against a live deployment: a ~415x445 m AOI returned a 667-byte raster without the scale argument and a 558x446 px GeoTIFF at 1 m with it. PolarisSoilTexture returned all four bands (clay/sand/silt/ usda_soil_class) at native 30 m. Also fix PolarisSoilTexture.__init__ calling super().__init__ without parentheses (a no-op attribute access). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
POST /imagesfails for everySingleImageSatellite(all DEMs,PolarisSoilTexture,WRBSoilClasses) with:download_multiple_images_asyncunconditionally callssatellite.imageCollection(ee_feature). Single-image classes implementimage()instead, so the call lands on theAbstractSatellitestub, which returnsee.ImageCollection()with no arguments and raises.Fix
Static datasets have no time dimension, so none of the collection-resolution machinery (date filtering,
ZZ_USER_VALID_PIXELSthresholding, per-date chunking) applies. The images path now branches before building the collection expression and resolves a singlegetDownloadURLZIP, saved as<shortName>.zipin the same cache dir, with the same retry/timeout policy as the collection path. The job result'sdateslist contains[shortName].Two details worth flagging:
scale=satellite.pixelSizeis passed explicitly. Composited images (e.g.USGS3DEP1m, which doesee.ImageCollection(...).mosaic()) lose their source projection, andgetDownloadURLthen exports at the 1-degree default. Tested live: a ~415×445 m AOI returned a 667-byte raster without the scale argument, and a 558×446 px GeoTIFF at true 1 m with it.PolarisSoilTexture.__init__calledsuper().__init__without parentheses — a no-op attribute access, so the base-class attributes were never initialized. Added the missing parens.Validation
Run against a live deployment (built from
main@ d81299e + this patch), through the full REST flow (POST /images→ pollGET /jobs/{id}→GET /jobs/{id}/download):USGS3DEP1mPolarisSoilTextureNAIP(regression)🤖 Generated with Claude Code