Skip to content

Commit 3b80678

Browse files
Merge pull request #1 from developmentseed/ab/initial-changes-for-mspc
Ab/initial changes for mspc
2 parents 6ac6de4 + 8640e48 commit 3b80678

File tree

18 files changed

+72
-1770
lines changed

18 files changed

+72
-1770
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ on:
55
workflow_dispatch:
66
push:
77
branches:
8-
- main
9-
- develop
8+
- main
9+
- develop
1010
tags:
11-
- '*'
11+
- "*"
1212
paths:
1313
# Only run test and docker publish if some code have changed
14-
- 'pyproject.toml'
15-
- 'titiler/**'
16-
- '.pre-commit-config.yaml'
17-
- '.github/workflows/ci.yml'
14+
- "pyproject.toml"
15+
- "titiler/**"
16+
- ".pre-commit-config.yaml"
17+
- ".github/workflows/ci.yml"
1818

1919
# Run tests on pull requests.
2020
pull_request:
21+
branches:
22+
- main
2123
env:
22-
LATEST_PY_VERSION: '3.12'
23-
24+
LATEST_PY_VERSION: "3.12"
2425

2526
jobs:
2627
tests:
2728
runs-on: ubuntu-latest
29+
if: github.event.pull_request.base.ref == 'main' || github.event_name != 'pull_request'
2830
strategy:
2931
matrix:
30-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
32+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3133

3234
steps:
3335
- uses: actions/checkout@v4
@@ -59,13 +61,12 @@ jobs:
5961
name: ${{ matrix.python-version }}
6062
fail_ci_if_error: false
6163

62-
6364
publish-docker:
6465
needs: [tests]
6566
# runs on push to main, on tag creation, and on release
6667
if: github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
6768
runs-on: ubuntu-latest
68-
69+
6970
steps:
7071
- name: Checkout
7172
uses: actions/checkout@v4
@@ -98,7 +99,7 @@ jobs:
9899
file: dockerfiles/Dockerfile
99100
push: true
100101
tags: |
101-
ghcr.io/developmentseed/titiler-stacapi:latest
102+
ghcr.io/developmentseed/titiler-stacapi-mspc:latest
102103
103104
# Push `{VERSION}` when pushing a new tag
104105
- name: Build and push tag
@@ -110,4 +111,4 @@ jobs:
110111
file: dockerfiles/Dockerfile
111112
push: true
112113
tags: |
113-
ghcr.io/developmentseed/titiler-stacapi:${{ steps.tag.outputs.version }}
114+
ghcr.io/developmentseed/titiler-stacapi-mspc:${{ steps.tag.outputs.version }}

README.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# titiler-stacapi
1+
# titiler-stacapi-mspc
22

33
<p align="center">
44
<img width="800" src="https://github.com/developmentseed/titiler-stacapi/assets/10407788/bb54162e-9a47-4a67-99e5-6dc91098e048">
5-
<p align="center">Connect titiler to STAC APIs</p>
5+
<p align="center">Connect titiler to MS Planetary Computer STAC API</p>
66
</p>
77

88
<p align="center">
9-
<a href="https://github.com/developmentseed/titiler-stacapi/actions?query=workflow%3ACI" target="_blank">
10-
<img src="https://github.com/developmentseed/titiler-stacapi/workflows/CI/badge.svg" alt="Test">
9+
<a href="https://github.com/developmentseed/titiler-stacapi-mspc/actions?query=workflow%3ACI" target="_blank">
10+
<img src="https://github.com/developmentseed/titiler-stacapi-mspc/workflows/CI/badge.svg" alt="Test">
1111
</a>
12-
<a href="https://codecov.io/gh/developmentseed/titiler-stacapi" target="_blank">
13-
<img src="https://codecov.io/gh/developmentseed/titiler-stacapi/branch/main/graph/badge.svg" alt="Coverage">
12+
<a href="https://codecov.io/gh/developmentseed/titiler-stacapi-mspc" target="_blank">
13+
<img src="https://codecov.io/gh/developmentseed/titiler-stacapi-mspc/branch/main/graph/badge.svg" alt="Coverage">
1414
</a>
15-
<a href="https://github.com/developmentseed/titiler-stacapi/blob/main/LICENSE" target="_blank">
16-
<img src="https://img.shields.io/github/license/developmentseed/titiler-stacapi.svg" alt="License">
15+
<a href="https://github.com/developmentseed/titiler-stacapi-mspc/blob/main/LICENSE" target="_blank">
16+
<img src="https://img.shields.io/github/license/developmentseed/titiler-stacapi-mspc.svg" alt="License">
1717
</a>
1818
</p>
1919

