Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
7b03f8e
Remove TimeUpdater of datasource when they are removed from the TimeSync
mdhsl May 6, 2024
f304732
Fixed BinaryDataParser not reading all datablock causing some blocks …
mdhsl May 13, 2024
2151e52
Fix remove/add datasource from/to timeSync causing start/end timestam…
mdhsl May 15, 2024
c912db7
Fix using SVG with the DeckGlView; fix onHover/onRightClick/onLeftCli…
mdhsl May 23, 2024
ff2a364
Improve the SVG icon scaling in the DeckGlMapView
mdhsl May 23, 2024
5095549
Improve & fix terminate() function of DataSynchronizer
mdhsl Jun 17, 2024
485217f
remove debug log
mdhsl Jun 24, 2024
b76313e
Check if the handler exists into the worker before calling its function
mdhsl Jun 24, 2024
c78f727
Check if dataSource exists before removing it, and before adding it
mdhsl Jun 24, 2024
c6fcaba
Fix issue using ref array instead of copying it (#774)
mdhsl Jun 26, 2024
fa48f76
Fix build-package because of recent TS issue
mdhsl Jul 12, 2024
f434cc9
Add geojson example (#775)
mdhsl Aug 6, 2024
9e91d61
Use correct path and query param names for features of interest (FOIs…
earocorn Feb 25, 2025
b2e2d05
Add Connected Systems
earocorn Feb 26, 2025
a16dbb7
Update OSH.js
earocorn Mar 6, 2025
145c0ef
Change swe api showcases to use consysapi
earocorn Mar 6, 2025
3d274fb
Update showcase to use consysapi
earocorn Mar 12, 2025
f3cf9c0
Add necessary imports to feature queries
earocorn Mar 12, 2025
d25fcd6
Add geojson example (#783)
mdhsl Mar 14, 2025
2fdd0ab
Fix use of wrong MQTT connector
mdhsl Mar 14, 2025
cf91984
Add shared property to MQTT connector options
mdhsl Mar 15, 2025
f36f686
Update tasking.js showcase example
earocorn Mar 17, 2025
68b2429
Merge remote-tracking branch 'upstream/dev' into add-consys
earocorn Mar 17, 2025
1116fc5
putting dahua, uav misb, dji on gh
sugaricedreams Mar 21, 2025
92d352b
pushing chart consys
sugaricedreams Apr 1, 2025
dc15ff4
Update chart-consys.js
sugaricedreams Apr 2, 2025
3c2f38e
gh
sugaricedreams Apr 8, 2025
9819bc0
fixing var name
sugaricedreams Apr 8, 2025
5a23784
successfully changed chart archive realtime to use consysapi
sugaricedreams Apr 8, 2025
f6aa52f
made chart archive realtime batch use consysapi
sugaricedreams Apr 9, 2025
c6ad043
test....
Apr 14, 2025
8dc8ac4
point marker weather sensor
May 6, 2025
5c3e15a
weather sensor point marker done
May 7, 2025
e87c512
uav point marker unfinished
May 8, 2025
7eb2807
fixing time stamp
May 8, 2025
15896db
orientation added
May 9, 2025
ad13245
gh
May 14, 2025
33db82c
gh
Jun 4, 2025
2ace37e
changing spot 7 and uav point marker to realtime..... spot 7 kind of …
Jun 16, 2025
3f3c2b5
trying comments
Jun 18, 2025
95b7f6b
gh
Jun 23, 2025
760e0e2
uploading finished vers
Jun 24, 2025
d67f46d
Update README.md
Jun 24, 2025
c5b2cc0
new info to run
Jun 24, 2025
bc58186
fixing descriptions, cleaning up code
Jun 25, 2025
fb76481
cleaning
Jun 26, 2025
9dcc9ac
putting dahua, uav misb, dji on gh
sugaricedreams Mar 21, 2025
1aea452
pushing chart consys
sugaricedreams Apr 1, 2025
3c5b41c
Update chart-consys.js
sugaricedreams Apr 2, 2025
3412d02
gh
sugaricedreams Apr 8, 2025
d21879d
fixing var name
sugaricedreams Apr 8, 2025
d1de789
successfully changed chart archive realtime to use consysapi
sugaricedreams Apr 8, 2025
96ea659
made chart archive realtime batch use consysapi
sugaricedreams Apr 9, 2025
f71e74d
test....
Apr 14, 2025
4e47805
point marker weather sensor
May 6, 2025
0626250
weather sensor point marker done
May 7, 2025
333645e
uav point marker unfinished
May 8, 2025
bd75ec2
fixing time stamp
May 8, 2025
99732a9
orientation added
May 9, 2025
e99ee2f
gh
May 14, 2025
f0f4023
gh
Jun 4, 2025
c0d33ce
changing spot 7 and uav point marker to realtime..... spot 7 kind of …
Jun 16, 2025
91b11ed
trying comments
Jun 18, 2025
b20e52a
gh
Jun 23, 2025
221544c
uploading finished vers
Jun 24, 2025
8661122
Update README.md
Jun 24, 2025
8695eec
new info to run
Jun 24, 2025
5a1c1eb
Merge remote-tracking branch 'origin/ashley-add-consys' into ashley-a…
Aug 5, 2025
b05c61f
Update LeafletView.js
kalynstricklin Sep 11, 2025
9c895be
Merge pull request #1 from kalynstricklin/add-img-overlay
earocorn Oct 11, 2025
b6edd02
Add parent headers to collection requests
earocorn Oct 28, 2025
8c992c4
Add unit tests, babel, and remove systems context from control stream…
earocorn Oct 29, 2025
b45c854
Fix command and command status parsing. Add unit testing
earocorn Oct 30, 2025
98cfb94
3.0.0
earocorn Oct 30, 2025
9773985
3.1.0
earocorn Oct 30, 2025
3000363
3.1.1
earocorn Oct 30, 2025
22fd413
Add changelog to package
earocorn Oct 30, 2025
fb2854a
Fix live datastreams
earocorn Oct 30, 2025
591de78
3.1.2
earocorn Oct 30, 2025
7ebffb9
Fix use of MQTT shared property
earocorn Nov 10, 2025
d41767a
3.1.3
earocorn Nov 10, 2025
d0e0ec1
Added page offset as a parameter in collections constructor
kalynstricklin Nov 21, 2025
a2a01c1
Switched the pageOffset param the the response format and added obser…
kalynstricklin Nov 21, 2025
b04f6e3
added test to check offsets result time was after default offset
kalynstricklin Nov 21, 2025
8010504
udpates
kalynstricklin Nov 21, 2025
6a5cc29
testing changes with offset 0 not being fetched
kalynstricklin Nov 21, 2025
b429a7b
make current page =-1 to start
kalynstricklin Nov 21, 2025
742983f
Merge pull request #2 from kalynstricklin/add-offset
earocorn Nov 24, 2025
2520a6e
Update changelog
earocorn Nov 24, 2025
d1fb02e
3.1.4
earocorn Nov 24, 2025
4834f4e
Add pageOffset to DataStream.js
earocorn Nov 24, 2025
81f5c84
Update changelog
earocorn Nov 24, 2025
b2e8954
3.1.5
earocorn Nov 24, 2025
26884af
Upgrade webworkers to be compatible with webpack 5 and vite
earocorn Feb 26, 2026
518dafc
Fix imports for ffmpeg and mqtt
earocorn Feb 27, 2026
25edf1c
Resolve issues with CesiumView and LeafletView
earocorn Mar 2, 2026
41f4df0
Update AbstractParser with new obs parsing from osh-core
earocorn Mar 2, 2026
c0c4c18
Declare web workers as module type
earocorn Mar 3, 2026
846f039
Include Cardy's H264 fixes
earocorn Mar 3, 2026
4876808
Merge pull request #2 from apoteau21/ashley-add-consys
earocorn Mar 4, 2026
9eb104a
Update map with latest PM after datasources are connected
Cardy2 Apr 16, 2026
696f98b
Resolve conflicts
philip-khaisman Apr 29, 2026
7c7454f
Remove line layer
philip-khaisman Apr 29, 2026
d71ad23
Resolve package.json conflicts
philip-khaisman Apr 29, 2026
f49c9a6
Add scope to name in package.json
philip-khaisman Apr 29, 2026
b6aa116
Fix reference to current doc for external video support in CanvasView
philip-khaisman Apr 29, 2026
dd41a48
Merge pull request #27 from Botts-Innovative-Research/mcs_baseline
Cardy2 Apr 29, 2026
38fc240
Merge remote-tracking branch 'botts/master' into add-getLatest-PM
Cardy2 Apr 29, 2026
bc02b5e
Add JavaDocs/method descriptions to SweApi.realtime.context.js
Cardy2 Apr 30, 2026
0c72390
change module level reconnection interval to per-instance in order to…
Cardy2 May 7, 2026
a299990
Remove overly verbose Java Docs; clean up code
Cardy2 May 8, 2026
db37cc0
Use phenomenonTime = 'now' in fetching latest observations. Since thi…
Cardy2 May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Changelog

## **3.1.5**
### Fixes
Add forgotten offset parameter to `DataStream`'s `searchObservations()` method

## **3.1.4**
### Fixes
Allow specification of page offset in collection requests.

## **3.1.3**
### Fixes
Fixed DataStream stream connector using MQTT `shared` property.

## **3.1.2**
### Fixes
- Uncomment `obsFormat` in `parseDataBlock()` which broke live data streams.

## **3.1.1**
### Fixes
- Add headers to collection requests made using the Connected Systems API. This fixes authentication issues when collection requests are made.
- Fixed command and command status collection parsing.
- Corrected `ObservationFilter` to use accurate default query parameters according to OGC API - Connected Systems specification.
### Additions
- Added Jest for unit testing.
- Added control stream and data stream collection tests.

## **3.1.0**
### Changes
Added `addImageOverlay()` method to `LeafletView` for adding image overlay onto Leaflet map.

## **3.0.0**
### Changes
Refactored SWE API code to use naming conventions, query parameters, and correct paths of newer OGC API - Connected Systems standard.
OGC API - Connected Systems is the newest, OGC compliant version of the old Sensor Web Enablement (SWE) API.

## **2.1.0**

## **2.0.1**

## **1.0.0**
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ $ npm run prod


## Dependencies

### Cesium

If you use the CesiumView, don't forget to install the corresponding npm package 'cesium'.
Expand Down
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
],
};
5 changes: 5 additions & 0 deletions config/prepare-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ fs.copyFileSync(
path.resolve(__dirname, '../README.md'),
path.join(buildDir, 'README.md')
);

fs.copyFileSync(
path.resolve(__dirname, '../CHANGELOG.md'),
path.join(buildDir, 'CHANGELOG.md')
);
5 changes: 5 additions & 0 deletions config/prepare-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ fs.copyFileSync(
path.resolve(__dirname, '../README.md'),
path.join(buildDir, 'README.md')
);

fs.copyFileSync(
path.resolve(__dirname, '../CHANGELOG.md'),
path.join(buildDir, 'CHANGELOG.md')
);
1 change: 1 addition & 0 deletions demos/misb/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default {
endpointUrl: 'api.georobotix.io/ogc/t18/api',
protocol: 'mqtt',
mqttOpts: {
shared: true,
prefix: '/api',
endpointUrl: 'api.georobotix.io:443/ogc/t18'
},
Expand Down
1 change: 1 addition & 0 deletions demos/sweapi/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export default {
tls: this.$store.state.server.tls,
endpointUrl: this.$store.state.server.url,
mqttOpts: {
shared: false,
prefix: this.$store.state.server.mqtt.prefix,
endpointUrl: this.$store.state.server.mqtt.url
}
Expand Down
1 change: 1 addition & 0 deletions demos/sweapi/src/components/LiveCommands.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default {
...this.controlObj.networkProperties,
streamProtocol: value,
mqttOpts: {
shared: false,
prefix: this.mqttPrefix,
endpointUrl: this.mqttUrl
},
Expand Down
1 change: 1 addition & 0 deletions demos/sweapi/src/components/LiveControlStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
...this.controlObj.networkProperties,
streamProtocol: value,
mqttOpts: {
shared: false,
prefix: this.mqttPrefix,
endpointUrl: this.mqttUrl
},
Expand Down
1 change: 1 addition & 0 deletions demos/sweapi/src/components/LiveObservations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default {
...this.datastreamObj.networkProperties,
streamProtocol: value,
mqttOpts: {
shared: false,
prefix: this.mqttPrefix,
endpointUrl: this.mqttUrl
},
Expand Down
2 changes: 1 addition & 1 deletion demos/sweapi/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const config = {
toUrlUndefined: true
},
devServer: {
https: true,
https: false,
compress: false,
hot: true,
},
Expand Down
1 change: 1 addition & 0 deletions demos/tasking/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default {
const cmdStreamId = "rtbajuvqi9b54";

const mqttProps = {
shared: true,
prefix: '/api',
endpointUrl: 'api.georobotix.io:443/ogc/t18',
username: 'uxs-team',
Expand Down
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
testEnvironment: "node",
transform: {
'^.+\\.jsx?$': 'babel-jest'
},
roots: ["tests"],
moduleFileExtensions: ["js"],
};
33 changes: 19 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@osh-branches/osh-js",
"version": "2.2.0-mcs+0001",
"name": "@osh/osh-js",
"version": "3.1.5",
"description": "OSH javascript Toolkit",
"main": "core/OSH.js",
"main": "source/core/OSH.js",
"repository": {
"type": "git",
"url": "git+https://github.com/opensensorhub/osh-js.git"
Expand All @@ -27,6 +27,8 @@
"access": "public"
},
"scripts": {
"test": "jest",
"test:bundlers": "bash tests/bundler/test-bundlers.sh",
"build": "webpack --config webpack.config.js --mode production",
"documentation": "yarn --cwd jsdoc/ clean && yarn --cwd jsdoc/ install && yarn --cwd jsdoc/ all",
"vuepress": "yarn install && shx rm -fr vuepress/docs/dist; yarn --cwd vuepress/docs prod",
Expand All @@ -41,29 +43,32 @@
"build-lib": "yarn prepare-lib && yarn copy-sources-lib && yarn transpile-lib && node config/prepare-lib && tar -czvf osh-js.tar.gz dist/* && mv osh-js.tar.gz ./dist"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@types/linkify-it": "3.0.5",
"@types/markdown-it": "^14.1.1",
"babel-jest": "^30.2.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.2",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.11.0",
"empty-module": "0.0.2",
"file-loader": "^5.1.0",
"jsdoc": "^4.0.3",
"jest": "^30.2.0",
"moment": "^2.24.0",
"npm-install-webpack-plugin": "^4.0.5",
"null-loader": "^3.0.0",
"patch-package": "^6.2.2",
"shx": "^0.3.3",
"strip-ansi": "^6.0.0",
"style-loader": "^1.1.3",
"style-loader": "^4.0.0",
"typescript": "^4.3.5",
"uglifyjs-webpack-plugin": "^2.2.0",
"unminified-webpack-plugin": "^2.0.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"vite": "^6.2.0",
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1",
"webpack-node-externals": "^1.7.2",
"wnumb": "^1.2.0",
"worker-loader": "^2.0.0",
"worker-plugin": "^4.0.2"
},
"dependencies": {},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"wnumb": "^1.2.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {EventType} from 'osh-js/core/event/EventType';
// #region snippet_datasource_sweapifetch
import SweApiFetch from "osh-js/core/datasource/sweapi/SweApi.datasource.js";
// #region snippet_datasource_consysapi
import ConSysApi from "osh-js/core/datasource/consysapi/ConSysApi.datasource.js";
import {Mode} from "osh-js/core/datasource/Mode";

let gpsDataSource = new SweApiFetch("android-GPS", {
let gpsDataSource = new ConSysApi("android-GPS", {
endpointUrl: 'api.georobotix.io/ogc/t18/api',
resource: '/datastreams/o7pce3e60s0ie/observations',
tls: true,
Expand All @@ -15,7 +15,7 @@ let gpsDataSource = new SweApiFetch("android-GPS", {
mode : Mode.REAL_TIME
});

// #endregion snippet_datasource_sweapifetch
// #endregion snippet_datasource_consysapi

gpsDataSource.subscribe(async (message) => {
let dataEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
// Tell Webpack which file kicks off our app.
entry: path.resolve(__dirname,'./datasource-sweapifetch.js'),
entry: path.resolve(__dirname,'./datasource-consysapi.js'),
// Tell Weback to output our bundle to ./dist/bundle.js
output: {
filename: 'bundle.datasource.sweapifetch.js',
filename: 'bundle.datasource.consysapi.js',
path: path.resolve(__dirname, 'dist')
},
// Tell Webpack which directories to look in to resolve import statements.
Expand Down Expand Up @@ -53,7 +53,7 @@ module.exports = {
compress: true,
port: 9000,
hot: true,
index: 'datasource-sweapifetch.html',
index: 'datasource-consysapi.html',
https:true
},
devtool: 'source-map',
Expand All @@ -74,8 +74,8 @@ module.exports = {
// by the Webpack dev server. We can give it a template file (written in EJS)
// and it will handle injecting our bundle for us.
new HtmlWebpackPlugin({
filename: "datasource-sweapifetch.html",
template: path.resolve(__dirname, 'datasource-sweapifetch.html')
filename: "datasource-consysapi.html",
template: path.resolve(__dirname, 'datasource-consysapi.html')
}),
new CopyWebpackPlugin([
{ from: path.resolve(__dirname,'data'), to: 'data'}
Expand Down
82 changes: 82 additions & 0 deletions showcase-dev/examples/datasource-geojson/data/data.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions showcase-dev/examples/datasource-geojson/datasource-geojson.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<style>
.file {
padding: 5px;
max-height: 250px;

overflow: auto;
}

body, html {
margin: 0;
padding: 0;
overflow: auto;
}
</style>
<div class="text file">
<pre id="datasource-file"><code id="json-container">No DATA</code></pre>
</div>
<div id="container"></div>
80 changes: 80 additions & 0 deletions showcase-dev/examples/datasource-geojson/datasource-geojson.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import File from 'osh-js/ext/datasource/file/File.datasource';
import {EventType} from 'osh-js/core/event/EventType';
// create data source for Android phone GPS
import SosGetResult from 'osh-js/core/datasource/sos/SosGetResult.datasource.js';
import PointMarkerLayer from 'osh-js/core/ui/layer/PointMarkerLayer.js';
import PolylineLayer from 'osh-js/core/ui/layer/PolylineLayer.js';
import DeckGlView from 'osh-js/core/ui/view/map/DeckGlView.js';
import {TileLayer} from '@deck.gl/geo-layers';
import {BitmapLayer} from '@deck.gl/layers';
import {Mode} from 'osh-js/core/datasource/Mode';
import GeoJSON from "osh-js/ext/ui/layer/GeoJSON";
import DeckGlViewGeoJSON from "osh-js/ext/ui/view/DeckGlGeoJSON";


const NB_FILES = 8;
const files = ['./data/data.json'];

const fileDatasource = new File('GeoJSON',{
paths: files,
batchSize: 5000
});

let geojsonLayer = new GeoJSON({
dataSourceId: fileDatasource.id,
getData: (rec) => {
console.log(rec);
return rec.data;
},
});

let deckglMapView = new DeckGlViewGeoJSON({
container: "container",
layers: [geojsonLayer],
deckProps: {
initialViewState: {
longitude: -122.28363249999997,
latitude: 37.87402129999999,
zoom: 13,
bearing: 0,
pitch: 20
},
layers: [
new TileLayer({
// https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Tile_servers
data: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
minZoom: 0,
maxZoom: 19,
tileSize: 256,

renderSubLayers: props => {
const {
bbox: {west, south, east, north}
} = props.tile;

return new BitmapLayer(props, {
data: null,
image: props.data,
bounds: [west, south, east, north]
});
}
}),
]
},
autoZoomOnFirstMarker: false
}
);

const container = document.getElementById('json-container');
fileDatasource.subscribe(async (message) => {
let dataEvent;
for (let i = 0; i < message.values.length; i++) {
dataEvent = message.values[i];
const str = JSON.stringify(dataEvent.data,null,2);
container.innerHTML = str;
}
}, [EventType.DATA]);


// start streaming onclick
fileDatasource.connect();
Loading