Examples4Wings PNG Tiles
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.
Query parameters
| Parameter | Value | Description |
|---|---|---|
interval | DAY | Daily temporal resolution |
datasets[0] | public-global-presence:latest | AIS vessel presence dataset |
color | #0066cc | Blue color ramp |
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&color=%230066cc&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&color=%230066cc&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(0,102,204,127)",
"value": 2845
},
{
"color": "rgba(0,102,204,153)",
"value": 4321
},
{
"color": "rgba(0,102,204,178)",
"value": 6234
},
{
"color": "rgba(0,102,204,25)",
"value": 156
},
{
"color": "rgba(0,102,204,51)",
"value": 567
},
{
"color": "rgba(0,102,204,76)",
"value": 1234
},
{
"color": "rgba(0,102,204,102)",
"value": 1892
},
{
"color": "rgba(0,102,204,255)",
"value": 8945
},
{
"color": "rgba(0,102,204,0)",
"value": 0
}
]
}
},
"url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-presence:latest&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzAsMTAyLDIwNF0sInJhbXAiOlswLDE1Niw1NjcsMTIzNCwxODkyLDI4NDUsNDMyMSw2MjM0LDg5NDVdfQ=="
}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.
Filtering by vessel type (cargo and carrier vessels)
Example 4Wings PNG style request for AIS vessel presence, filtered to cargo and carrier vessels.