2020
---
2121

22-
**Documentation**: <a href="https://developmentseed.org/titiler-stacapi/" target="_blank">https://developmentseed.org/titiler-stacapi/</a>
22+
**Documentation**: <a href="https://developmentseed.org/titiler-stacapi-mspc/" target="_blank">https://developmentseed.org/titiler-stacapi-mspc/</a>
2323

24-
**Source Code**: <a href="https://github.com/developmentseed/titiler-stacapi" target="_blank">https://github.com/developmentseed/titiler-stacapi</a>
24+
**Source Code**: <a href="https://github.com/developmentseed/titiler-stacapi-mspc" target="_blank">https://github.com/developmentseed/titiler-stacapi-mspc</a>
2525

2626
---
2727

@@ -30,18 +30,14 @@
3030
Install from sources and run for development:
3131

3232
```
33-
$ git clone https://github.com/developmentseed/titiler-stacapi.git
34-
$ cd titiler-stacapi
33+
$ git clone https://github.com/developmentseed/titiler-stacapi-mspc.git
34+
$ cd titiler-stacapi-mspc
3535
$ python -m pip install -e .
3636
```
3737

3838
## Launch
3939

40-
You'll need to have `TITILER_STACAPI_STAC_API_URL` variables set in your environment pointing to your STAC API service.
41-
42-
```
43-
export TITILER_STACAPI_STAC_API_URL=https://api.stac
44-
```
40+
By default the `stac_api_url` is https://planetarycomputer.microsoft.com/api/stac/v1, but you can override it by setting the environment variable `TITILER_STACAPI_STAC_API_URL`.
4541

4642
```
4743
python -m pip install uvicorn
@@ -52,8 +48,8 @@ uvicorn titiler.stacapi.main:app --port 8000
5248
### Using Docker
5349

5450
```
55-
$ git clone https://github.com/developmentseed/titiler-stacapi.git
56-
$ cd titiler-stacapi
51+
$ git clone https://github.com/developmentseed/titiler-stacapi-mspc.git
52+
$ cd titiler-stacapi-mspc
5753
$ docker-compose up --build api
5854
```
5955

@@ -65,16 +61,16 @@ It runs `titiler.stacapi` using Gunicorn web server.
6561

6662
## Contribution & Development
6763

68-
See [CONTRIBUTING.md](https://github.com//developmentseed/titiler-stacapi/blob/main/CONTRIBUTING.md)
64+
See [CONTRIBUTING.md](https://github.com//developmentseed/titiler-stacapi-mspc/blob/main/CONTRIBUTING.md)
6965

7066
## License
7167

72-
See [LICENSE](https://github.com//developmentseed/titiler-stacapi/blob/main/LICENSE)
68+
See [LICENSE](https://github.com//developmentseed/titiler-stacapi-mspc/blob/main/LICENSE)
7369

7470
## Authors
7571

76-
See [contributors](https://github.com/developmentseed/titiler-stacapi/graphs/contributors) for a listing of individual contributors.
72+
See [contributors](https://github.com/developmentseed/titiler-stacapi-mspc/graphs/contributors) for a listing of individual contributors.
7773

7874
## Changes
7975

80-
See [CHANGES.md](https://github.com/developmentseed/titiler-stacapi/blob/main/CHANGES.md).
76+
See [CHANGELOG.md](https://github.com/developmentseed/titiler-stacapi-mspc/blob/main/CHANGELOG.md).

docs/mkdocs.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
site_name: TiTiler.STACApi
22
site_description: Connect titiler to STAC APIs.
33

4-
docs_dir: 'src'
5-
site_dir: 'build'
4+
docs_dir: "src"
5+
site_dir: "build"
66

7-
repo_name: developmentseed/titiler-stacapi
8-
repo_url: https://github.com/developmentseed/titiler-stacapi
7+
repo_name: developmentseed/titiler-stacapi-mspc
8+
repo_url: https://github.com/developmentseed/titiler-stacapi-mspc
99
edit_uri: blob/main/docs/
10-
site_url: https://developmentseed.org/titiler-stacapi/
10+
site_url: https://developmentseed.org/titiler-stacapi-mspc/
1111

1212
extra:
1313
social:
@@ -17,13 +17,10 @@ extra:
1717
nav:
1818
- Home: index.md
1919
- Endpoints:
20-
- endpoints/index.md
21-
- OGC WMTS: endpoints/ogc_wmts_endpoints.md
22-
- Collections: endpoints/collections_endpoints.md
23-
- Items: endpoints/items_endpoints.md
24-
- TileMatrixSet: endpoints/tms_endpoints.md
25-
- Customization:
26-
- Authentication: custom/application_with_auth.md
20+
- endpoints/index.md
21+
- Collections: endpoints/collections_endpoints.md
22+
- Items: endpoints/items_endpoints.md
23+
- TileMatrixSet: endpoints/tms_endpoints.md
2724
- Technical Considerations: technical-considerations.md
2825
- Development - Contributing: contributing.md
2926
- Release notes: release-notes.md
@@ -37,7 +34,6 @@ theme:
3734
features:
3835
- navigation.indexes
3936

40-
4137
# https://github.com/kylebarron/cogeo-mosaic/blob/mkdocs/mkdocs.yml#L50-L75
4238
markdown_extensions:
4339
- admonition

docs/src/custom/application_with_auth.md

Lines changed: 0 additions & 88 deletions
This file was deleted.

docs/src/endpoints/collections_endpoints.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
| ------ | ---------------------------------------------------------------------------------|-----------------------------------------|--------------
77
| `GET` | `/collections/{collection_id}/tiles/{TileMatrixSetId}/{z}/{x}/{y}[@{scale}x][.{format}]` | image/bin | Create a web map tile image for a collection and a tile index
88
| `GET` | `/collections/{collection_id}/{TileMatrixSetId}/tilejson.json` | JSON ([TileJSON][tilejson_model]) | Return a Mapbox TileJSON document
9-
| `GET` | `/collections/{collection_id}/{TileMatrixSetId}/WMTSCapabilities.xml` | XML | return OGC WMTS Get Capabilities
109
| `GET` | `/collections/{collection_id}/{TileMatrixSetId}/map` | HTML | simple map viewer
1110

1211
### Tiles
@@ -106,29 +105,4 @@ Example:
106105
- `https://myendpoint/collections/my-collection/WebMercatorQuad/tilejson.json?assets=B01&tile_format=png`
107106
- `https://myendpoint/collections/my-collection/WorldCRS84Quad/tilejson.json?assets=B01&tile_scale=2`
108107

