> For the complete documentation index, see [llms.txt](https://raic-labs.gitbook.io/raic-fed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raic-labs.gitbook.io/raic-fed/api-reference/04c-titiler-api/stac-search.md).

# STAC Search

## Retrieve a list of available raster tilesets for the specified dataset.

> Retrieve a list of available raster tilesets for the specified dataset.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles":{"get":{"tags":["STAC Search"],"summary":"Retrieve a list of available raster tilesets for the specified dataset.","description":"Retrieve a list of available raster tilesets for the specified dataset.","operationId":".searches.{search_id}.getTileSetList","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System.","title":"Crs"},"description":"Coordinate Reference System."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileSetList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TileSetList":{"properties":{"tilesets":{"items":{"$ref":"#/components/schemas/TileSet"},"type":"array","title":"Tilesets"}},"type":"object","required":["tilesets"],"title":"TileSetList","description":"TileSetList model.\n\nBased on https://docs.ogc.org/is/20-057/20-057.html#toc34"},"TileSet":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"A title for this tileset"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this tile set"},"dataType":{"type":"string","enum":["map","vector","coverage"],"title":"Datatype","description":"Type of data represented in the tileset"},"crs":{"$ref":"#/components/schemas/CRS"},"tileMatrixSetURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Tilematrixseturi","description":"Reference to a Tile Matrix Set on an official source for Tile Matrix Sets"},"links":{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","title":"Links","description":"Links to related resources"},"tileMatrixSetLimits":{"anyOf":[{"items":{"$ref":"#/components/schemas/TileMatrixLimits"},"type":"array"},{"type":"null"}],"title":"Tilematrixsetlimits","description":"Limits for the TileRow and TileCol values for each TileMatrix in the tileMatrixSet. If missing, there are no limits other that the ones imposed by the TileMatrixSet. If present the TileMatrices listed are limited and the rest not available at all"},"epoch":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Epoch","description":"Epoch of the Coordinate Reference System (CRS)"},"layers":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeospatialData"},"type":"array","minItems":1},{"type":"null"}],"title":"Layers"},"boundingBox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"centerPoint":{"anyOf":[{"$ref":"#/components/schemas/TilePoint"},{"type":"null"}]},"style":{"anyOf":[{"$ref":"#/components/schemas/Style"},{"type":"null"}]},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Short reference to recognize the author or provider"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License","description":"License applicable to the tiles"},"accessConstraints":{"anyOf":[{"type":"string","enum":["unclassified","restricted","confidential","secret","topSecret"]},{"type":"null"}],"title":"Accessconstraints","description":"Restrictions on the availability of the Tile Set that the user needs to be aware of before using or redistributing the Tile Set","default":"unclassified"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords","description":"keywords about this tileset"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Version of the Tile Set. Changes if the data behind the tiles has been changed"},"created":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"updated":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"pointOfContact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointofcontact","description":"Useful information to contact the authors or custodians for the Tile Set"},"mediaTypes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mediatypes","description":"Media types available for the tiles"}},"type":"object","required":["dataType","crs","links"],"title":"TileSet","description":"TileSet model.\n\nBased on https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tileSet.yaml"},"CRS":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/CRSUri"},{"$ref":"#/components/schemas/CRSWKT"},{"$ref":"#/components/schemas/CRSRef"}],"title":"CRS","description":"CRS model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-geodata/crs.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"CRSUri":{"properties":{"uri":{"type":"string","minLength":1,"format":"uri","title":"Uri","description":"Reference to one coordinate reference system (CRS) as URI","exemples":["http://www.opengis.net/def/crs/EPSG/0/3978","urn:ogc:def:crs:EPSG::2193"]}},"type":"object","required":["uri"],"title":"CRSUri","description":"Coordinate Reference System (CRS) from URI."},"CRSWKT":{"properties":{"wkt":{"additionalProperties":true,"type":"object","title":"Wkt","description":"An object defining the CRS using the JSON encoding for Well-known text representation of coordinate reference systems 2.0"}},"type":"object","required":["wkt"],"title":"CRSWKT","description":"Coordinate Reference System (CRS) from WKT encoded as PROJJSON Object."},"CRSRef":{"properties":{"referenceSystem":{"additionalProperties":true,"type":"object","title":"Referencesystem","description":"A reference system data structure as defined in the MD_ReferenceSystem of the ISO 19115"}},"type":"object","required":["referenceSystem"],"title":"CRSRef","description":"CRS from referenceSystem."},"titiler__core__models__OGC__Link":{"properties":{"href":{"type":"string","title":"Href","description":"Supplies the URI to a remote resource (or resource fragment)."},"rel":{"type":"string","title":"Rel","description":"The type or semantics of the relation."},"type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}],"description":"A hint indicating what the media type of the result of dereferencing the link should be."},"templated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Templated","description":"This flag set to true if the link is a URL template."},"varBase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varbase","description":"A base path to retrieve semantic information about the variables used in URL template."},"hreflang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hreflang","description":"A hint indicating what the language of the result of dereferencing the link should be."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Used to label the destination of a link such that it can be used as a human-readable identifier."},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"}},"type":"object","required":["href","rel"],"title":"Link","description":"Link model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-core/link.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"MediaType":{"type":"string","enum":["image/tiff; application=geotiff","image/jp2","image/png","image/png","image/jpeg","image/jpg","image/webp","application/x-binary","application/xml","application/json","application/geo+json","text/html","text/plain","application/x-protobuf","application/vnd.mapbox-vector-tile","application/ndjson","application/geo+json-seq","application/schema+json","text/csv","application/vnd.oai.openapi+json;version=3.0","application/vnd.oai.openapi;version=3.0","image/gif"],"title":"MediaType","description":"Responses Media types formerly known as MIME types."},"TileMatrixLimits":{"properties":{"tileMatrix":{"type":"string","title":"Tilematrix"},"minTileRow":{"type":"integer","minimum":0,"title":"Mintilerow"},"maxTileRow":{"type":"integer","minimum":0,"title":"Maxtilerow"},"minTileCol":{"type":"integer","minimum":0,"title":"Mintilecol"},"maxTileCol":{"type":"integer","minimum":0,"title":"Maxtilecol"}},"type":"object","required":["tileMatrix","minTileRow","maxTileRow","minTileCol","maxTileCol"],"title":"TileMatrixLimits","description":"The limits for an individual tile matrix of a TileSet's TileMatrixSet, as defined in the OGC 2D TileMatrixSet and TileSet Metadata Standard\n\nBased on https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tileMatrixLimits.yaml"},"GeospatialData":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of this tile matrix set, normally used for display to a human"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this tile matrix set, normally available for display to a human"},"keywords":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keywords","description":"Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this layer"},"id":{"type":"string","title":"Id","description":"Unique identifier of the Layer. Implementation of 'identifier'"},"dataType":{"type":"string","enum":["map","vector","coverage"],"title":"Datatype","description":"Type of data represented in the tileset"},"geometryDimension":{"anyOf":[{"type":"integer","maximum":3,"minimum":0},{"type":"null"}],"title":"Geometrydimension","description":"The geometry dimension of the features shown in this layer (0: points, 1: curves, 2: surfaces, 3: solids), unspecified: mixed or unknown"},"featureType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Featuretype","description":"Feature type identifier. Only applicable to layers of datatype 'geometries'"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Short reference to recognize the author or provider"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License","description":"License applicable to the tiles"},"pointOfContact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointofcontact","description":"Useful information to contact the authors or custodians for the layer (e.g. e-mail address, a physical address,  phone numbers, etc)"},"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher","description":"Organization or individual responsible for making the layer available"},"theme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme","description":"Category where the layer can be grouped"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"epoch":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Epoch","description":"Epoch of the Coordinate Reference System (CRS)"},"minScaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minscaledenominator","description":"Minimum scale denominator for usage of the layer"},"maxScaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxscaledenominator","description":"Maximum scale denominator for usage of the layer"},"minCellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mincellsize","description":"Minimum cell size for usage of the layer"},"maxCellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxcellsize","description":"Maximum cell size for usage of the layer"},"maxTileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maxtilematrix","description":"TileMatrix identifier associated with the minScaleDenominator"},"minTileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mintilematrix","description":"TileMatrix identifier associated with the maxScaleDenominator"},"boundingBox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"created":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"updated":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"style":{"anyOf":[{"$ref":"#/components/schemas/Style"},{"type":"null"}]},"geoDataClasses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Geodataclasses","description":"URI identifying a class of data contained in this layer (useful to determine compatibility with styles or processes)"},"propertiesSchema":{"anyOf":[{"$ref":"#/components/schemas/PropertiesSchema"},{"type":"null"}]},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","minItems":1},{"type":"null"}],"title":"Links","description":"Links related to this layer. Possible link 'rel' values are: 'geodata' for a URL pointing to the collection of geospatial data."}},"type":"object","required":["id","dataType"],"title":"GeospatialData","description":"Geospatial model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/geospatialData.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"BoundingBox":{"properties":{"lowerLeft":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Lowerleft","description":"A 2D Point in the CRS indicated elsewhere"},"upperRight":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Upperright","description":"A 2D Point in the CRS indicated elsewhere"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"orderedAxes":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Orderedaxes"}},"type":"object","required":["lowerLeft","upperRight"],"title":"BoundingBox","description":"BoundingBox model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/2DBoundingBox.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"TimeStamp":{"type":"string","format":"date-time","title":"TimeStamp","description":"This property indicates the time and date when the response was generated using RFC 3339 notation."},"Style":{"properties":{"id":{"type":"string","title":"Id","description":"An identifier for this style. Implementation of 'identifier'"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"A title for this style"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this style"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords","description":"keywords about this style"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","minItems":1},{"type":"null"}],"title":"Links","description":"Links to style related resources. Possible link 'rel' values are: 'style' for a URL pointing to the style description, 'styleSpec' for a URL pointing to the specification or standard used to define the style."}},"type":"object","required":["id"],"title":"Style","description":"Style model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/style.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"PropertiesSchema":{"properties":{"type":{"type":"string","const":"object","title":"Type"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Required","description":"Implements 'multiplicity' by citing property 'name' defined as 'additionalProperties'"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/Properties"},"type":"object","title":"Properties"}},"type":"object","required":["type","properties"],"title":"PropertiesSchema","description":"PropertiesSchema model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/propertiesSchema.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"Properties":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Implements 'description'"},"type":{"anyOf":[{"type":"string","enum":["array","boolean","integer","null","number","object","string"]},{"type":"null"}],"title":"Type"},"enum":{"anyOf":[{"items":{},"type":"array","minItems":1,"uniqueItems":true},{"type":"null"}],"title":"Enum","description":"Implements 'acceptedValues'"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Complements implementation of 'type'"},"contentMediaType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contentmediatype","description":"Implements 'mediaType'"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum","description":"Implements 'range'"},"exclusiveMaximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusivemaximum","description":"Implements 'range'"},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum","description":"Implements 'range'"},"exclusiveMinimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusiveminimum","description":"Implements 'range'"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"maxItems":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Maxitems","description":"Implements 'upperMultiplicity'"},"minItems":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Minitems","description":"Implements 'lowerMultiplicity'","default":0},"observedProperty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observedproperty"},"observedPropertyURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Observedpropertyuri"},"uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uom"},"uomURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Uomuri"}},"type":"object","title":"Properties","description":"Properties model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/propertiesSchema.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"TilePoint":{"properties":{"coordinates":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Coordinates"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"tileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilematrix","description":"TileMatrix identifier associated with the scaleDenominator"},"scaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaledenominator","description":"Scale denominator of the tile matrix selected"},"cellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cellsize","description":"Cell size of the tile matrix selected"}},"type":"object","required":["coordinates","crs"],"title":"TilePoint","description":"TilePoint model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tilePoint.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Retrieve the raster tileset metadata for the specified dataset and tiling scheme (tile matrix set).

> Retrieve the raster tileset metadata for the specified dataset and tiling scheme (tile matrix set).

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}":{"get":{"tags":["STAC Search"],"summary":"Retrieve the raster tileset metadata for the specified dataset and tiling scheme (tile matrix set).","description":"Retrieve the raster tileset metadata for the specified dataset and tiling scheme (tile matrix set).","operationId":".searches.{search_id}.getTileSet","parameters":[{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileSet"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TileSet":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"A title for this tileset"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this tile set"},"dataType":{"type":"string","enum":["map","vector","coverage"],"title":"Datatype","description":"Type of data represented in the tileset"},"crs":{"$ref":"#/components/schemas/CRS"},"tileMatrixSetURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Tilematrixseturi","description":"Reference to a Tile Matrix Set on an official source for Tile Matrix Sets"},"links":{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","title":"Links","description":"Links to related resources"},"tileMatrixSetLimits":{"anyOf":[{"items":{"$ref":"#/components/schemas/TileMatrixLimits"},"type":"array"},{"type":"null"}],"title":"Tilematrixsetlimits","description":"Limits for the TileRow and TileCol values for each TileMatrix in the tileMatrixSet. If missing, there are no limits other that the ones imposed by the TileMatrixSet. If present the TileMatrices listed are limited and the rest not available at all"},"epoch":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Epoch","description":"Epoch of the Coordinate Reference System (CRS)"},"layers":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeospatialData"},"type":"array","minItems":1},{"type":"null"}],"title":"Layers"},"boundingBox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"centerPoint":{"anyOf":[{"$ref":"#/components/schemas/TilePoint"},{"type":"null"}]},"style":{"anyOf":[{"$ref":"#/components/schemas/Style"},{"type":"null"}]},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Short reference to recognize the author or provider"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License","description":"License applicable to the tiles"},"accessConstraints":{"anyOf":[{"type":"string","enum":["unclassified","restricted","confidential","secret","topSecret"]},{"type":"null"}],"title":"Accessconstraints","description":"Restrictions on the availability of the Tile Set that the user needs to be aware of before using or redistributing the Tile Set","default":"unclassified"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords","description":"keywords about this tileset"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Version of the Tile Set. Changes if the data behind the tiles has been changed"},"created":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"updated":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"pointOfContact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointofcontact","description":"Useful information to contact the authors or custodians for the Tile Set"},"mediaTypes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mediatypes","description":"Media types available for the tiles"}},"type":"object","required":["dataType","crs","links"],"title":"TileSet","description":"TileSet model.\n\nBased on https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tileSet.yaml"},"CRS":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/CRSUri"},{"$ref":"#/components/schemas/CRSWKT"},{"$ref":"#/components/schemas/CRSRef"}],"title":"CRS","description":"CRS model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-geodata/crs.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"CRSUri":{"properties":{"uri":{"type":"string","minLength":1,"format":"uri","title":"Uri","description":"Reference to one coordinate reference system (CRS) as URI","exemples":["http://www.opengis.net/def/crs/EPSG/0/3978","urn:ogc:def:crs:EPSG::2193"]}},"type":"object","required":["uri"],"title":"CRSUri","description":"Coordinate Reference System (CRS) from URI."},"CRSWKT":{"properties":{"wkt":{"additionalProperties":true,"type":"object","title":"Wkt","description":"An object defining the CRS using the JSON encoding for Well-known text representation of coordinate reference systems 2.0"}},"type":"object","required":["wkt"],"title":"CRSWKT","description":"Coordinate Reference System (CRS) from WKT encoded as PROJJSON Object."},"CRSRef":{"properties":{"referenceSystem":{"additionalProperties":true,"type":"object","title":"Referencesystem","description":"A reference system data structure as defined in the MD_ReferenceSystem of the ISO 19115"}},"type":"object","required":["referenceSystem"],"title":"CRSRef","description":"CRS from referenceSystem."},"titiler__core__models__OGC__Link":{"properties":{"href":{"type":"string","title":"Href","description":"Supplies the URI to a remote resource (or resource fragment)."},"rel":{"type":"string","title":"Rel","description":"The type or semantics of the relation."},"type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}],"description":"A hint indicating what the media type of the result of dereferencing the link should be."},"templated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Templated","description":"This flag set to true if the link is a URL template."},"varBase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varbase","description":"A base path to retrieve semantic information about the variables used in URL template."},"hreflang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hreflang","description":"A hint indicating what the language of the result of dereferencing the link should be."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Used to label the destination of a link such that it can be used as a human-readable identifier."},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"}},"type":"object","required":["href","rel"],"title":"Link","description":"Link model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-core/link.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"MediaType":{"type":"string","enum":["image/tiff; application=geotiff","image/jp2","image/png","image/png","image/jpeg","image/jpg","image/webp","application/x-binary","application/xml","application/json","application/geo+json","text/html","text/plain","application/x-protobuf","application/vnd.mapbox-vector-tile","application/ndjson","application/geo+json-seq","application/schema+json","text/csv","application/vnd.oai.openapi+json;version=3.0","application/vnd.oai.openapi;version=3.0","image/gif"],"title":"MediaType","description":"Responses Media types formerly known as MIME types."},"TileMatrixLimits":{"properties":{"tileMatrix":{"type":"string","title":"Tilematrix"},"minTileRow":{"type":"integer","minimum":0,"title":"Mintilerow"},"maxTileRow":{"type":"integer","minimum":0,"title":"Maxtilerow"},"minTileCol":{"type":"integer","minimum":0,"title":"Mintilecol"},"maxTileCol":{"type":"integer","minimum":0,"title":"Maxtilecol"}},"type":"object","required":["tileMatrix","minTileRow","maxTileRow","minTileCol","maxTileCol"],"title":"TileMatrixLimits","description":"The limits for an individual tile matrix of a TileSet's TileMatrixSet, as defined in the OGC 2D TileMatrixSet and TileSet Metadata Standard\n\nBased on https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tileMatrixLimits.yaml"},"GeospatialData":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of this tile matrix set, normally used for display to a human"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this tile matrix set, normally available for display to a human"},"keywords":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keywords","description":"Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this layer"},"id":{"type":"string","title":"Id","description":"Unique identifier of the Layer. Implementation of 'identifier'"},"dataType":{"type":"string","enum":["map","vector","coverage"],"title":"Datatype","description":"Type of data represented in the tileset"},"geometryDimension":{"anyOf":[{"type":"integer","maximum":3,"minimum":0},{"type":"null"}],"title":"Geometrydimension","description":"The geometry dimension of the features shown in this layer (0: points, 1: curves, 2: surfaces, 3: solids), unspecified: mixed or unknown"},"featureType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Featuretype","description":"Feature type identifier. Only applicable to layers of datatype 'geometries'"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Short reference to recognize the author or provider"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License","description":"License applicable to the tiles"},"pointOfContact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointofcontact","description":"Useful information to contact the authors or custodians for the layer (e.g. e-mail address, a physical address,  phone numbers, etc)"},"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher","description":"Organization or individual responsible for making the layer available"},"theme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme","description":"Category where the layer can be grouped"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"epoch":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Epoch","description":"Epoch of the Coordinate Reference System (CRS)"},"minScaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minscaledenominator","description":"Minimum scale denominator for usage of the layer"},"maxScaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxscaledenominator","description":"Maximum scale denominator for usage of the layer"},"minCellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mincellsize","description":"Minimum cell size for usage of the layer"},"maxCellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxcellsize","description":"Maximum cell size for usage of the layer"},"maxTileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maxtilematrix","description":"TileMatrix identifier associated with the minScaleDenominator"},"minTileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mintilematrix","description":"TileMatrix identifier associated with the maxScaleDenominator"},"boundingBox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"created":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"updated":{"anyOf":[{"$ref":"#/components/schemas/TimeStamp"},{"type":"null"}]},"style":{"anyOf":[{"$ref":"#/components/schemas/Style"},{"type":"null"}]},"geoDataClasses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Geodataclasses","description":"URI identifying a class of data contained in this layer (useful to determine compatibility with styles or processes)"},"propertiesSchema":{"anyOf":[{"$ref":"#/components/schemas/PropertiesSchema"},{"type":"null"}]},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","minItems":1},{"type":"null"}],"title":"Links","description":"Links related to this layer. Possible link 'rel' values are: 'geodata' for a URL pointing to the collection of geospatial data."}},"type":"object","required":["id","dataType"],"title":"GeospatialData","description":"Geospatial model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/geospatialData.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"BoundingBox":{"properties":{"lowerLeft":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Lowerleft","description":"A 2D Point in the CRS indicated elsewhere"},"upperRight":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Upperright","description":"A 2D Point in the CRS indicated elsewhere"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"orderedAxes":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Orderedaxes"}},"type":"object","required":["lowerLeft","upperRight"],"title":"BoundingBox","description":"BoundingBox model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/2DBoundingBox.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"TimeStamp":{"type":"string","format":"date-time","title":"TimeStamp","description":"This property indicates the time and date when the response was generated using RFC 3339 notation."},"Style":{"properties":{"id":{"type":"string","title":"Id","description":"An identifier for this style. Implementation of 'identifier'"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"A title for this style"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Brief narrative description of this style"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords","description":"keywords about this style"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__core__models__OGC__Link"},"type":"array","minItems":1},{"type":"null"}],"title":"Links","description":"Links to style related resources. Possible link 'rel' values are: 'style' for a URL pointing to the style description, 'styleSpec' for a URL pointing to the specification or standard used to define the style."}},"type":"object","required":["id"],"title":"Style","description":"Style model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/style.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"PropertiesSchema":{"properties":{"type":{"type":"string","const":"object","title":"Type"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Required","description":"Implements 'multiplicity' by citing property 'name' defined as 'additionalProperties'"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/Properties"},"type":"object","title":"Properties"}},"type":"object","required":["type","properties"],"title":"PropertiesSchema","description":"PropertiesSchema model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/propertiesSchema.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"Properties":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Implements 'description'"},"type":{"anyOf":[{"type":"string","enum":["array","boolean","integer","null","number","object","string"]},{"type":"null"}],"title":"Type"},"enum":{"anyOf":[{"items":{},"type":"array","minItems":1,"uniqueItems":true},{"type":"null"}],"title":"Enum","description":"Implements 'acceptedValues'"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Complements implementation of 'type'"},"contentMediaType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contentmediatype","description":"Implements 'mediaType'"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum","description":"Implements 'range'"},"exclusiveMaximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusivemaximum","description":"Implements 'range'"},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum","description":"Implements 'range'"},"exclusiveMinimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusiveminimum","description":"Implements 'range'"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"maxItems":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Maxitems","description":"Implements 'upperMultiplicity'"},"minItems":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Minitems","description":"Implements 'lowerMultiplicity'","default":0},"observedProperty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observedproperty"},"observedPropertyURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Observedpropertyuri"},"uom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uom"},"uomURI":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Uomuri"}},"type":"object","title":"Properties","description":"Properties model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/propertiesSchema.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"TilePoint":{"properties":{"coordinates":{"items":{"type":"number"},"type":"array","maxItems":2,"minItems":2,"title":"Coordinates"},"crs":{"anyOf":[{"$ref":"#/components/schemas/CRS"},{"type":"null"}],"title":"CRS"},"tileMatrix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilematrix","description":"TileMatrix identifier associated with the scaleDenominator"},"scaleDenominator":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaledenominator","description":"Scale denominator of the tile matrix selected"},"cellSize":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cellsize","description":"Cell size of the tile matrix selected"}},"type":"object","required":["coordinates","crs"],"title":"TilePoint","description":"TilePoint model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/tms/tilePoint.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Tile

> Create map tile from a COG.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}/{z}/{x}/{y}@{scale}x.{format}":{"get":{"tags":["STAC Search"],"summary":"Tile","description":"Create map tile from a COG.","operationId":".searches.{search_id}.getTileWithFormatAndScale","parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.","title":"Z"},"description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile."},{"name":"x","in":"path","required":true,"schema":{"type":"integer","description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix.","title":"X"},"description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix."},{"name":"y","in":"path","required":true,"schema":{"type":"integer","description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix.","title":"Y"},"description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix."},{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"scale","in":"path","required":true,"schema":{"type":"integer","maximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","title":"Scale"}},{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Tile

