From bfb681dffde48ac5f06cb853f693b9673c7cca52 Mon Sep 17 00:00:00 2001 From: Daniel Mangum Date: Wed, 20 Nov 2024 18:37:50 -0500 Subject: [PATCH 1/2] Add HERE positioning webhook example Adds a pipeline example for HERE's Positioning API. Signed-off-by: Daniel Mangum --- .../5-examples/22-HERE-positioning.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/data-routing/5-examples/22-HERE-positioning.md diff --git a/docs/data-routing/5-examples/22-HERE-positioning.md b/docs/data-routing/5-examples/22-HERE-positioning.md new file mode 100644 index 00000000..b64cc10c --- /dev/null +++ b/docs/data-routing/5-examples/22-HERE-positioning.md @@ -0,0 +1,56 @@ +--- +title: HERE Positioning +--- +import Pipeline from '@site/src/components/usethispipeline' + +[HERE](https://www.here.com/) builds mapping and data tools for enterprises. +HERE's [Positioning API](https://www.here.com/platform/positioning) brings +high-precision location awareness to apps and devices, even in challenging +outdoor environments. The API can easily be accessed via Pipelines using the +[`webhook` transformer](/data-routing/transformers/webhook). + +The following example demonstrates using the HERE Positioning API to translate +CBOR Wi-Fi access point data from a device network scan into a position for the +device. The resolved position is delivered to [LightDB +Stream](/application-services/lightdb-stream) as a JSON payload. + +Example network scan data: + +> CBOR data displayed as JSON for documentation purposes only. + +```json +{ + "wlan": [ + { + "mac": "00:18:39:59:8C:53", + "rss": -87 + }, + { + "mac": "00:21:55:61:F3:0A", + "rss": -86 + }, + { + "mac": "00:11:5C:6B:9A:00", + "rss": -71 + } + ] +} +``` + +Example position result: +```json +{ + "location": { + "accuracy": 13, + "lat": 61.4469261, + "lng": 23.86456411 + } +} +``` + +:::info Reminder +Make sure to create a [secret](/data-routing/secrets) named `HERE_URL` with the +appropriate API key credentials. +::: + + From 7038071530df65e0e6f55a783ccf921f7d03cd69 Mon Sep 17 00:00:00 2001 From: Daniel Mangum Date: Wed, 20 Nov 2024 18:38:32 -0500 Subject: [PATCH 2/2] Add Google Geolocation API example Adds a Pipeline example for Google's Geolocation API. Signed-off-by: Daniel Mangum --- .../5-examples/23-google-geolocation.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/data-routing/5-examples/23-google-geolocation.md diff --git a/docs/data-routing/5-examples/23-google-geolocation.md b/docs/data-routing/5-examples/23-google-geolocation.md new file mode 100644 index 00000000..23fd5df4 --- /dev/null +++ b/docs/data-routing/5-examples/23-google-geolocation.md @@ -0,0 +1,60 @@ +--- +title: Google Geolocation +--- +import Pipeline from '@site/src/components/usethispipeline' + +[Google's Geolocation +API](https://developers.google.com/maps/documentation/geolocation/overview) uses +cell tower and Wi-Fi access point data to determine the latitude and longitude +of a device. The API can easily be accessed via Pipelines using the [`webhook` +transformer](/data-routing/transformers/webhook). + +The following example demonstrates using the Google Geolocation API to translate +CBOR Wi-Fi access point data from a device network scan into a position for the +device. The resolved position is delivered to [LightDB +Stream](/application-services/lightdb-stream) as a JSON payload. The +[`json-patch` transformer](/data-routing/transformers/json-patch) is leveraged +to allow for using the same device payload as the [HERE Positioning +example](/data-routing/examples/HERE-positioning) to produce the same JSON +output. + +Example network scan data: + +> CBOR data displayed as JSON for documentation purposes only. + +```json +{ + "wlan": [ + { + "mac": "3c:37:86:5d:75:d4", + "rss": -35 + }, + { + "mac": "30:86:2d:c4:29:d0", + "rss": -35 + }, + { + "mac": "30:22:96:6B:9A:11", + "rss": -22 + } + ] +} +``` + +Example position result: +```json +{ + "location": { + "accuracy": 20, + "lat": 37.4241224, + "lng": -122.0915874 + } +} +``` + +:::info Reminder +Make sure to create a [secret](/data-routing/secrets) named `GOOGLE_GEO_API_URL` +with the appropriate API key credentials. +::: + +