Skip to content

Commit 66f5cc5

Browse files
committed
Update readme
1 parent cf5f471 commit 66f5cc5

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ This project is built on the following technologies: STAC, stac-fastapi, FastAPI
9292
- [Technologies](#technologies)
9393
- [Table of Contents](#table-of-contents)
9494
- [Collection Search Extensions](#collection-search-extensions)
95+
- [Catalogs Route](#catalogs-route)
9596
- [Documentation & Resources](#documentation--resources)
9697
- [SFEOS STAC Viewer](#sfeos-stac-viewer)
9798
- [Package Structure](#package-structure)
@@ -168,6 +169,8 @@ SFEOS provides enhanced collection search capabilities through two primary route
168169
- **GET/POST `/collections`**: The standard STAC endpoint with extended query parameters
169170
- **GET/POST `/collections-search`**: A custom endpoint that supports the same parameters, created to avoid conflicts with the STAC Transactions extension if enabled (which uses POST `/collections` for collection creation)
170171

172+
The `/collections-search` endpoint follows the [STAC API Collection Search Endpoint](https://github.com/Healy-Hyperspatial/stac-api-extensions-collection-search-endpoint) specification, which provides a dedicated, conflict-free mechanism for advanced collection searching.
173+
171174
These endpoints support advanced collection discovery features including:
172175

173176
- **Sorting**: Sort collections by sortable fields using the `sortby` parameter
@@ -227,6 +230,64 @@ These extensions make it easier to build user interfaces that display and naviga
227230
> **Important**: Adding keyword fields to make text fields sortable can significantly increase the index size, especially for large text fields. Consider the storage implications when deciding which fields to make sortable.
228231
229232

233+
## Catalogs Route
234+
235+
SFEOS supports hierarchical catalog browsing through the `/catalogs` endpoint, enabling users to navigate through STAC catalog structures in a tree-like fashion. This extension allows for organized discovery and browsing of collections and sub-catalogs.
236+
237+
This implementation follows the [STAC API Catalogs Extension](https://github.com/Healy-Hyperspatial/stac-api-extensions-catalogs) specification, which enables a Federated STAC API architecture with a "Hub and Spoke" structure.
238+
239+
### Features
240+
241+
- **Hierarchical Navigation**: Browse catalogs and sub-catalogs in a parent-child relationship structure
242+
- **Collection Discovery**: Access collections within specific catalog contexts
243+
- **STAC API Compliance**: Follows STAC specification for catalog objects and linking
244+
- **Flexible Querying**: Support for standard STAC API query parameters when browsing collections within catalogs
245+
246+
### Endpoints
247+
248+
- **GET `/catalogs`**: Retrieve the root catalog and its child catalogs
249+
- **POST `/catalogs`**: Create a new catalog (requires appropriate permissions)
250+
- **GET `/catalogs/{catalog_id}`**: Retrieve a specific catalog and its children
251+
- **GET `/catalogs/{catalog_id}/collections`**: Retrieve collections within a specific catalog
252+
- **GET `/catalogs/{catalog_id}/collections/{collection_id}`**: Retrieve a specific collection within a catalog
253+
- **GET `/catalogs/{catalog_id}/collections/{collection_id}/items`**: Retrieve items within a collection in a catalog context
254+
- **GET `/catalogs/{catalog_id}/collections/{collection_id}/items/{item_id}`**: Retrieve a specific item within a catalog context
255+
256+
### Usage Examples
257+
258+
```bash
259+
# Get root catalog
260+
curl "http://localhost:8081/catalogs"
261+
262+
# Get specific catalog
263+
curl "http://localhost:8081/catalogs/earth-observation"
264+
265+
# Get collections in a catalog
266+
curl "http://localhost:8081/catalogs/earth-observation/collections"
267+
268+
# Get specific collection within a catalog
269+
curl "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2"
270+
271+
# Get items in a collection within a catalog
272+
curl "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2/items"
273+
274+
# Get specific item within a catalog
275+
curl "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2/items/S2A_20231015_123456"
276+
```
277+
278+
### Response Structure
279+
280+
Catalog responses include:
281+
- **Catalog metadata**: ID, title, description, and other catalog properties
282+
- **Child catalogs**: Links to sub-catalogs for hierarchical navigation
283+
- **Collections**: Links to collections contained within the catalog
284+
- **STAC links**: Properly formatted STAC API links for navigation
285+
286+
This feature enables building user interfaces that provide organized, hierarchical browsing of STAC collections, making it easier for users to discover and navigate through large collections organized by theme, provider, or any other categorization scheme.
287+
288+
> **Configuration**: The catalogs route can be enabled or disabled by setting the `ENABLE_CATALOGS_ROUTE` environment variable to `true` or `false`. By default, this endpoint is **disabled**.
289+
290+
230291
## Package Structure
231292

232293
This project is organized into several packages, each with a specific purpose:
@@ -360,6 +421,7 @@ You can customize additional settings in your `.env` file:
360421
| `ENABLE_COLLECTIONS_SEARCH` | Enable collection search extensions (sort, fields, free text search, structured filtering, and datetime filtering) on the core `/collections` endpoint. | `true` | Optional |
361422
| `ENABLE_COLLECTIONS_SEARCH_ROUTE` | Enable the custom `/collections-search` endpoint (both GET and POST methods). When disabled, the custom endpoint will not be available, but collection search extensions will still be available on the core `/collections` endpoint if `ENABLE_COLLECTIONS_SEARCH` is true. | `false` | Optional |
362423
| `ENABLE_TRANSACTIONS_EXTENSIONS` | Enables or disables the Transactions and Bulk Transactions API extensions. This is useful for deployments where mutating the catalog via the API should be prevented. If set to `true`, the POST `/collections` route for search will be unavailable in the API. | `true` | Optional |
424+
| `ENABLE_CATALOGS_ROUTE` | Enable the `/catalogs` endpoint for hierarchical catalog browsing and navigation. When enabled, provides access to federated STAC API architecture with hub-and-spoke pattern. | `false` | Optional |
363425
| `STAC_GLOBAL_COLLECTION_MAX_LIMIT` | Configures the maximum number of STAC collections that can be returned in a single search request. | N/A | Optional |
364426
| `STAC_DEFAULT_COLLECTION_LIMIT` | Configures the default number of STAC collections returned when no limit parameter is specified in the request. | `300` | Optional |
365427
| `STAC_GLOBAL_ITEM_MAX_LIMIT` | Configures the maximum number of STAC items that can be returned in a single search request. | N/A | Optional |

0 commit comments

Comments
 (0)