> Create map tile from a COG.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}/{z}/{x}/{y}@{scale}x":{"get":{"tags":["STAC Search"],"summary":"Tile","description":"Create map tile from a COG.","operationId":".searches.{search_id}.getTileWithScale","parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.","title":"Z"},"description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile."},{"name":"x","in":"path","required":true,"schema":{"type":"integer","description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix.","title":"X"},"description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix."},{"name":"y","in":"path","required":true,"schema":{"type":"integer","description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix.","title":"Y"},"description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix."},{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"scale","in":"path","required":true,"schema":{"type":"integer","maximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","title":"Scale"}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Tile

> Create map tile from a COG.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}/{z}/{x}/{y}.{format}":{"get":{"tags":["STAC Search"],"summary":"Tile","description":"Create map tile from a COG.","operationId":".searches.{search_id}.getTileWithFormat","parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.","title":"Z"},"description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile."},{"name":"x","in":"path","required":true,"schema":{"type":"integer","description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix.","title":"X"},"description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix."},{"name":"y","in":"path","required":true,"schema":{"type":"integer","description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix.","title":"Y"},"description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix."},{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scale","in":"query","required":false,"schema":{"type":"integer","maximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","default":1,"title":"Scale"}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Tile

> Create map tile from a COG.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}/{z}/{x}/{y}":{"get":{"tags":["STAC Search"],"summary":"Tile","description":"Create map tile from a COG.","operationId":".searches.{search_id}.getTile","parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.","title":"Z"},"description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile."},{"name":"x","in":"path","required":true,"schema":{"type":"integer","description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix.","title":"X"},"description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix."},{"name":"y","in":"path","required":true,"schema":{"type":"integer","description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix.","title":"Y"},"description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix."},{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scale","in":"query","required":false,"schema":{"type":"integer","maximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","default":1,"title":"Scale"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Map Viewer

> Return TileJSON document for a dataset.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/{tileMatrixSetId}/map.html":{"get":{"tags":["STAC Search"],"summary":"Map Viewer","description":"Return TileJSON document for a dataset.","operationId":".searches.{search_id}.getMapViewer","parameters":[{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"tile_format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ImageType"},{"type":"null"}],"description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg).","title":"Tile Format"},"description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."},{"name":"tile_scale","in":"query","required":false,"schema":{"type":"integer","exclusiveMaximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","default":1,"title":"Tile Scale"},"description":"Tile size scale. 1=256x256, 2=512x512..."},{"name":"minzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default minzoom.","title":"Minzoom"},"description":"Overwrite default minzoom."},{"name":"maxzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default maxzoom.","title":"Maxzoom"},"description":"Overwrite default maxzoom."},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Tilejson

