Skip to content

Commit

Permalink
add searchInfoExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Oct 13, 2023
1 parent 9a6bd27 commit b946432
Show file tree
Hide file tree
Showing 9 changed files with 551 additions and 511 deletions.
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@
assert resp.json()["id"]
```

* move `/{search_id}/info` endpoint outside the `MosaicTilerFactory` to its own *extension* (`titiler.pgstac.extension.searchInfoExtension`)

```python
# Before
app = FastAPI()
mosaic = MosaicTilerFactory()
app.include_router(mosaic.router, tags=["Mosaic"])

# Now
app = FastAPI()
mosaic = MosaicTilerFactory(
extensions=[
searchInfoExtension(),
]
)
app.include_router(mosaic.router, tags=["Mosaic"])
```

## 0.8.0 (2023-10-06)

* update titiler requirement to `>=0.14.0,<0.15`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/advanced/custom_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $ curl -s -X 'POST' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJzY29wZSI6InpvbmVfQSJ9.BelzluX7v7kYObix2KSyy1T5gEOQYQn_pyNO5Ri0gWo' \
-H 'Content-Type: application/json' \
-d '{"filter":{"op":"and","args":[{"op":"=","args":[{"property":"collection"},"l1"]}]}}' | jq '.searchid'
-d '{"filter":{"op":"and","args":[{"op":"=","args":[{"property":"collection"},"l1"]}]}}' | jq '.id'
"bbc3c8f4c392436f74de6cd0308469f6"

$ curl -X 'GET' \
Expand Down
4 changes: 2 additions & 2 deletions docs/src/advanced/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
```
curl -X 'POST' 'http://127.0.0.1:8081/mosaic/register' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"filter": {"op": "=", "args": [{"property": "collection"}, "landsat-c2l2-sr"]}, "metadata": {"name": "landsat mosaic"}}'
>> {
"searchid": "d7fcdefd0457c949ea7a6192bc2c7122",
"id": "d7fcdefd0457c949ea7a6192bc2c7122",
"links": [
{
"rel": "metadata",
Expand All @@ -75,7 +75,7 @@ curl http://127.0.0.1:8081/mosaic/d7fcdefd0457c949ea7a6192bc2c7122/info | jq '.s
```
curl -X 'POST' 'http://127.0.0.1:8081/mosaic/register' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"collections": ["noaa-emergency-response"], "bbox": [-87.0251, 36.0999, -85.4249, 36.2251], "filter-lang": "cql-json", "metadata": {"bounds": [-87.0251, 36.0999, -85.4249, 36.2251], "minzoom": 14, "maxzoom": 18, "assets": ["cog"], "defaults": {"true_color": {"bidx": [1, 2, 3]}}}}'
>> {
"searchid":"4b0db3dbd1858d54a3a55f84de97d1ca",
"id":"4b0db3dbd1858d54a3a55f84de97d1ca",
"links":[
{
"rel": "metadata",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

By default the main application (`titiler.pgstac.main.app`) provides two sets of endpoints:

- `/mosaic/{searchid}`: Dynamic mosaic tiler based on STAC Search Queries
- `/mosaic/{search_id}`: Dynamic mosaic tiler based on STAC Search Queries

- `/collections/{collection_id}/items/{item_id}`: Dynamic tiler for single STAC item (stored in PgSTAC)

Expand Down
Loading

0 comments on commit b946432

Please sign in to comment.