microsoft/imagery-provider-adaptation
Imagery provider adaptation skill for HASTE. Encapsulates provider-specific logic for satellite imagery sources (Planet, Maxar, Airbus, etc.). Use when: 'new imagery provider', 'add source type', 'satellite provider', 'Planet', 'Maxar', 'Airbus', 'Pleiades', 'WorldView', 'SkySat', 'imagery ingestion', 'provider adapter'.
npx skills add https://github.com/microsoft/haste --skill imagery-provider-adaptation
Structured process for adding new satellite imagery providers to HASTE. Each provider has different data formats, coordinate systems, APIs, band configurations, and delivery methods. This skill encapsulates the provider-specific logic needed to adapt a new source.
| Provider | Satellites | Format | Bands | Delivery |
|----------|-----------|--------|-------|----------|
| Maxar | WorldView-2/3/4, GeoEye-1 | GeoTIFF | 4-8 bands (BGRN + extras) | S3, STAC, Direct URL |
| Planet | PlanetScope, SkySat | GeoTIFF, COG | 4 bands (BGRN) | Planet API, S3 |
| Airbus | Pleiades, Pleiades Neo, SPOT | GeoTIFF, DIMAP | 4 bands (BGRN) | OneAtlas, S3 |
Each new provider requires:
hastegeo.core.modelsStep 1: Define source type
Add to the source type configuration in hastegeo.core.models:
# New source type with provider-specific configuration
class NewProviderConfig(BaseModel):
provider_name: str
api_url: str
band_order: list[str] # e.g., ["B", "G", "R", "NIR"]
default_crs: str # e.g., "EPSG:4326"
tile_size: int # e.g., 256
Step 2: Implement download handler
In hastegeo.core.processors.imagery:
# Handle provider-specific authentication and URL patterns
# Use requests with proper auth (API key, OAuth, etc.)
# Stream large files to avoid memory issues
# Validate downloaded file integrity
Step 3: Implement band mapping
# Map provider bands to HASTE standard order
# HASTE expects: [Blue, Green, Red, NIR] for 4-band
# Handle extra bands (e.g., coastal, red-edge, SWIR)
# Handle missing bands (e.g., panchromatic only)
Step 4: Implement preprocessing
# 1. Validate CRS — reproject if needed
# 2. Normalize resolution — resample to target GSD
# 3. Apply radiometric correction if needed
# 4. Generate COG with internal tiling and overviews
# 5. Validate output with rasterio
Step 5: Add to imagery processor
Update ImageryPreProcessor to route to the new handler based on source type.
Step 6: Write tests
# Test with real sample data (small AOI, public data preferred)
# Verify CRS preservation
# Verify band order mapping
# Verify COG compliance
# Verify metadata extraction
| Provider | Gotcha | Mitigation |
|----------|--------|------------|
| Maxar | Multiple UTM zones in a single order | Check CRS per file, reproject to consistent zone |
| Planet | UDM2 quality masks delivered separately | Download and apply quality mask before processing |
| Airbus | DIMAP format metadata | Parse XML metadata alongside GeoTIFF |
| All | Different nodata conventions | Standardize nodata to 0 or NaN during preprocessing |
| Scenario | Approach |
|----------|----------|
| Provider uses standard GeoTIFF | Minimal adapter — mostly URL/auth handling |
| Provider uses proprietary format | Full adapter — format conversion + metadata extraction |
| Provider delivers via STAC | Use existing STAC client, add provider-specific auth |
| Provider requires API key | Store in Config, never hardcode |
| Provider delivers in tiles | Implement tile stitching before COG generation |
Format: Cloud Optimized GeoTIFF
Tiling: 256x256 or 512x512 internal tiles
Overviews: Nearest power of 2, down to 256px
Compression: LZW or DEFLATE
CRS: Preserve source CRS (typically UTM or EPSG:4326)
Nodata: 0 for uint8/uint16, NaN for float
Bands: Blue, Green, Red, NIR (minimum)
Config classTake microsoft/imagery-provider-adaptation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.