Examples4Wings Tiles
Get SAR vessel detections heatmap in PNG format
Example 4Wings tile request returning SAR vessel detections as a PNG heatmap, using a generated style.
Path parameters
| Parameter | Value | Description |
|---|---|---|
z/x/y | 5/13/13 | Tile coordinates |
Query parameters
| Parameter | Value | Description |
|---|---|---|
format | PNG | Tile output format |
datasets[0] | public-global-sar-presence:latest | SAR vessel detections dataset |
date-range | 2020-01-01,2020-01-31 | Filter to January 2020 |
style | [STYLE] (base64 style blob) | Style generated by the Create a style for PNG tiles endpoint |
interval | DAY | Daily temporal resolution |
Make sure to replace [STYLE] with the style obtained in the previous endpoint "Create a style for generate PNG tiles" in the 'url' field
Request
# Make sure to replace [TOKEN] with your API Access Token
curl --location --globoff 'https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/5/13/13?format=PNG&datasets[0]=public-global-sar-presence%3Alatest&date-range=2020-01-01%2C2020-01-31&style=eyJjb2xvciI6WzU0LDI4LDEyXSwicmFtcCI6WzAsOTIsMzIzLDY0MCwxMTE2LDE3NTMsMjg1MCw0MTMxLDU4MDZdfQ%3D%3D&interval=DAY' \
-H "Authorization: Bearer [TOKEN]" \// Make sure to replace [TOKEN] with your API Access Token.
const res = await fetch(
'https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/5/13/13?format=PNG&datasets[0]=public-global-sar-presence%3Alatest&date-range=2020-01-01%2C2020-01-31&style=eyJjb2xvciI6WzU0LDI4LDEyXSwicmFtcCI6WzAsOTIsMzIzLDY0MCwxMTE2LDE3NTMsMjg1MCw0MTMxLDU4MDZdfQ%3D%3D&interval=DAY',
{ headers: { Authorization: 'Bearer [TOKEN]' } }
)
const blob = await res.blob()Response
If the request is successful, in this example the response will be a PNG file similar to this.