> Return TileJSON document for a search\_id.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/{tileMatrixSetId}/tilejson.json":{"get":{"tags":["STAC Search"],"summary":"Tilejson","description":"Return TileJSON document for a search_id.","operationId":".searches.{search_id}.getTileJSON","parameters":[{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"tile_format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ImageType"},{"type":"null"}],"description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg).","title":"Tile Format"},"description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."},{"name":"tile_scale","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMaximum":4,"exclusiveMinimum":0},{"type":"null"}],"description":"Tile size scale. 1=256x256, 2=512x512...","title":"Tile Scale"},"description":"Tile size scale. 1=256x256, 2=512x512..."},{"name":"minzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default minzoom.","title":"Minzoom"},"description":"Overwrite default minzoom."},{"name":"maxzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default maxzoom.","title":"Maxzoom"},"description":"Overwrite default maxzoom."},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"buffer","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Tile buffer.","description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},"description":"Buffer on each side of the given tile. It must be a multiple of `0.5`. Output **tilesize** will be expanded to `tilesize + 2 * buffer` (e.g 0.5 = 257x257, 1.0 = 258x258)."},{"name":"padding","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Tile padding.","description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},"description":"Padding to apply to each tile edge. Helps reduce resampling artefacts along edges. Defaults to `0`."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return a tilejson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileJSON"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"TileJSON":{"properties":{"tilejson":{"type":"string","title":"Tilejson","default":"2.2.0"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"1.0.0"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"legend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legend"},"scheme":{"type":"string","enum":["xyz","tms"],"title":"Scheme","default":"xyz"},"tiles":{"items":{"type":"string"},"type":"array","title":"Tiles"},"grids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Grids"},"data":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data"},"minzoom":{"type":"integer","maximum":30,"minimum":0,"title":"Minzoom","default":0},"maxzoom":{"type":"integer","maximum":30,"minimum":0,"title":"Maxzoom","default":30},"bounds":{"items":{"type":"number"},"type":"array","title":"Bounds","default":[-180,-90,180,90]},"center":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"integer"}],"type":"array","maxItems":3,"minItems":3},{"type":"null"}],"title":"Center"}},"type":"object","required":["tiles"],"title":"TileJSON","description":"TileJSON model.\n\nBased on https://github.com/mapbox/tilejson-spec/tree/master/2.2.0"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Wmts

> OGC WMTS endpoint.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/{tileMatrixSetId}/WMTSCapabilities.xml":{"get":{"tags":["STAC Search"],"summary":"Wmts","description":"OGC WMTS endpoint.","operationId":".searches.{search_id}.getWMTS","parameters":[{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"tile_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImageType","description":"Output image type. Default is png.","default":"png"},"description":"Output image type. Default is png."},{"name":"tile_scale","in":"query","required":false,"schema":{"type":"integer","exclusiveMaximum":4,"exclusiveMinimum":0,"description":"Tile size scale. 1=256x256, 2=512x512...","default":1,"title":"Tile Scale"},"description":"Tile size scale. 1=256x256, 2=512x512..."},{"name":"minzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default minzoom.","title":"Minzoom"},"description":"Overwrite default minzoom."},{"name":"maxzoom","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Overwrite default maxzoom.","title":"Maxzoom"},"description":"Overwrite default maxzoom."},{"name":"use_epsg","in":"query","required":false,"schema":{"type":"boolean","description":"Use EPSG code, not opengis.net, for the ows:SupportedCRS in the TileMatrixSet (set to True to enable ArcMap compatability)","default":false,"title":"Use Epsg"},"description":"Use EPSG code, not opengis.net, for the ows:SupportedCRS in the TileMatrixSet (set to True to enable ArcMap compatability)"}],"responses":{"200":{"description":"Successful Response","content":{"application/xml":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Point

> Get Point value for a Mosaic.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/point/{lon},{lat}":{"get":{"tags":["STAC Search"],"summary":"Point","description":"Get Point value for a Mosaic.","operationId":".searches.{search_id}.getDataForPoint","parameters":[{"name":"lon","in":"path","required":true,"schema":{"type":"number","description":"Longitude","title":"Lon"},"description":"Longitude"},{"name":"lat","in":"path","required":true,"schema":{"type":"number","description":"Latitude","title":"Lat"},"description":"Latitude"},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."}],"responses":{"200":{"description":"Return a value for a point","content":{"application/json":{"schema":{"$ref":"#/components/schemas/titiler__mosaic__models__responses__Point"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"titiler__mosaic__models__responses__Point":{"properties":{"coordinates":{"items":{"type":"number"},"type":"array","title":"Coordinates"},"values":{"items":{"prefixItems":[{"type":"string"},{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"array"},{"items":{"type":"string"},"type":"array"}],"type":"array","maxItems":3,"minItems":3},"type":"array","title":"Values"}},"type":"object","required":["coordinates","values"],"title":"Point","description":"Point model.\n\nresponse model for `/point` endpoints"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Assets For Bbox

> Return a list of assets which overlap a bounding box

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/bbox/{minx},{miny},{maxx},{maxy}/assets":{"get":{"tags":["STAC Search"],"summary":"Assets For Bbox","description":"Return a list of assets which overlap a bounding box","operationId":".searches.{search_id}.getAssetsForBoundingBox","parameters":[{"name":"minx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min X","title":"Minx"},"description":"Bounding box min X"},{"name":"miny","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min Y","title":"Miny"},"description":"Bounding box min Y"},{"name":"maxx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max X","title":"Maxx"},"description":"Bounding box max X"},{"name":"maxy","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max Y","title":"Maxy"},"description":"Bounding box max Y"},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."}],"responses":{"200":{"description":"Return list of COGs in bounding box","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Assets For Lon Lat

> Return a list of assets which overlap a point

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/point/{lon},{lat}/assets":{"get":{"tags":["STAC Search"],"summary":"Assets For Lon Lat","description":"Return a list of assets which overlap a point","operationId":".searches.{search_id}.getAssetsForPoint","parameters":[{"name":"lon","in":"path","required":true,"schema":{"type":"number","description":"Longitude","title":"Lon"},"description":"Longitude"},{"name":"lat","in":"path","required":true,"schema":{"type":"number","description":"Latitude","title":"Lat"},"description":"Latitude"},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."}],"responses":{"200":{"description":"Return list of COGs","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Assets For Tile

> Return a list of assets which overlap a given tile

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/tiles/{tileMatrixSetId}/{z}/{x}/{y}/assets":{"get":{"tags":["STAC Search"],"summary":"Assets For Tile","description":"Return a list of assets which overlap a given tile","operationId":".searches.{search_id}.getAssetsForTile","parameters":[{"name":"tileMatrixSetId","in":"path","required":true,"schema":{"enum":["CDB1GlobalGrid","CanadianNAD83_LCC","EuropeanETRS89_LAEAQuad","GNOSISGlobalGrid","LINZAntarticaMapTilegrid","NZTM2000Quad","UPSAntarcticWGS84Quad","UPSArcticWGS84Quad","UTM31WGS84Quad","WGS1984Quad","WebMercatorQuad","WorldCRS84Quad","WorldMercatorWGS84Quad"],"type":"string","description":"Identifier selecting one of the TileMatrixSetId supported.","title":"Tilematrixsetid"},"description":"Identifier selecting one of the TileMatrixSetId supported."},{"name":"z","in":"path","required":true,"schema":{"type":"integer","description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.","title":"Z"},"description":"Identifier (Z) selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile."},{"name":"x","in":"path","required":true,"schema":{"type":"integer","description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix.","title":"X"},"description":"Column (X) index of the tile on the selected TileMatrix. It cannot exceed the MatrixHeight-1 for the selected TileMatrix."},{"name":"y","in":"path","required":true,"schema":{"type":"integer","description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix.","title":"Y"},"description":"Row (Y) index of the tile on the selected TileMatrix. It cannot exceed the MatrixWidth-1 for the selected TileMatrix."},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."}],"responses":{"200":{"description":"Return list of COGs","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Bbox Image

> Create image from a bbox.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/bbox/{minx},{miny},{maxx},{maxy}/{width}x{height}.{format}":{"get":{"tags":["STAC Search"],"summary":"Bbox Image","description":"Create image from a bbox.","operationId":".searches.{search_id}.getDataForBoundingBoxWithSizesAndFormat","parameters":[{"name":"minx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min X","title":"Minx"},"description":"Bounding box min X"},{"name":"miny","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min Y","title":"Miny"},"description":"Bounding box min Y"},{"name":"maxx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max X","title":"Maxx"},"description":"Bounding box max X"},{"name":"maxy","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max Y","title":"Maxy"},"description":"Bounding box max Y"},{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"height","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Bbox Image

> Create image from a bbox.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/bbox/{minx},{miny},{maxx},{maxy}.{format}":{"get":{"tags":["STAC Search"],"summary":"Bbox Image","description":"Create image from a bbox.","operationId":".searches.{search_id}.getDataForBoundingBoxWithFormat","parameters":[{"name":"minx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min X","title":"Minx"},"description":"Bounding box min X"},{"name":"miny","in":"path","required":true,"schema":{"type":"number","description":"Bounding box min Y","title":"Miny"},"description":"Bounding box min Y"},{"name":"maxx","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max X","title":"Maxx"},"description":"Bounding box max X"},{"name":"maxy","in":"path","required":true,"schema":{"type":"number","description":"Bounding box max Y","title":"Maxy"},"description":"Bounding box max Y"},{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Feature Image

> Create image from a geojson feature.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/feature/{width}x{height}.{format}":{"post":{"tags":["STAC Search"],"summary":"Feature Image","description":"Create image from a geojson feature.","operationId":".searches.{search_id}.postDataForGeoJSONWithSizesAndFormat","parameters":[{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"height","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature","description":"GeoJSON Feature."}}}},"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"Feature":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Feature","title":"Type"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Geometry"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Properties"},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","geometry","properties"],"title":"Feature","description":"Feature Model"},"geojson_pydantic__geometries__Point":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}],"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Point","description":"Point Model"},"Position2D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"}],"type":"array","maxItems":2,"minItems":2},"Position3D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"},{"type":"number","title":"Altitude"}],"type":"array","maxItems":3,"minItems":3},"MultiPoint":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPoint","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPoint","description":"MultiPoint Model"},"LineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"LineString","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"LineString","description":"LineString Model"},"MultiLineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiLineString","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiLineString","description":"MultiLineString Model"},"Polygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Polygon","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Polygon","description":"Polygon Model"},"MultiPolygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPolygon","title":"Type"},"coordinates":{"items":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPolygon","description":"MultiPolygon Model"},"GeometryCollection-Input":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Feature Image

