Examples4Wings PNG Tiles
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.
Query parameters
| Parameter | Value | Description |
|---|---|---|
interval | DAY | Daily temporal resolution |
filters[0] | matched='false' | Only detections that didn't match with AIS vessels |
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&filters[0]=matched%3D%27false%27&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&filters[0]=matched%3D%27false%27&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,76)",
"value": 489
},
{
"color": "rgba(54,28,12,102)",
"value": 850
},
{
"color": "rgba(54,28,12,127)",
"value": 1315
},
{
"color": "rgba(54,28,12,178)",
"value": 3011
},
{
"color": "rgba(54,28,12,25)",
"value": 63
},
{
"color": "rgba(54,28,12,51)",
"value": 218
},
{
"color": "rgba(54,28,12,255)",
"value": 4027
},
{
"color": "rgba(54,28,12,0)",
"value": 0
},
{
"color": "rgba(54,28,12,153)",
"value": 2024
}
]
}
},
"url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-sar-presence:latest&filters[0]=matched='false'&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzU0LDI4LDEyXSwicmFtcCI6WzAsNjMsMjE4LDQ4OSw4NTAsMTMxNSwyMDI0LDMwMTEsNDAyN119"
}