Examples4Wings PNG Tiles
Filtering any SAR vessel detections by time period
Example 4Wings PNG style request for all SAR vessel detections over a time period.
Query parameters
| Parameter | Value | Description |
|---|---|---|
interval | DAY | Daily temporal resolution |
color | #361c0c | Brown color ramp |
date-range | 2020-01-01,2020-01-31 | Filter to January 2020 |
datasets[0] | public-global-sar-presence:latest | SAR vessel detections dataset |
Request
# Make sure to replace [TOKEN] with your API Access Token.
curl --location --globoff --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/generate-png?interval=DAY&color=%23361c0c&date-range=2020-01-01%2C2020-01-31&datasets[0]=public-global-sar-presence%3Alatest' \
-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/generate-png?interval=DAY&color=%23361c0c&date-range=2020-01-01%2C2020-01-31&datasets[0]=public-global-sar-presence%3Alatest',
{
method: 'POST',
headers: { Authorization: 'Bearer [TOKEN]' },
}
)
const data = await res.json()Response
{
"colorRamp": {
"stepsByZoom": {
"0": [
{
"color": "rgba(54,28,12,127)",
"value": 1711
},
{
"color": "rgba(54,28,12,153)",
"value": 2662
},
{
"color": "rgba(54,28,12,178)",
"value": 3925
},
{
"color": "rgba(54,28,12,25)",
"value": 93
},
{
"color": "rgba(54,28,12,51)",
"value": 319
},
{
"color": "rgba(54,28,12,76)",
"value": 660
},
{
"color": "rgba(54,28,12,102)",
"value": 1108
},
{
"color": "rgba(54,28,12,255)",
"value": 6584
},
{
"color": "rgba(54,28,12,0)",
"value": 0
}
]
}
},
"url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-sar-presence:latest&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzU0LDI4LDEyXSwicmFtcCI6WzAsOTMsMzE5LDY2MCwxMTA4LDE3MTEsMjY2MiwzOTI1LDY1ODRdfQ=="
}Filtering by time period and gear type
Example 4Wings PNG style request for AIS apparent fishing effort over a time period, filtered by gear type.
Filtering SAR vessel detections that didn't match with AIS vessels
Example 4Wings PNG style request for SAR vessel detections that did not match an AIS vessel.