Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add geofencing subscription example #4431

Merged
merged 4 commits into from
Nov 3, 2023
Merged

[Doc] Add geofencing subscription example #4431

merged 4 commits into from
Nov 3, 2023

Conversation

mapedraza
Copy link
Collaborator

Orion documentation lacks a geofencing subscription example, and it is not pretty straightforward from documentation, since it is almost based on queries, not on subscriptions.

Maybe extending this table field here could help:

| `expression` || object| An expression composed of `q`, `mq`, `georel`, `geometry` and `coords` (see [List Entities](#list-entities-get-v2entities) operation above about this field). `expression` and sub elements (i.e. `q`) must have content, i.e. `{}` or `""` is not allowed |

@fgalan what do you think?

@mapedraza mapedraza changed the title Add geofencing example [Doc] Add geofencing subscription example Sep 27, 2023
@fgalan
Copy link
Member

fgalan commented Sep 27, 2023

Expand the examples set is always good :)

However, instead of replacing the existing example with q, I'd suggest to add a new example (copy-paste of the former one and them replace q by the geo-filter).

@fgalan
Copy link
Member

fgalan commented Sep 27, 2023

Maybe extending this table field

What do you mean by "extending the table field"?

@mapedraza
Copy link
Collaborator Author

Maybe extending this table field

What do you mean by "extending the table field"?

Adding something like:

When using a geoquery as notification condition, you must include georel, geometry and coords parameters under expression field. For further information about this parameters check [](LINK TO GEOQUERIES). You can see the following [example](LINK TO GEOFENCING EXAMPLE)

@fgalan
Copy link
Member

fgalan commented Sep 27, 2023

When using a geoquery as notification condition, you must include georel, geometry and coords parameters under expression field

As alternative (probably clearer and simpler):

georel, geometry and coords have to be used together (i.e. "all or nothing").

doc/manuals/orion-api.md Outdated Show resolved Hide resolved
doc/manuals/orion-api.md Outdated Show resolved Hide resolved
Co-authored-by: Fermín Galán Márquez <[email protected]>
"expression": {
"georel": "near;maxDistance:15000",
"geometry": "point",
"coords": "coords": "37.407804, -6.004552"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"coords": "coords": "37.407804, -6.004552"
"coords": "37.407804,-6.004552"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done at e56a7be

Comment on lines 3922 to 3923
"expires": "2025-04-05T14:00:00.00Z",
"throttling": 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"expires": "2025-04-05T14:00:00.00Z",
"throttling": 5
"expires": "2025-04-05T14:00:00.00Z"

Remove also in L3891.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done at e56a7be

@@ -3892,6 +3892,38 @@ Example:
}
```

Example using geoquery as condition:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L3865 should be changed to "Example using attribute filter".

Copy link
Collaborator Author

@mapedraza mapedraza Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done at e56a7be

Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fgalan fgalan merged commit 0489adf into master Nov 3, 2023
12 checks passed
@fgalan fgalan deleted the mapedraza-patch-1 branch November 3, 2023 09:46
@fgalan
Copy link
Member

fgalan commented Nov 3, 2023

@fisuda this PR does some modifications to the documentation. It would be great if you could sync the Japanese translation, please. Thanks in advance!

fisuda added a commit to fisuda/fiware-orion that referenced this pull request Nov 3, 2023
@fisuda
Copy link
Contributor

fisuda commented Nov 3, 2023

I sent the PR #4443. Thanks.

fgalan added a commit that referenced this pull request Nov 3, 2023
(JP) [Doc] Add geofencing subscription example (#4431)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants