Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Feb 6, 2024
1 parent 6962712 commit 67b52d0
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions docs/src/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,54 @@

## Endpoint Description

`GET /tiles/{x}/{y}/{z}`
`GET /collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{x}/{y}@{scale}x`

`GET /collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{x}/{y}@{scale}x.{format}`

`GET /collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{x}/{y}.{format}`

`GET /collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{x}/{y}`

This endpoint provides tiled data for specific geographical locations and times. Tiles are defined by their x, y, and z coordinates.

## Parameters

- **Path Parameters:**
- `x` (integer): The x coordinate of the tile.
- `y` (integer): The y coordinate of the tile.
- `z` (integer): The zoom level of the tile.
- `collectionId` (string): The [concept ID](https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#c-concept-id) of the collection.
- `tileMatrixSetId` (string): TileMatrixSet name (e.g **WebMercatorQuad**)
- `x` (integer): The x coordinate of the tile
- `y` (integer): The y coordinate of the tile
- `z` (integer): The zoom level of the tile
- `scale` (integer, optional): Tile size scale, default is set to 1 (256x256)
- `format` (string, optional): Output image format, default is set to None and will be either JPEG or PNG depending on the presence of masked value.

- **Query Parameters:**
- `collection_concept_id` (string, required): The concept ID of the collection.
- `variable` (string, required): The variable of interest.
- `timestamp` (string, required): The time for which data is requested, in ISO 8601 format.
- `colormap` (string, optional): The name of the colormap to apply.
- `rescale` (string, optional): The rescale range in the format `min,max`.
- `temporal` (string, optional): Either a date-time or an interval. Date and time expressions adhere to 'YYYY-MM-DD' format. Intervals may be bounded or half-bounded (double-dots at start or end) **RECOMMENDED**
- `backend` (*cog* or *xarray*, optional): Backend to use in order to read the CMR dataset. Defaults to `cog`
- `variable`* (string, optional): The variable of interest. `required` when using `xarray` backend
- `time_slice`* (string, optional): The time for which data is requested, in ISO 8601 format
- `decode_times`* (bool, optional): Whether to decode times
- `bidx`** (int, optional): Dataset band indexes (multiple allowed)
- `expression`** (string, optional): rio-tiler's band math expression
- `unscale`** (bool, optional): Apply dataset internal Scale/Offset.
- `nodata` (string or number, optional): Overwrite internal Nodata value
- `resampling`**: RasterIO resampling algorithm. Defaults to `nearest`.
- `reproject`: WarpKernel resampling algorithm (only used when doing re-projection). Defaults to `nearest`.
- `algorithm` (string, optional): Custom algorithm name (e.g hillshade).
- `algorithm_params` (string): JSON encoded algorithm parameters.
- `color_formula` (string): rio-color formula.
- `colormap_name` (string, optional): The name of the colormap to apply
- `colormap` (string, optional): JSON encoded custom Colormap
- `rescale` (string, optional): The rescale range in the format `min,max`
- `return_mask` (bool, optional): Add mask to the output data. Defaults to `True`

\* used in `xarray` backend only

\** used in `cog` backend only

## Request Example

GET /tiles/1/2/3?collection_concept_id=C0000000000-YOCLOUD&variable=temperature&timestamp=2024-01-16T00:00:00Z&colormap=viridis&rescale=0,100
GET /collections/C0000000000-YOCLOUD/tiles/WebMercatorQuad/1/2/3?backend=xarray&variable=temperature&timestamp=2024-01-16T00:00:00Z&colormap=viridis&rescale=0,100&temporal=2024-01-16/2024-01-16


## Responses
Expand Down

0 comments on commit 67b52d0

Please sign in to comment.