@@ -21,9 +21,9 @@ The `/cog` routes are based on `titiler.core.factory.TilerFactory` but with `cog
21
21
| ` GET ` | ` /cog/{tileMatrixSetId}/tilejson.json ` | JSON | return a Mapbox TileJSON document
22
22
| ` GET ` | ` /cog/{tileMatrixSetId}/WMTSCapabilities.xml ` | XML | return OGC WMTS Get Capabilities
23
23
| ` 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
25
24
| ` 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
27
27
| ` GET ` | ` /cog/validate ` | JSON | validate a COG and return dataset info (from ` titiler.extensions.cogValidateExtension ` )
28
28
| ` GET ` | ` /cog/viewer ` | HTML | demo webpage (from ` titiler.extensions.cogViewerExtension ` )
29
29
| ` GET ` | ` /cog/stac ` | GeoJSON | create STAC Items from a dataset (from ` titiler.extensions.stacExtension ` )
@@ -69,18 +69,23 @@ Example:
69
69
70
70
### Preview
71
71
72
- ` :endpoint:/cog/preview[.{format}] `
72
+ ` :endpoint:/cog/preview `
73
+
74
+ ` :endpoint:/cog/preview.{format} `
75
+
76
+ ` :endpoint:/cog/preview/{width}x{height}.{format} `
73
77
74
78
- 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**
76
82
77
83
- QueryParams:
78
84
- ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
79
85
- ** bidx** (array[ int] ): Dataset band indexes (e.g ` bidx=1 ` , ` bidx=1&bidx=2&bidx=3 ` ).
80
86
- ** expression** (str): rio-tiler's band math expression (e.g ` expression=b1/b2 ` ).
81
87
- ** max_size** (int): Max image size, default is 1024.
82
- - ** height** (int): Force output image height.
83
- - ** width** (int): Force output image width.
88
+
84
89
- ** nodata** (str, int, float): Overwrite internal Nodata value.
85
90
- ** unscale** (bool): Apply dataset internal Scale/Offset.
86
91
- ** resampling** (str): RasterIO resampling algorithm. Defaults to ` nearest ` .
@@ -94,25 +99,26 @@ Example:
94
99
- ** algorithm_params** (str): JSON encoded algorithm parameters.
95
100
96
101
!!! 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.
98
103
99
104
Example:
100
105
101
106
- ` https://myendpoint/cog/preview?url=https://somewhere.com/mycog.tif `
102
107
- ` 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 `
103
109
- ` https://myendpoint/cog/preview?url=https://somewhere.com/mycog.tif&bidx=1&rescale=0,1000&colormap_name=cfastie `
104
110
105
- ### BBOX/Feature
111
+ ### Bbox
106
112
107
113
` :endpoint:/cog/bbox/{minx},{miny},{maxx},{maxy}.{format} `
108
114
109
115
` :endpoint:/cog/bbox/{minx},{miny},{maxx},{maxy}/{width}x{height}.{format} `
110
116
111
117
- PathParams:
112
118
- ** 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 **
116
122
117
123
- QueryParams:
118
124
- ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
@@ -134,23 +140,28 @@ Example:
134
140
- ** algorithm_params** (str): JSON encoded algorithm parameters.
135
141
136
142
!!! 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.
138
144
139
145
Example:
140
146
141
- - ` https://myendpoint/cog/bbox/0,0,10,10.png?url=https://somewhere.com/mycog.tif `
142
147
- ` 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 `
143
149
150
+ ### Feature
144
151
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] `
146
157
147
158
- Body:
148
159
- ** feature** (JSON): A valid GeoJSON feature (Polygon or MultiPolygon)
149
160
150
161
- 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 **
154
165
155
166
- QueryParams:
156
167
- ** url** (str): Cloud Optimized GeoTIFF URL. ** Required**
@@ -172,16 +183,14 @@ Example:
172
183
- ** algorithm_params** (str): JSON encoded algorithm parameters.
173
184
174
185
!!! 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.
176
187
177
188
Example:
178
189
179
190
- ` https://myendpoint/cog/feature?url=https://somewhere.com/mycog.tif `
180
191
- ` https://myendpoint/cog/feature.png?url=https://somewhere.com/mycog.tif `
181
192
- ` https://myendpoint/cog/feature/100x100.png?url=https://somewhere.com/mycog.tif&bidx=1&rescale=0,1000&colormap_name=cfastie `
182
193
183
- Note: if ` height ` and ` width ` are provided ` max_size ` will be ignored.
184
-
185
194
### Point
186
195
187
196
` :endpoint:/cog/point/{lon},{lat} `
0 commit comments