Skip to content

Conversation

jonhealy1
Copy link
Collaborator

@jonhealy1 jonhealy1 commented Sep 29, 2025

Related Issue(s):

Description:

This PR introduces spatial search capabilities for collections and a new CLI tool package for managing SFEOS deployments.

Key Features:

  1. Collection Spatial Search

    • Added bbox parameter support to /collections endpoint for filtering collections by geographic extent
    • Collections are automatically indexed with a bbox_shape field (GeoJSON polygon) derived from their spatial extent
    • Supports both 2D and 3D bounding boxes (altitude values are ignored for spatial queries)
    • Efficient geospatial queries using Elasticsearch/OpenSearch geo_shape type
  2. SFEOS Tools CLI Package

    • New installable Python package (sfeos_tools/) for managing SFEOS deployments
    • Initial command: add-bbox-shape - migrates legacy collections to support spatial search
    • Flexible connection options via CLI flags or environment variables
    • Supports both Elasticsearch and OpenSearch backends
    • Install with: pip install sfeos-tools[elasticsearch] or pip install sfeos-tools[opensearch]
  3. Migration Support

    • Legacy collections (created before this feature) can be migrated using the CLI tool or by updating the collection via the API and the Transactions Extension
    • Automatic bbox_shape generation for new/updated collections
    • Backward compatible - existing collections remain searchable via other parameters

Usage Examples:

# Search collections by bounding box
GET /collections?bbox=-10,35,40,70

# Migrate legacy collections
sfeos-tools add-bbox-shape --backend elasticsearch --no-ssl

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@jonhealy1 jonhealy1 marked this pull request as ready for review October 10, 2025 16:54
@jonhealy1 jonhealy1 merged commit 0517b4b into stac-utils:main Oct 12, 2025
15 checks passed
@jonhealy1 jonhealy1 deleted the collections-search-bbox branch October 12, 2025 06:56
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.

1 participant