Skip to content

Commit dd935d7

Browse files
committed
add /layers prefix for OGC GetTile
1 parent 6791a52 commit dd935d7

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

docs/src/endpoints/ogc_wmts_endpoints.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
### OGC WMTS endpoints
33

44

5-
| Method | URL | Output | Description
6-
| ------ | ------------------------------------------------------------------------------------|------------------------------|--------------
7-
| `GET` | `/wmts` | XML or image/bin or GeoJSON | OGC Web map tile service (KVP encoding)
8-
| `GET` | `/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}` | image/bin | return a web map tile image
5+
| Method | URL | Output | Description
6+
| ------ | -------------------------------------------------------------------------------------------|------------------------------|--------------
7+
| `GET` | `/wmts` | XML or image/bin or GeoJSON | OGC Web map tile service (KVP encoding)
8+
| `GET` | `/layers/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}` | image/bin | OGC GetTile (REST encoding)
99

1010
### WMTS (GetCapabilities / GetTile / GetFeatureInfo) - KVP Encoding
1111

@@ -45,7 +45,7 @@ Example:
4545

4646
### GetTile - REST
4747

48-
`:endpoint:/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}`
48+
`:endpoint:/layers/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}`
4949

5050
- PathParams:
5151
- **Layer** (str): Layer identifier

titiler/stacapi/factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def web_map_tile_service( # noqa: C901
12361236
)
12371237

12381238
@self.router.get(
1239-
"/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}",
1239+
"/layers/{LAYER}/{STYLE}/{TIME}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{FORMAT}",
12401240
**img_endpoint_params,
12411241
)
12421242
def WMTS_getTile(
@@ -1311,7 +1311,7 @@ def WMTS_getTile(
13111311
reader_params=Depends(self.reader_dependency),
13121312
env=Depends(self.environment_dependency),
13131313
):
1314-
"""Create map tile."""
1314+
"""OGC WMTS GetTile (REST encoding)"""
13151315
search_query = {"collections": [collectionId], "datetime": timeId}
13161316

13171317
tms = self.supported_tms.get(tileMatrixSetId)

titiler/stacapi/models.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Link(BaseModel):
2727
str,
2828
Field(
2929
description="Supplies the URI to a remote resource (or resource fragment).",
30-
example="http://data.example.com/buildings/123",
30+
json_schema_extra={"example": "http://data.example.com/buildings/123"},
3131
),
3232
]
3333
rel: Annotated[
@@ -40,7 +40,9 @@ class Link(BaseModel):
4040
Optional[MediaType],
4141
Field(
4242
description="A hint indicating what the media type of the result of dereferencing the link should be.",
43-
example="application/geo+json",
43+
json_schema_extra={
44+
"example": "application/geo+json",
45+
},
4446
),
4547
] = None
4648
templated: Annotated[
@@ -51,21 +53,27 @@ class Link(BaseModel):
5153
Optional[str],
5254
Field(
5355
description="A base path to retrieve semantic information about the variables used in URL template.",
54-
example="/ogcapi/vars/",
56+
json_schema_extra={
57+
"example": "/ogcapi/vars/",
58+
},
5559
),
5660
] = None
5761
hreflang: Annotated[
5862
Optional[str],
5963
Field(
6064
description="A hint indicating what the language of the result of dereferencing the link should be.",
61-
example="en",
65+
json_schema_extra={
66+
"example": "en",
67+
},
6268
),
6369
] = None
6470
title: Annotated[
6571
Optional[str],
6672
Field(
6773
description="Used to label the destination of a link such that it can be used as a human-readable identifier.",
68-
example="Trierer Strasse 70, 53115 Bonn",
74+
json_schema_extra={
75+
"example": "Trierer Strasse 70, 53115 Bonn",
76+
},
6977
),
7078
] = None
7179
length: Optional[int] = None

0 commit comments

Comments
 (0)