@@ -21,9 +21,9 @@ The `/cog` routes are based on `titiler.core.factory.TilerFactory` but with `cog
2121| ` GET ` | ` /cog/{tileMatrixSetId}/tilejson.json ` | JSON | return a Mapbox TileJSON document
2222| ` GET ` | ` /cog/{tileMatrixSetId}/WMTSCapabilities.xml ` | XML | return OGC WMTS Get Capabilities
2323| ` GET ` | ` /cog/point/{lon},{lat} ` | JSON | return pixel values from a dataset
24- | ` GET ` | ` /cog/preview[.{format}] ` | image/bin | create a preview image from a dataset
2524| ` GET ` | ` /cog/bbox/{minx},{miny},{maxx},{maxy}[/{width}x{height}].{format} ` | image/bin | create an image from part of a dataset
26- | ` POST ` | ` /cog/feature[/{width}x{height}][].{format}] ` | image/bin | create an image from a GeoJSON feature
25+ | ` POST ` | ` /cog/feature[/{width}x{height}][.{format}] ` | image/bin | create an image from a GeoJSON feature
26+ | ` GET ` | ` /cog/preview[/{width}x{height}][.{format}] ` | image/bin | create a preview image from a dataset
2727| ` GET ` | ` /cog/validate ` | JSON | validate a COG and return dataset info (from ` titiler.extensions.cogValidateExtension ` )
2828| ` GET ` | ` /cog/viewer ` | HTML | demo webpage (from ` titiler.extensions.cogViewerExtension ` )
2929| ` GET ` | ` /cog/stac ` | GeoJSON | create STAC Items from a dataset (from ` titiler.extensions.stacExtension ` )
@@ -69,18 +69,23 @@ Example:
6969
7070### Preview
7171
72- ` :endpoint:/cog/preview[.{format}] `
72+ ` :endpoint:/cog/preview `
73+
74+ ` :endpoint:/cog/preview.{format} `
75+
76+ ` :endpoint:/cog/preview/{width}x{height}.{format} `
7377
7478- PathParams:
75- - ** format** (str): Output [ image format] ( ../user_guide/output_format.md ) , default is set to None and will be either JPEG or PNG depending on masked value. ** Optional**
79+ - ** format** (str, optional): Output [ image format] ( ../user_guide/output_format.md ) , default is set to None and will be either JPEG or PNG depending on masked value. ** Also a QueryParam**
80+ - ** height** (int, optional): Force output image height. ** Also a QueryParam**
81+ - ** width** (int, optional): Force output image width. ** Also a QueryParam**
7682
7783- QueryParams:
7884 - ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
7985 - ** bidx** (array[ int] ): Dataset band indexes (e.g ` bidx=1 ` , ` bidx=1&bidx=2&bidx=3 ` ).
8086 - ** expression** (str): rio-tiler's band math expression (e.g ` expression=b1/b2 ` ).
8187 - ** max_size** (int): Max image size, default is 1024.
82- - ** height** (int): Force output image height.
83- - ** width** (int): Force output image width.
88+
8489 - ** nodata** (str, int, float): Overwrite internal Nodata value.
8590 - ** unscale** (bool): Apply dataset internal Scale/Offset.
8691 - ** resampling** (str): RasterIO resampling algorithm. Defaults to ` nearest ` .
@@ -94,25 +99,26 @@ Example:
9499 - ** algorithm_params** (str): JSON encoded algorithm parameters.
95100
96101!!! important
97- if ** height** and ** width** are provided ** max_size** will be ignored.
102+ if ** height** or ** width** is provided ** max_size** will be ignored.
98103
99104Example:
100105
101106- ` https://myendpoint/cog/preview?url=https://somewhere.com/mycog.tif `
102107- ` https://myendpoint/cog/preview.jpg?url=https://somewhere.com/mycog.tif&bidx=3&bidx=1&bidx2 `
108+ - ` https://myendpoint/cog/preview/100x100.jpg?url=https://somewhere.com/mycog.tif&bidx=3&bidx=1&bidx2 `
103109- ` https://myendpoint/cog/preview?url=https://somewhere.com/mycog.tif&bidx=1&rescale=0,1000&colormap_name=cfastie `
104110
105- ### BBOX/Feature
111+ ### Bbox
106112
107113` :endpoint:/cog/bbox/{minx},{miny},{maxx},{maxy}.{format} `
108114
109115` :endpoint:/cog/bbox/{minx},{miny},{maxx},{maxy}/{width}x{height}.{format} `
110116
111117- PathParams:
112118 - ** minx,miny,maxx,maxy** (str): Comma (',') delimited bounding box in WGS84.
113- - ** format** (str): Output [ image format] ( ../user_guide/output_format.md ) .
114- - ** height** (int): Force output image height.
115- - ** width** (int): Force output image width.
119+ - ** format** (str): Output [ image format] ( ../user_guide/output_format.md )
120+ - ** height** (int, optional ): Force output image height. ** Also a QueryParam **
121+ - ** width** (int, optional ): Force output image width. ** Also a QueryParam **
116122
117123- QueryParams:
118124 - ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
@@ -134,23 +140,28 @@ Example:
134140 - ** algorithm_params** (str): JSON encoded algorithm parameters.
135141
136142!!! important
137- if ** height** and ** width** are provided ** max_size** will be ignored.
143+ if ** height** or ** width** is provided ** max_size** will be ignored.
138144
139145Example:
140146
141- - ` https://myendpoint/cog/bbox/0,0,10,10.png?url=https://somewhere.com/mycog.tif `
142147- ` https://myendpoint/cog/bbox/0,0,10,10.png?url=https://somewhere.com/mycog.tif&bidx=1&rescale=0,1000&colormap_name=cfastie `
148+ - ` https://myendpoint/cog/bbox/0,0,10,10/100x100.png?url=https://somewhere.com/mycog.tif `
143149
150+ ### Feature
144151
145- ` :endpoint:/cog/feature[/{width}x{height}][].{format}] - [POST] `
152+ ` :endpoint:/cog/feature - [POST] `
153+
154+ ` :endpoint:/cog/feature.{format} - [POST] `
155+
156+ ` :endpoint:/cog/feature/{width}x{height}.{format} - [POST] `
146157
147158- Body:
148159 - ** feature** (JSON): A valid GeoJSON feature (Polygon or MultiPolygon)
149160
150161- PathParams:
151- - ** height** (int): Force output image height. ** Optional **
152- - ** width** (int): Force output image width. ** Optional **
153- - ** format** (str): Output [ image format] ( ../user_guide/output_format.md ) , default is set to None and will be either JPEG or PNG depending on masked value. ** Optional **
162+ - ** height** (int, optional ): Force output image height. ** Also a QueryParam **
163+ - ** width** (int, optional ): Force output image width. ** Also a QueryParam **
164+ - ** format** (str, optional ): Output [ image format] ( ../user_guide/output_format.md ) , default is set to None and will be either JPEG or PNG depending on masked value. ** Also a QueryParam **
154165
155166- QueryParams:
156167 - ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
@@ -172,16 +183,14 @@ Example:
172183 - ** algorithm_params** (str): JSON encoded algorithm parameters.
173184
174185!!! important
175- if ** height** and ** width** are provided ** max_size** will be ignored.
186+ if ** height** or ** width** is provided ** max_size** will be ignored.
176187
177188Example:
178189
179190- ` https://myendpoint/cog/feature?url=https://somewhere.com/mycog.tif `
180191- ` https://myendpoint/cog/feature.png?url=https://somewhere.com/mycog.tif `
181192- ` https://myendpoint/cog/feature/100x100.png?url=https://somewhere.com/mycog.tif&bidx=1&rescale=0,1000&colormap_name=cfastie `
182193
183- Note: if ` height ` and ` width ` are provided ` max_size ` will be ignored.
184-
185194### Point
186195
187196` :endpoint:/cog/point/{lon},{lat} `
0 commit comments