Examples4Wings PNG Tiles
Filtering by time period
Example 4Wings PNG style request for AIS apparent fishing effort over a time period, at a daily interval.
Query parameters
| Parameter | Value | Description |
|---|---|---|
interval | DAY | Daily temporal resolution |
datasets[0] | public-global-fishing-effort:latest | AIS apparent fishing effort dataset |
date-range | 2020-01-01,2020-01-31 | Filter to January 2020 |
color | #361c0c | Brown color ramp |
Request
# Make sure to replace [TOKEN] with your API Access Token.
curl --location --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/generate-png?interval=DAY&datasets%5B0%5D=public-global-fishing-effort:latest&color=%23361c0c&date-range=2020-01-01,2020-01-31' \
-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&datasets%5B0%5D=public-global-fishing-effort:latest&color=%23361c0c&date-range=2020-01-01,2020-01-31',
{
method: 'POST',
headers: { Authorization: 'Bearer [TOKEN]' },
}
)
const data = await res.json()Response
{
"colorRamp": {
"stepsByZoom": {
"0": [
{
"color": "rgba(54,28,12,102)",
"value": 9170
},
{
"color": "rgba(54,28,12,127)",
"value": 14857
},
{
"color": "rgba(54,28,12,153)",
"value": 24449
},
{
"color": "rgba(54,28,12,178)",
"value": 37594
},
{
"color": "rgba(54,28,12,255)",
"value": 55844
},
{
"color": "rgba(54,28,12,0)",
"value": 0
},
{
"color": "rgba(54,28,12,25)",
"value": 649
},
{
"color": "rgba(54,28,12,51)",
"value": 2313
},
{
"color": "rgba(54,28,12,76)",
"value": 5164
}
]
}
},
"url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-fishing-effort:latest&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzU0LDI4LDEyXSwicmFtcCI6WzAsNjQ5LjY1NTI3Nzc3Nzc3ODMsMjMxMy40NTYzODg4ODg4OTE1LDUxNjQuMDg2MTExMTExMTIsOTE3MC43MjU1NTU1NTU1NTYsMTQ4NTcuNjAwMjc3Nzc3ODE4LDI0NDQ5LjEzOTE2NjY2NjY1NywzNzU5NC40NTMzMzMzMzMzOSw1NTg0NC43NjQxNjY2NjY1Ml19"
}Get AIS vessel presence bins for zoom 1 in a daily interval
Example 4Wings bins request for the AIS vessel presence dataset at zoom 1 with a daily interval.
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.