This file contains hidden or 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 hidden or 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
| ```bash | |
| $ brew install pulumi | |
| $ mkdir asset-tracking && cd asset-tracking | |
| $ pulumi new aws-javascript | |
| $ yarn install | |
| $ ls | |
| Pulumi.dev.yaml Pulumi.yaml index.js node_modules package-lock.json package.json | |
| ``` |
This file contains hidden or 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
| ```ts | |
| "use strict"; | |
| const pulumi = require("@pulumi/pulumi"); | |
| const aws = require("@pulumi/aws"); | |
| const awsx = require("@pulumi/awsx"); | |
| //* Create Kinesis stream for ingestion | |
| const ingestStream = new aws.kinesis.Stream("ingestAssets", { | |
| shardCount: 1, | |
| retentionPeriod: 72 |
This file contains hidden or 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
| ```ts | |
| //* Create DynamoDB Table | |
| const assetTable = new aws.dynamodb.Table("assetTable", { | |
| attributes: [ | |
| { | |
| name: "id", | |
| type: "S" | |
| }, | |
| { | |
| name: "ts", |
This file contains hidden or 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 hidden or 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]] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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() |