This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Deckgl RGB PointCloud + Mapbox</title> | |
<script src="https://unpkg.com/deck.gl@^7.0.0/dist.min.js"></script> | |
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.54.0/mapbox-gl.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.54.0/mapbox-gl.css"> | |
<style> | |
body { | |
background-color: #000000; | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Replace with your title</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="https://api.mapbox.com/mapbox-gl-js/v1.7.0/mapbox-gl.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map.addSource('radar-data', { | |
type: 'vector', | |
url: 'mapbox://examples.dwtmhwpu' | |
}); | |
map.addLayer({ | |
"id": "radarpolygon", | |
"type": "fill", | |
"source": "raddar-data", | |
"source-layer": "0", | |
"filter": ["==", "idx", 0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let theinterval = setInterval(function() { | |
map.setFilter('radarpolygon', ['==', 'idx', currentidx]); | |
}, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let current_data = [...];//An h * w array from current step of radar image | |
let next_data = [...];//An h * w array from next step of radar image | |
let new_data = []; | |
for (let i = 0; i < h; i++) { | |
for (let j = 0; j < w; j++) { | |
new_data[i * w + j] = parseInt((current_data[i * w + j] + next_data[i * w + j]) / 2); | |
} | |
} | |
let polygons = contours() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const proj4 = require('proj4'); | |
let pixel_position = [10, 20]; | |
let geo_position = proj4('EPSG:3857', 'EPSG:4326',[ | |
minLng + (maxLng - minLng) * (p[0] / w), | |
maxLat - (maxLat - minLat) * (p[1] / h) | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LambdaErrorAlarm: { | |
Type: 'AWS::CloudWatch::Alarm', | |
Properties: { | |
AlarmActions: [cf.importValue(cf.sub('on-call-production-${AlarmTeam}'))], | |
AlarmDescription: 'The Lambda errored more than once in the past 5 minutes.', | |
AlarmName: cf.join('-', [cf.stackName, cf.region]), | |
Period: 60, | |
EvaluationPeriods: 5, | |
Statistic: 'Sum', | |
Threshold: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"interpolate", | |
["linear"], | |
["zoom"], | |
0, | |
0, | |
1.84, | |
0, | |
1.85, | |
1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"interpolate", | |
["linear"], | |
["zoom"], | |
0, | |
0, | |
1, | |
0, | |
1.31, | |
0.01, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"interpolate", | |
["linear"], | |
["zoom"], | |
0, | |
["literal", [-42, -40]], | |
2.01, | |
["literal", [0, 0]], | |
3.01, | |
["literal", [-20, -20]] |
NewerOlder