> Create image from a geojson feature.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/feature.{format}":{"post":{"tags":["STAC Search"],"summary":"Feature Image","description":"Create image from a geojson feature.","operationId":".searches.{search_id}.postDataForGeoJSONWithFormat","parameters":[{"name":"format","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature","description":"GeoJSON Feature."}}}},"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"Feature":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Feature","title":"Type"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Geometry"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Properties"},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","geometry","properties"],"title":"Feature","description":"Feature Model"},"geojson_pydantic__geometries__Point":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}],"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Point","description":"Point Model"},"Position2D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"}],"type":"array","maxItems":2,"minItems":2},"Position3D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"},{"type":"number","title":"Altitude"}],"type":"array","maxItems":3,"minItems":3},"MultiPoint":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPoint","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPoint","description":"MultiPoint Model"},"LineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"LineString","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"LineString","description":"LineString Model"},"MultiLineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiLineString","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiLineString","description":"MultiLineString Model"},"Polygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Polygon","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Polygon","description":"Polygon Model"},"MultiPolygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPolygon","title":"Type"},"coordinates":{"items":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPolygon","description":"MultiPolygon Model"},"GeometryCollection-Input":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Feature Image

> Create image from a geojson feature.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/feature":{"post":{"tags":["STAC Search"],"summary":"Feature Image","description":"Create image from a geojson feature.","operationId":".searches.{search_id}.postDataForGeoJSON","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ImageType","description":"Default will be automatically defined if the output image needs a mask (png) or not (jpeg)."}},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"colormap_name","in":"query","required":false,"schema":{"enum":["hsv_r","greys_r","winter","rdbu_r","ylgnbu","piyg","rdpu_r","orrd","puor","oxy_r","gnuplot_r","purples","viridis_r","summer_r","cmrmap_r","paired","tarn_r","ice","brg","cubehelix_r","reds_r","gist_stern","bone_r","ylorrd_r","cubehelix","curl","deep_r","algae","rdpu","hot","bone","brg_r","set3","pastel2_r","twilight","greens_r","hsv","coolwarm_r","spectral","bupu_r","amp","gist_ncar","bwr","rain_r","gray_r","pubugn","ylorrd","dark2_r","oranges","purples_r","magma","twilight_shifted","cfastie","twilight_r","tab10","cmrmap","binary_r","set3_r","autumn_r","ylgn","terrain","jet","piyg_r","tab20b","amp_r","tempo_r","cividis","gist_yarg","gnuplot2","reds","thermal_r","puor_r","gist_yarg_r","tab20c_r","turbid_r","gist_heat","spectral_r","seismic","dark2","tab20b_r","gist_gray_r","tab20c","ylgn_r","bugn_r","dense","paired_r","pastel1_r","haline","inferno_r","cool_r","tab20","topo_r","gist_rainbow_r","balance","rdbu","copper_r","delta","gnuplot","pink_r","delta_r","inferno","summer","turbid","accent","algae_r","greys","rplumbo","dense_r","tab20_r","tab10_r","gist_heat_r","oxy","gnuplot2_r","jet_r","solar","magma_r","rainbow","spring","rdylbu_r","prism_r","bupu","brbg_r","ocean_r","prism","greens","blues","pubu_r","pink","plasma","afmhot_r","pubu","copper","speed_r","matter_r","rainbow_r","binary","purd","rdylbu","matter","pastel2","purd_r","hot_r","cividis_r","wistia","set1_r","ylgnbu_r","set1","orrd_r","speed","gist_stern_r","gray","ocean","oranges_r","seismic_r","spring_r","turbo","rain","topo","tempo","prgn_r","set2","rdylgn_r","plasma_r","bwr_r","winter_r","solar_r","balance_r","turbo_r","rdylgn","rdgy","flag_r","diff","gnbu","nipy_spectral","gist_earth_r","gist_ncar_r","curl_r","haline_r","phase","wistia_r","gist_rainbow","terrain_r","gist_gray","pubugn_r","ice_r","cool","twilight_shifted_r","brbg","deep","diff_r","thermal","prgn","nipy_spectral_r","schwarzwald","tarn","viridis","ylorbr","afmhot","gist_earth","autumn","rdgy_r","bugn","phase_r","accent_r","coolwarm","set2_r","pastel1","blues_r","flag","gnbu_r","ylorbr_r"],"type":"string","description":"Colormap name","title":"Colormap Name"},"description":"Colormap name"},{"name":"colormap","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON encoded custom Colormap","title":"Colormap"},"description":"JSON encoded custom Colormap"},{"name":"rescale","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Min/Max data Rescaling","description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},"description":"comma (',') delimited Min,Max range. Can set multiple time for multiple bands."},{"name":"color_formula","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Formula","description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},"description":"rio-color formula (info: https://github.com/mapbox/rio-color)"},{"name":"return_mask","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Add mask to the output data. Defaults to `True`","title":"Return Mask"},"description":"Add mask to the output data. Defaults to `True`"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature","description":"GeoJSON Feature."}}}},"responses":{"200":{"description":"Return an image.","content":{"image/png":{},"image/jpeg":{},"image/jpg":{},"image/webp":{},"image/jp2":{},"image/tiff; application=geotiff":{},"application/x-binary":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ImageType":{"type":"string","enum":["png","npy","tif","jpeg","jpg","jp2","webp","pngraw"],"title":"ImageType","description":"Available Output image type."},"Feature":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Feature","title":"Type"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Geometry"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Properties"},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","geometry","properties"],"title":"Feature","description":"Feature Model"},"geojson_pydantic__geometries__Point":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}],"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Point","description":"Point Model"},"Position2D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"}],"type":"array","maxItems":2,"minItems":2},"Position3D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"},{"type":"number","title":"Altitude"}],"type":"array","maxItems":3,"minItems":3},"MultiPoint":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPoint","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPoint","description":"MultiPoint Model"},"LineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"LineString","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"LineString","description":"LineString Model"},"MultiLineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiLineString","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiLineString","description":"MultiLineString Model"},"Polygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Polygon","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Polygon","description":"Polygon Model"},"MultiPolygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPolygon","title":"Type"},"coordinates":{"items":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPolygon","description":"MultiPolygon Model"},"GeometryCollection-Input":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Geojson Statistics

> Get Statistics from a geojson feature or featureCollection.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/statistics":{"post":{"tags":["STAC Search"],"summary":"Geojson Statistics","description":"Get Statistics from a geojson feature or featureCollection.","operationId":".searches.{search_id}.postStatisticsForGeoJSON","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"},{"name":"scan_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC).","title":"Scan Limit"},"description":"Return as soon as we scan N items (defaults to 10000 in PgSTAC)."},{"name":"items_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC).","title":"Items Limit"},"description":"Return as soon as we have N items per geometry (defaults to 100 in PgSTAC)."},{"name":"time_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC).","title":"Time Limit"},"description":"Return after N seconds to avoid long requests (defaults to 5 in PgSTAC)."},{"name":"exitwhenfull","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC).","title":"Exitwhenfull"},"description":"Return as soon as the geometry is fully covered (defaults to True in PgSTAC)."},{"name":"skipcovered","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC).","title":"Skipcovered"},"description":"Skip any items that would show up completely under the previous items (defaults to True in PgSTAC)."},{"name":"coord_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`.","title":"Coord Crs"},"description":"Coordinate Reference System of the input coords. Default to `epsg:4326`."},{"name":"dst_crs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output Coordinate Reference System.","title":"Dst Crs"},"description":"Output Coordinate Reference System."},{"name":"bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Band indexes","description":"Dataset band indexes"},"description":"Dataset band indexes"},{"name":"assets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Asset names","description":"Asset's names."},"description":"Asset's names."},{"name":"expression","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Math expression","description":"Band math expression between assets"},"description":"Band math expression between assets"},{"name":"asset_bidx","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Per asset band indexes","description":"Per asset band indexes (coma separated indexes)"},"description":"Per asset band indexes (coma separated indexes)"},{"name":"asset_as_band","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consider asset as a 1 band dataset","description":"Asset as Band"},"description":"Asset as Band"},{"name":"nodata","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Nodata value","description":"Overwrite internal Nodata value"},"description":"Overwrite internal Nodata value"},{"name":"unscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply internal Scale/Offset","description":"Apply internal Scale/Offset. Defaults to `False`."},"description":"Apply internal Scale/Offset. Defaults to `False`."},{"name":"resampling","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","gauss","rms"],"type":"string"},{"type":"null"}],"description":"RasterIO resampling algorithm. Defaults to `nearest`.","title":"Resampling"},"description":"RasterIO resampling algorithm. Defaults to `nearest`."},{"name":"reproject","in":"query","required":false,"schema":{"anyOf":[{"enum":["nearest","bilinear","cubic","cubic_spline","lanczos","average","mode","max","min","med","q1","q3","sum","rms"],"type":"string"},{"type":"null"}],"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.","title":"Reproject"},"description":"WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`."},{"name":"pixel_selection","in":"query","required":false,"schema":{"enum":["first","highest","lowest","mean","median","stdev","lastbandlow","lastbandhight","count"],"type":"string","description":"Pixel selection method.","default":"first","title":"Pixel Selection"},"description":"Pixel selection method."},{"name":"max_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum image size to read onto.","title":"Max Size"}},{"name":"height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image height.","title":"Height"}},{"name":"width","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Force output image width.","title":"Width"}},{"name":"algorithm","in":"query","required":false,"schema":{"enum":["hillshade","slope","contours","normalizedIndex","terrarium","terrainrgb","cast","ceil","floor","min","max","median","mean","std","var"],"type":"string","description":"Algorithm name","title":"Algorithm"},"description":"Algorithm name"},{"name":"algorithm_params","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Algorithm parameter","title":"Algorithm Params"},"description":"Algorithm parameter"},{"name":"categorical","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Return statistics for categorical dataset. Defaults to `False`","title":"Categorical"},"description":"Return statistics for categorical dataset. Defaults to `False`"},{"name":"c","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"integer"}]}},{"type":"null"}],"title":"Pixels values for categories.","description":"List of values for which to report counts."},"description":"List of values for which to report counts."},{"name":"p","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Percentile values","description":"List of percentile values (default to [2, 98])."},"description":"List of percentile values (default to [2, 98])."},{"name":"histogram_bins","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Histogram bins.","description":"\nDefines the number of equal-width bins in the given range (10, by default).\n\nIf bins is a sequence (comma `,` delimited values), it defines a monotonically increasing array of bin edges, including the rightmost edge, allowing for non-uniform bin widths.\n\nlink: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html\n            "},"description":"\nDefines the number of equal-width bins in the given range (10, by default).\n\nIf bins is a sequence (comma `,` delimited values), it defines a monotonically increasing array of bin edges, including the rightmost edge, allowing for non-uniform bin widths.\n\nlink: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html\n            "},{"name":"histogram_range","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Histogram range","description":"\nComma `,` delimited range of the bins.\n\nThe lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()).\n\nValues outside the range are ignored. The first element of the range must be less than or equal to the second.\nrange affects the automatic bin computation as well.\n\nlink: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html\n            "},"description":"\nComma `,` delimited range of the bins.\n\nThe lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()).\n\nValues outside the range are ignored. The first element of the range must be less than or equal to the second.\nrange affects the automatic bin computation as well.\n\nlink: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html\n            "}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FeatureCollection"},{"$ref":"#/components/schemas/Feature"}],"description":"GeoJSON Feature or FeatureCollection.","title":"Geojson"}}}},"responses":{"200":{"description":"Return statistics for geojson features.","content":{"application/geo+json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FeatureCollection_Feature_Annotated_Union_Point__MultiPoint__LineString__MultiLineString__Polygon__MultiPolygon__GeometryCollection___FieldInfo_annotation_NoneType__required_True__discriminator__type_____StatisticsInGeoJSON__"},{"$ref":"#/components/schemas/Feature_Annotated_Union_Point__MultiPoint__LineString__MultiLineString__Polygon__MultiPolygon__GeometryCollection___FieldInfo_annotation_NoneType__required_True__discriminator__type_____StatisticsInGeoJSON_"}],"title":"Response .Searches.{Search Id}.Poststatisticsforgeojson"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"FeatureCollection":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"FeatureCollection","title":"Type"},"features":{"items":{"$ref":"#/components/schemas/Feature"},"type":"array","title":"Features"}},"type":"object","required":["type","features"],"title":"FeatureCollection","description":"FeatureCollection Model"},"Feature":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Feature","title":"Type"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Geometry"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Properties"},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","geometry","properties"],"title":"Feature","description":"Feature Model"},"geojson_pydantic__geometries__Point":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}],"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Point","description":"Point Model"},"Position2D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"}],"type":"array","maxItems":2,"minItems":2},"Position3D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"},{"type":"number","title":"Altitude"}],"type":"array","maxItems":3,"minItems":3},"MultiPoint":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPoint","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPoint","description":"MultiPoint Model"},"LineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"LineString","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"LineString","description":"LineString Model"},"MultiLineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiLineString","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiLineString","description":"MultiLineString Model"},"Polygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Polygon","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Polygon","description":"Polygon Model"},"MultiPolygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPolygon","title":"Type"},"coordinates":{"items":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPolygon","description":"MultiPolygon Model"},"GeometryCollection-Input":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"FeatureCollection_Feature_Annotated_Union_Point__MultiPoint__LineString__MultiLineString__Polygon__MultiPolygon__GeometryCollection___FieldInfo_annotation_NoneType__required_True__discriminator__type_____StatisticsInGeoJSON__":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"FeatureCollection","title":"Type"},"features":{"items":{"$ref":"#/components/schemas/Feature_Annotated_Union_Point__MultiPoint__LineString__MultiLineString__Polygon__MultiPolygon__GeometryCollection___FieldInfo_annotation_NoneType__required_True__discriminator__type_____StatisticsInGeoJSON_"},"type":"array","title":"Features"}},"type":"object","required":["type","features"],"title":"FeatureCollection[Feature[Annotated[Union[Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection], FieldInfo(annotation=NoneType, required=True, discriminator='type')], StatisticsInGeoJSON]]"},"Feature_Annotated_Union_Point__MultiPoint__LineString__MultiLineString__Polygon__MultiPolygon__GeometryCollection___FieldInfo_annotation_NoneType__required_True__discriminator__type_____StatisticsInGeoJSON_":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Feature","title":"Type"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Output"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Output","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/geojson_pydantic__geometries__Point","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Geometry"},"properties":{"anyOf":[{"$ref":"#/components/schemas/StatisticsInGeoJSON"},{"type":"null"}]},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["type","geometry","properties"],"title":"Feature[Annotated[Union[Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection], FieldInfo(annotation=NoneType, required=True, discriminator='type')], StatisticsInGeoJSON]"},"GeometryCollection-Output":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Output"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Output","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/geojson_pydantic__geometries__Point","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"StatisticsInGeoJSON":{"properties":{"statistics":{"additionalProperties":{"$ref":"#/components/schemas/BandStatistics"},"type":"object","title":"Statistics"}},"additionalProperties":true,"type":"object","required":["statistics"],"title":"StatisticsInGeoJSON","description":"Statistics model in geojson response."},"BandStatistics":{"properties":{"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"mean":{"type":"number","title":"Mean"},"count":{"type":"number","title":"Count"},"sum":{"type":"number","title":"Sum"},"std":{"type":"number","title":"Std"},"median":{"type":"number","title":"Median"},"majority":{"type":"number","title":"Majority"},"minority":{"type":"number","title":"Minority"},"unique":{"type":"number","title":"Unique"},"histogram":{"items":{"items":{"anyOf":[{"type":"number"},{"type":"integer"}]},"type":"array"},"type":"array","title":"Histogram"},"valid_percent":{"type":"number","title":"Valid Percent"},"masked_pixels":{"type":"number","title":"Masked Pixels"},"valid_pixels":{"type":"number","title":"Valid Pixels"}},"additionalProperties":true,"type":"object","required":["min","max","mean","count","sum","std","median","majority","minority","unique","histogram","valid_percent","masked_pixels","valid_pixels"],"title":"BandStatistics","description":"Band statistics"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Info