109-
110-
### WMTS
111-
112-
`:endpoint:/collections/{collection_id}/{TileMatrixSetId}/WMTSCapabilities.xml`
113-
114-
- PathParams:
115-
- **collection_id**: STAC Collection Identifier.
116-
- **TileMatrixSetId**: TileMatrixSet name (e.g `WebMercatorQuad`).
117-
118-
- QueryParams:
119-
- **tile_format**: Output image format, default is set to PNG.
120-
- **tile_scale**: Tile size scale, default is set to 1 (256x256). OPTIONAL
121-
- **minzoom**: Overwrite default minzoom. OPTIONAL
122-
- **maxzoom**: Overwrite default maxzoom. OPTIONAL
123-
124-
!!! important
125-
additional query-parameters will be forwarded to the `tile` URL. If no `defaults` mosaic metadata, **assets** OR **expression** will be required
126-
127-
Example:
128-
129-
- `https://myendpoint/collections/my-collection/WebMercatorQuad/WMTSCapabilities.xml?assets=B01`
130-
- `https://myendpoint/collections/my-collection/WebMercatorQuad/WMTSCapabilities.xml?assets=B01&tile_format=png`
131-
- `https://myendpoint/collections/my-collection/WorldCRS84Quad/WMTSCapabilities.xml?assets=B01&tile_scale=2`
132-
133-
134108
[tilejson_model]: https://github.com/developmentseed/titiler/blob/2335048a407f17127099cbbc6c14e1328852d619/src/titiler/core/titiler/core/models/mapbox.py#L16-L38

docs/src/endpoints/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
2-
32
title: Endpoints
4-
53
---
64

75
<p align="center">
8-
<img alt="titiler-pgstac OpenAPI documentation" src="https://github.com/developmentseed/titiler-stacapi/assets/10407788/a4a7619f-8929-41d8-9a0e-26419013b5a8"/>
6+
<img alt="titiler-stacapi OpenAPI documentation" src="https://github.com/developmentseed/titiler-stacapi/assets/10407788/a4a7619f-8929-41d8-9a0e-26419013b5a8"/>
97
</p>
108

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

0 commit comments

Comments
 (0)