imagery-provider-adaptation
Imagery provider adaptation skill for HASTE. Encapsulates provider-specific logic for satellite imagery sources (Planet, Vantor, Airbus, etc.). Use when: 'new imagery provider', 'add source type', 'satellite provider', 'Planet', 'Vantor', 'Airbus', 'Pleiades', 'WorldView', 'SkySat', 'imagery ingestion', 'provider adapter'.
- License 许可
- MIT
- 所属仓库
- microsoft/haste
- 最近更新
- 2026-11-10
- Stars
- ★ 110
- Forks
- 19
01 前言 Front Matter
- name
- imagery-provider-adaptation
- level
- advanced
- agents
- [ "gis", "backend-dev" ]
- domain
- geospatial
- source
- HASTE imagery processing pipeline, satellite provider documentation
- status
- draft
- description
- Imagery provider adaptation skill for HASTE. Encapsulates provider-specific logic for satellite imagery sources (Planet, Vantor, Airbus, etc.). Use when: 'new imagery provider', 'add source type', 'satellite provider', 'Planet', 'Vantor', 'Airbus', 'Pleiades', 'WorldView', 'SkySat', 'imagery ingestion', 'provider adapter'.
- created_date
- 2026-04-27
- validated_by
- last_validated
02 资源文件 55
- 许可证LICENSE.txt1.4 KB
- 脚本scripts/__init__.py—
- 脚本scripts/add_slide.py14.2 KB
- 脚本scripts/clean.py10.2 KB
- 脚本scripts/office/helpers/__init__.py3.3 KB
- 脚本scripts/office/helpers/pptx_chart.py5.7 KB
- 脚本scripts/office/helpers/pptx_slide.py1.6 KB
- 脚本scripts/office/helpers/pptx_theme.py3.4 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd1.9 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd2.5 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd2.8 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd1.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd73.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd6.8 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd50.1 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd624 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd148.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd8.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd14.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd81.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd7.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd6.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd880 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd2.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd3.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd7.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd22.8 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd1.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd236.6 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd25.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd24.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd535 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd5.6 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd3.9 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd167.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd4.5 KB
- 脚本scripts/office/schemas/mce/mc.xsd3.1 KB
- 脚本scripts/office/schemas/microsoft/wml-2010.xsd25.9 KB
- 脚本scripts/office/schemas/microsoft/wml-2012.xsd3.7 KB
- 脚本scripts/office/schemas/microsoft/wml-2018.xsd901 B
- 脚本scripts/office/schemas/microsoft/wml-cex-2018.xsd1.7 KB
- 脚本scripts/office/schemas/microsoft/wml-cid-2016.xsd1002 B
- 脚本scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd600 B
- 脚本scripts/office/schemas/microsoft/wml-symex-2015.xsd745 B
- 脚本scripts/office/soffice.py5.8 KB
- 脚本scripts/office/validate.py6.0 KB
- 脚本scripts/office/validators/__init__.py336 B
- 脚本scripts/office/validators/base.py33.0 KB
- 脚本scripts/office/validators/docx.py17.1 KB
- 脚本scripts/office/validators/pptx.py15.6 KB
- 脚本scripts/office/validators/redlining.py11.0 KB
- 脚本scripts/thumbnail.py9.6 KB
03 SKILL.md 正文
Imagery Provider Adaptation
Overview
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.
Key Concepts
Current Providers
| Provider | Satellites | Format | Bands | Delivery |
|---|---|---|---|---|
| Vantor | 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 |
Provider Adapter Components
Each new provider requires:
- Source Type Definition — Model configuration in
hastegeo.core.models - Download Handler — Provider-specific authentication and download logic
- Band Mapping — Map provider bands to HASTE's expected band order
- Metadata Parser — Extract spatial metadata from provider-specific formats
- Preprocessing Rules — Resolution normalization, radiometric correction
- Tests — Integration tests with sample provider data
Patterns & Techniques
Adding a New Provider: Step-by-Step
Step 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-Specific Gotchas
| Provider | Gotcha | Mitigation |
|---|---|---|
| Vantor | 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 |
Decision Framework
| 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 |
Quick Reference: COG Output Standard
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)
Common Pitfalls
- Assuming all providers use the same band order — Always check and map explicitly
- Hardcoding provider URLs/keys — Use
Configclass - Ignoring quality masks — Bad pixels contaminate training data
- Not testing with edge cases — Antimeridian crossing, polar regions, dateline
- Downloading entire scenes when only a small AOI is needed — Use provider APIs to clip
04 同仓库更多 Skills
validation-diagnostics
Validation and diagnostic skill for HASTE. Compare planned vs implemented work, generate diagnostic reports, and feed misses back into skill refinement. Use when: 'validate implementation', 'compare to spec', 'diagnostic report', 'drift analysis', 'coverage check', 'implementation review'.
security-analysis
Dependabot and security analysis skill for HASTE. Parse alerts, group related vulnerabilities, apply severity rules, and produce structured reports. Use when: 'Dependabot alert', 'security scan', 'vulnerability triage', 'dependency audit', 'npm audit', 'pip audit', 'CVE analysis'.
release-notes
Generate release notes from commit history. Use when asked to draft release notes, create a changelog, or summarize changes for a release.
deterministic-scripts
Deterministic script execution skill for HASTE. Execute scripts instead of free-form LLM behavior for consistent, repeatable operations. Use when: 'run preprocessing', 'convert format', 'parse metadata', 'generate tiles', 'build wheel', 'deploy functions'. Prevents hallucinated scripts.
dependency-update
Guide for safely updating project dependencies. Use when asked to update packages, upgrade dependencies, or check for outdated libraries.
debug-test-failures
Systematic debugging workflow for test failures. Use when tests are failing, a CI build is red, or when asked to debug test issues.