> Get Search query metadata.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/{search_id}/info":{"get":{"tags":["STAC Search"],"summary":"Info","description":"Get Search query metadata.","operationId":".searches.{search_id}.getInfo","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","description":"PgSTAC Search Identifier (Hash)","title":"Search Id"},"description":"PgSTAC Search Identifier (Hash)"}],"responses":{"200":{"description":"Get Search query metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/titiler__pgstac__model__Info"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"titiler__pgstac__model__Info":{"properties":{"search":{"$ref":"#/components/schemas/Search"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__pgstac__model__Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["search"],"title":"Info","description":"Response model for /info endpoint."},"Search":{"properties":{"hash":{"type":"string","title":"Hash"},"search":{"additionalProperties":true,"type":"object","title":"Search"},"_where":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Where"},"orderby":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orderby"},"lastused":{"type":"string","format":"date-time","title":"Lastused"},"usecount":{"type":"integer","title":"Usecount"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"type":"object","required":["hash","search","lastused","usecount","metadata"],"title":"Search","description":"PgSTAC Search entry.\n\nref: https://github.com/stac-utils/pgstac/blob/3499daa2bfa700ae7bb07503795c169bf2ebafc7/sql/004_search.sql#L907-L915"},"Metadata":{"properties":{"type":{"type":"string","enum":["mosaic","search"],"title":"Type","default":"mosaic"},"bounds":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bounds"},"minzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minzoom"},"maxzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxzoom"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"assets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assets"},"defaults":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Defaults"}},"additionalProperties":true,"type":"object","title":"Metadata","description":"Metadata Model."},"titiler__pgstac__model__Link":{"properties":{"href":{"type":"string","title":"Href","description":"Supplies the URI to a remote resource (or resource fragment)."},"rel":{"type":"string","title":"Rel","description":"The type or semantics of the relation."},"type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}],"description":"A hint indicating what the media type of the result of dereferencing the link should be."},"templated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Templated","description":"This flag set to true if the link is a URL template."},"varBase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varbase","description":"A base path to retrieve semantic information about the variables used in URL template."},"hreflang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hreflang","description":"A hint indicating what the language of the result of dereferencing the link should be."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Used to label the destination of a link such that it can be used as a human-readable identifier."},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"}},"type":"object","required":["href","rel"],"title":"Link","description":"Link model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-core/link.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"MediaType":{"type":"string","enum":["image/tiff; application=geotiff","image/jp2","image/png","image/png","image/jpeg","image/jpg","image/webp","application/x-binary","application/xml","application/json","application/geo+json","text/html","text/plain","application/x-protobuf","application/vnd.mapbox-vector-tile","application/ndjson","application/geo+json-seq","application/schema+json","text/csv","application/vnd.oai.openapi+json;version=3.0","application/vnd.oai.openapi;version=3.0","image/gif"],"title":"MediaType","description":"Responses Media types formerly known as MIME types."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## List Searches

