Examples4Wings PNG Tiles
Filtering by vessel type (cargo and carrier vessels)
Example 4Wings PNG style request for AIS vessel presence, filtered to cargo and carrier vessels.
Query parameters
| Parameter | Value | Description |
|---|---|---|
interval | DAY | Daily temporal resolution |
datasets[0] | public-global-presence:latest | AIS vessel presence dataset |
filters[0] | vessel_type in ("cargo","carrier") | Filter to cargo and carrier vessels |
date-range | 2020-01-01,2020-01-31 | Filter to January 2020 |
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[0]=public-global-presence:latest&filters[0]=vessel_type%20in%20(%22cargo%22,%22carrier%22)&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[0]=public-global-presence:latest&filters[0]=vessel_type%20in%20(%22cargo%22,%22carrier%22)&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(34,139,34,25)",
"value": 78
},
{
"color": "rgba(34,139,34,102)",
"value": 456
},
{
"color": "rgba(34,139,34,255)",
"value": 2134
},
{
"color": "rgba(34,139,34,0)",
"value": 0
},
{
"color": "rgba(34,139,34,76)",
"value": 234
},
{
"color": "rgba(34,139,34,127)",
"value": 789
},
{
"color": "rgba(34,139,34,153)",
"value": 1123
},
{
"color": "rgba(34,139,34,178)",
"value": 1567
},
{
"color": "rgba(34,139,34,51)",
"value": 134
}
]
}
},
"url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-presence:latest&filters[0]=vessel_type in (\"cargo\",\"carrier\")&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzM0LDEzOSwzNF0sInJhbXAiOlswLDc4LDEzNCwyMzQsNDU2LDc4OSwxMTIzLDE1NjcsMjEzNF19"
}Filtering by time period for all vessel types
Example 4Wings PNG style request for AIS vessel presence across all vessel types over a time period.
Get AIS apparent fishing effort heatmap in PNG format
Example 4Wings tile request returning AIS apparent fishing effort as a PNG heatmap, using a generated style.