# Tile service

This endpoint provides the recommended way to render raster data in your apps. Mind that your mapping library will fill in the z, x and y parameters. You can pass both a style id as well as a custom style object. Click [here](https://docs.ellipsis-drive.com/developers/api-v3/path-raster/styles) to see how to define a style object.

| **Description** | Retrieves tiff file of the given raster or a png file of the styled raster.    |
| --------------- | ------------------------------------------------------------------------------ |
| **Endpoint**    | `/path/{pathId}/raster/timestamp/{timestampId}/tile/{z}/{x}/{y}?token={token}` |
| **Method**      | GET                                                                            |

### Access Level Rules

| **Minimum Access Level** | view |
| ------------------------ | ---- |

### Processing Units

| **Minimum processing units** | 1 |
| ---------------------------- | - |

{% hint style="info" %}
In case you wish to create visualizations of multiple raster layers in Ellipsis Drive use the stack endpoint that you can find [here](https://docs.ellipsis-drive.com/developers/api-v3/path-raster/timestamps/stack-rasters).
{% endhint %}

## Parameters

<table><thead><tr><th width="354">Name</th><th width="212">Description</th><th width="135">Required</th><th>Default</th></tr></thead><tbody><tr><td><code>pathId</code></td><td>The id of the raster layer.</td><td>true</td><td></td></tr><tr><td><code>timestampId</code></td><td>The id of the timestamp.</td><td>true</td><td></td></tr><tr><td>x</td><td>The x coordinate of the tile.</td><td>true</td><td></td></tr><tr><td>y</td><td>The y coordinate of the tile.</td><td>true</td><td></td></tr><tr><td>z</td><td>The zoom level of the tile.</td><td>true</td><td></td></tr><tr><td><code>style</code></td><td>An id of a style to apply or an object describing a valid style. <strong>If not given original raster values are returned in tif format.</strong><br><br>Valid object for style can be found here: <a href="https://docs.ellipsis-drive.com/developers/api-v3/path-raster/styles/add-style">https://docs.ellipsis-drive.com/developers/api-v3/path-raster/styles/add-style</a></td><td>false</td><td>Default null.</td></tr><tr><td><code>token</code></td><td>User’s login token. </td><td>false, a token can alternatively also be passed in through the authorization header</td><td>Default null.</td></tr><tr><td><code>mask</code></td><td>A geojson polygon in wgs84 coordinates to mask the tileService.</td><td>false</td><td>Default null.</td></tr><tr><td><code>applyStyle</code></td><td>Boolean indicating whether to style the tile. If true a PNG is returned, else the style is ignored and a tiff file is returned instead.</td><td>false</td><td>Default true.</td></tr><tr><td><code>epsg</code></td><td>Integer representing the epsg of the alternative crs to use. Default is web mercator.</td><td>false</td><td>Default 3857.</td></tr></tbody></table>