> List a PgSTAC Searches.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/list":{"get":{"tags":["STAC Search"],"summary":"List Searches","description":"List a PgSTAC Searches.","operationId":".searches.getMosaicList","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Page size limit","default":10,"title":"Limit"},"description":"Page size limit"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page offset","default":0,"title":"Offset"},"description":"Page offset"},{"name":"sortby","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort the response items by a property (ascending (default) or descending).","title":"Sortby"},"description":"Sort the response items by a property (ascending (default) or descending)."}],"responses":{"200":{"description":"List Mosaics in PgSTAC.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Infos"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Infos":{"properties":{"searches":{"items":{"$ref":"#/components/schemas/titiler__pgstac__model__Info"},"type":"array","title":"Searches"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__pgstac__model__Link"},"type":"array"},{"type":"null"}],"title":"Links"},"context":{"$ref":"#/components/schemas/Context"}},"type":"object","required":["searches","context"],"title":"Infos","description":"Response model for /list endpoint."},"titiler__pgstac__model__Info":{"properties":{"search":{"$ref":"#/components/schemas/Search"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__pgstac__model__Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["search"],"title":"Info","description":"Response model for /info endpoint."},"Search":{"properties":{"hash":{"type":"string","title":"Hash"},"search":{"additionalProperties":true,"type":"object","title":"Search"},"_where":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Where"},"orderby":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orderby"},"lastused":{"type":"string","format":"date-time","title":"Lastused"},"usecount":{"type":"integer","title":"Usecount"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"type":"object","required":["hash","search","lastused","usecount","metadata"],"title":"Search","description":"PgSTAC Search entry.\n\nref: https://github.com/stac-utils/pgstac/blob/3499daa2bfa700ae7bb07503795c169bf2ebafc7/sql/004_search.sql#L907-L915"},"Metadata":{"properties":{"type":{"type":"string","enum":["mosaic","search"],"title":"Type","default":"mosaic"},"bounds":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bounds"},"minzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minzoom"},"maxzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxzoom"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"assets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assets"},"defaults":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Defaults"}},"additionalProperties":true,"type":"object","title":"Metadata","description":"Metadata Model."},"titiler__pgstac__model__Link":{"properties":{"href":{"type":"string","title":"Href","description":"Supplies the URI to a remote resource (or resource fragment)."},"rel":{"type":"string","title":"Rel","description":"The type or semantics of the relation."},"type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}],"description":"A hint indicating what the media type of the result of dereferencing the link should be."},"templated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Templated","description":"This flag set to true if the link is a URL template."},"varBase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varbase","description":"A base path to retrieve semantic information about the variables used in URL template."},"hreflang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hreflang","description":"A hint indicating what the language of the result of dereferencing the link should be."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Used to label the destination of a link such that it can be used as a human-readable identifier."},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"}},"type":"object","required":["href","rel"],"title":"Link","description":"Link model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-core/link.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"MediaType":{"type":"string","enum":["image/tiff; application=geotiff","image/jp2","image/png","image/png","image/jpeg","image/jpg","image/webp","application/x-binary","application/xml","application/json","application/geo+json","text/html","text/plain","application/x-protobuf","application/vnd.mapbox-vector-tile","application/ndjson","application/geo+json-seq","application/schema+json","text/csv","application/vnd.oai.openapi+json;version=3.0","application/vnd.oai.openapi;version=3.0","image/gif"],"title":"MediaType","description":"Responses Media types formerly known as MIME types."},"Context":{"properties":{"returned":{"type":"integer","title":"Returned"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched"}},"type":"object","required":["returned"],"title":"Context","description":"Context Model."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Register Search

> Register a Search query.

```json
{"openapi":"3.1.0","info":{"title":"titiler-pgstac","version":"1.8.0"},"paths":{"/searches/register":{"post":{"tags":["STAC Search"],"summary":"Register Search","description":"Register a Search query.","operationId":".searches.Register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterMosaic"}}},"required":true},"responses":{"200":{"description":"Register a Virtual Mosaic (PgSTAC Search).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"RegisterMosaic":{"properties":{"collections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collections"},"ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ids"},"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"intersects":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},{"type":"null"}],"title":"Intersects"},"query":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"propertyNames":{"enum":["eq","neq","lt","lte","gt","gte"]},"type":"object"},"type":"object"},{"type":"null"}],"title":"Query"},"datetime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datetime"},"sortby":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortExtension"},"type":"array"},{"type":"null"}],"title":"Sortby","description":"An array of property (field) names, and direction in form of '{'field': '<property_name>', 'direction':'<direction>'}'"},"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter","description":"A CQL filter expression for filtering items."},"filter-crs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter-Crs","description":"The coordinate reference system (CRS) used by spatial literals in the 'filter' value. Default is `http://www.opengis.net/def/crs/OGC/1.3/CRS84`"},"filter-lang":{"anyOf":[{"type":"string","enum":["cql-json","cql-text","cql2-json"]},{"type":"null"}],"title":"Filter-Lang","description":"The CQL filter encoding that the 'filter' value uses.","default":"cql2-json"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"additionalProperties":true,"type":"object","title":"RegisterMosaic","description":"Model of /register endpoint input."},"geojson_pydantic__geometries__Point":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}],"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Point","description":"Point Model"},"Position2D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"}],"type":"array","maxItems":2,"minItems":2},"Position3D":{"prefixItems":[{"type":"number","title":"Longitude"},{"type":"number","title":"Latitude"},{"type":"number","title":"Altitude"}],"type":"array","maxItems":3,"minItems":3},"MultiPoint":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPoint","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPoint","description":"MultiPoint Model"},"LineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"LineString","title":"Type"},"coordinates":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2,"title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"LineString","description":"LineString Model"},"MultiLineString":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiLineString","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":2},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiLineString","description":"MultiLineString Model"},"Polygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"Polygon","title":"Type"},"coordinates":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"Polygon","description":"Polygon Model"},"MultiPolygon":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"MultiPolygon","title":"Type"},"coordinates":{"items":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/Position2D"},{"$ref":"#/components/schemas/Position3D"}]},"type":"array","minItems":4},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["type","coordinates"],"title":"MultiPolygon","description":"MultiPolygon Model"},"GeometryCollection-Input":{"properties":{"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bbox"},"type":{"type":"string","const":"GeometryCollection","title":"Type"},"geometries":{"items":{"oneOf":[{"$ref":"#/components/schemas/geojson_pydantic__geometries__Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/GeometryCollection-Input"}],"discriminator":{"propertyName":"type","mapping":{"GeometryCollection":"#/components/schemas/GeometryCollection-Input","LineString":"#/components/schemas/LineString","MultiLineString":"#/components/schemas/MultiLineString","MultiPoint":"#/components/schemas/MultiPoint","MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point-Input","Polygon":"#/components/schemas/Polygon"}}},"type":"array","title":"Geometries"}},"type":"object","required":["type","geometries"],"title":"GeometryCollection","description":"GeometryCollection Model"},"SortExtension":{"properties":{"field":{"type":"string","minLength":1,"title":"Field"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["field","direction"],"title":"SortExtension","description":"https://github.com/radiantearth/stac-api-spec/tree/master/extensions/sort#sort-api-extension"},"Metadata":{"properties":{"type":{"type":"string","enum":["mosaic","search"],"title":"Type","default":"mosaic"},"bounds":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6},{"type":"null"}],"title":"Bounds"},"minzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minzoom"},"maxzoom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxzoom"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"assets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assets"},"defaults":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Defaults"}},"additionalProperties":true,"type":"object","title":"Metadata","description":"Metadata Model."},"RegisterResponse":{"properties":{"id":{"type":"string","title":"Id"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/titiler__pgstac__model__Link"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["id"],"title":"RegisterResponse","description":"Response model for /register endpoint."},"titiler__pgstac__model__Link":{"properties":{"href":{"type":"string","title":"Href","description":"Supplies the URI to a remote resource (or resource fragment)."},"rel":{"type":"string","title":"Rel","description":"The type or semantics of the relation."},"type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}],"description":"A hint indicating what the media type of the result of dereferencing the link should be."},"templated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Templated","description":"This flag set to true if the link is a URL template."},"varBase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varbase","description":"A base path to retrieve semantic information about the variables used in URL template."},"hreflang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hreflang","description":"A hint indicating what the language of the result of dereferencing the link should be."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Used to label the destination of a link such that it can be used as a human-readable identifier."},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"}},"type":"object","required":["href","rel"],"title":"Link","description":"Link model.\n\nRef: https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-core/link.yaml\n\nCode generated using https://github.com/koxudaxi/datamodel-code-generator/"},"MediaType":{"type":"string","enum":["image/tiff; application=geotiff","image/jp2","image/png","image/png","image/jpeg","image/jpg","image/webp","application/x-binary","application/xml","application/json","application/geo+json","text/html","text/plain","application/x-protobuf","application/vnd.mapbox-vector-tile","application/ndjson","application/geo+json-seq","application/schema+json","text/csv","application/vnd.oai.openapi+json;version=3.0","application/vnd.oai.openapi;version=3.0","image/gif"],"title":"MediaType","description":"Responses Media types formerly known as MIME types."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
