From d09cb886f0fe35c131c78adf81852dca94de953d Mon Sep 17 00:00:00 2001 From: Panos Kalogeropoulos
Date: Fri, 19 Dec 2025 18:41:54 +0200 Subject: [PATCH 1/3] GeoJSON geofencing documentation --- .../geojson-geofencing.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/user-guide/rules-and-forecasting/geojson-geofencing.md diff --git a/docs/user-guide/rules-and-forecasting/geojson-geofencing.md b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md new file mode 100644 index 0000000..80f4790 --- /dev/null +++ b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md @@ -0,0 +1,67 @@ +# GeoJSON Geofencing in OpenRemote Rules + +This document describes how to use GeoJSON geofencing within OpenRemote Rules to create location-based triggers and actions. GeoJSON geofencing allows you to define complex geographical areas using the GeoJSON format and trigger rules based on whether an asset is located within or outside these areas. + +This feature is great for setting complex geofences that go beyond simple circular or rectangular shapes, enabling more precise location-based automation. Think of the borders of a given country, state, or city, or any custom-defined area where assets need to remain in, or out of. + +## Using GeoJSON Geofencing in OpenRemote + +To use GeoJSON geofencing in OpenRemote, follow these steps: + +1. **Define your GeoJSON area:** Create a GeoJSON object representing the geographic area you want to use as a geofence. You can use online tools like [geojson.io](https://geojson.io/) to draw and export GeoJSON geometries. + +2. **Create or edit a rule:** In the OpenRemote console, navigate to the Rules page and create a new when-then rule, or edit an existing one. + +3. **Select an asset and attribute:** In the "when" section, select an asset and attribute that will be used to filter the rule execution. + +4. **Configure the GeoJSON Geofence:** + + * Select either "inside area" or "outside area" for the operator. + * Press the "GeoJSON" button and paste your GeoJSON. The UI provides validation tools to help with this. + +5. **Define Then-actions:** Specify the actions to be performed in the when-section of the area. + +## Example + +Here’s an example of a GeoJSON Polygon, around the area of the Rotterdam default map: + +```json +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + 4.48556382778753, + 51.91779377518452 + ], + [ + 4.479700876335301, + 51.91779377518452 + ], + [ + 4.479700876335301, + 51.91514625782321 + ], + [ + 4.48556382778753, + 51.91514625782321 + ], + [ + 4.48556382778753, + 51.91779377518452 + ] + ] + ], + "type": "Polygon" + } + } + ] +} +``` + +This Polygon defines a simple rectangular area. You can use more complex polygons, MultiPolygons, Features, or FeatureCollections to define more intricate geofences. You can input the exact same GeoJSON into the additional GeoJSON button, in the realm appearance menu, to see the same area highlighted in the various OpenRemote maps. \ No newline at end of file From 9811a544b2c487b0a8fd8f9a4c0631f829a24bac Mon Sep 17 00:00:00 2001 From: Panos Kalogeropoulos
Date: Fri, 19 Dec 2025 18:56:55 +0200 Subject: [PATCH 2/3] Fixes --- docs/user-guide/rules-and-forecasting/geojson-geofencing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/rules-and-forecasting/geojson-geofencing.md b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md index 80f4790..7c76a76 100644 --- a/docs/user-guide/rules-and-forecasting/geojson-geofencing.md +++ b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md @@ -17,9 +17,9 @@ To use GeoJSON geofencing in OpenRemote, follow these steps: 4. **Configure the GeoJSON Geofence:** * Select either "inside area" or "outside area" for the operator. - * Press the "GeoJSON" button and paste your GeoJSON. The UI provides validation tools to help with this. + * In the operator configuration panel, click the "GeoJSON" button and paste your GeoJSON into the text field. The UI provides validation tools to help with this. -5. **Define Then-actions:** Specify the actions to be performed in the when-section of the area. +5. **Define Then-actions:** Specify the actions to be performed in the then-section when the geofence condition (inside or outside the area) is met. ## Example @@ -64,4 +64,4 @@ Here’s an example of a GeoJSON Polygon, around the area of the Rotterdam defau } ``` -This Polygon defines a simple rectangular area. You can use more complex polygons, MultiPolygons, Features, or FeatureCollections to define more intricate geofences. You can input the exact same GeoJSON into the additional GeoJSON button, in the realm appearance menu, to see the same area highlighted in the various OpenRemote maps. \ No newline at end of file +This Polygon defines a simple rectangular area. You can use more complex polygons, MultiPolygons, Features, or FeatureCollections to define more intricate geofences. You can input the exact same GeoJSON into the additional GeoJSON button, in the realm appearance menu, to see the same area highlighted on the various OpenRemote maps. From b58adf1f01ffc5b81191d5f859b3cac1fd23f47d Mon Sep 17 00:00:00 2001 From: Panos Kalogeropoulos
Date: Mon, 22 Dec 2025 15:24:01 +0200 Subject: [PATCH 3/3] Fixes --- docs/user-guide/rules-and-forecasting/geojson-geofencing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/rules-and-forecasting/geojson-geofencing.md b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md index 7c76a76..802ac2e 100644 --- a/docs/user-guide/rules-and-forecasting/geojson-geofencing.md +++ b/docs/user-guide/rules-and-forecasting/geojson-geofencing.md @@ -17,7 +17,7 @@ To use GeoJSON geofencing in OpenRemote, follow these steps: 4. **Configure the GeoJSON Geofence:** * Select either "inside area" or "outside area" for the operator. - * In the operator configuration panel, click the "GeoJSON" button and paste your GeoJSON into the text field. The UI provides validation tools to help with this. + * In the configuration panel, click the "GeoJSON" button and paste your GeoJSON into the text field. The UI provides validation tools to help with this. 5. **Define Then-actions:** Specify the actions to be performed in the then-section when the geofence condition (inside or outside the area) is met. @@ -64,4 +64,4 @@ Here’s an example of a GeoJSON Polygon, around the area of the Rotterdam defau } ``` -This Polygon defines a simple rectangular area. You can use more complex polygons, MultiPolygons, Features, or FeatureCollections to define more intricate geofences. You can input the exact same GeoJSON into the additional GeoJSON button, in the realm appearance menu, to see the same area highlighted on the various OpenRemote maps. +This Polygon defines a simple rectangular area. You can use more complex polygons, MultiPolygons, Features, or FeatureCollections to define more intricate geofences. You can input the same GeoJSON as custom GeoJSON styling in "Appearance -> Map Settings -> GeoJSON", to see the same area highlighted on the various OpenRemote maps.