siddhi-gpl-execution-geo
The siddhi-gpl-execution-geo extension is an extension to Siddhi that provides geo data related functionality such as checking whether a given geo coordinate is within a predefined geo-fence, etc.
Find some useful links below:
Latest API Docs
Latest API Docs is 5.0.0.
How to use
Using the extension in WSO2 Stream Processor
-
You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.
-
To use this extension, you have to add the component jar in to the
<STREAM_PROCESSOR_HOME>/lib
directory.
Using the extension as a java library
- This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
<dependency>
<groupId>org.wso2.extension.siddhi.gpl-execution-geo</groupId>
<artifactId>siddhi-gpl-execution-geo</artifactId>
<version>x.x.x</version>
</dependency>
Jenkins Build Status
Branch | Build Status |
---|---|
master |
Features
- distance (Function)
This method gives the distance between two geo locations in meters
- intersects (Function)
This function can be called using two sets of parameters.
First method will return true if the incoming event geo.json.geometry intersects the given geo.json.geometryFence else false.
Second method will return true if the location pointed by longitude and latitude intersects the given geo.json.geometryFence else false
Please refer examples - within (Function)
This function can be call using two sets of parameters.
This will returns true if the location specified in terms of longitude and latitude is within the geo.json.geometry.fence.
Or returns true if the geo.json.geometry is within the geo.json.geometry.fence.Returns false otherwise - withinDistance (Function)
This function can be call using two sets of parameters.
First method will returns true if the location specified in terms of longitude and latitude is within distance of the geo.json.geometry.fence. Returns false otherwise.
Second method will return true if the area given by geo.json.geometry is within distance of the geo.json.geometry.fence.
please refer examples - closestPoints (Stream Function)
This will return the closest geo point to the geo.json.geometry.fence
- locationApproximate (Stream Function)
Geo Location Approximation compute the average location of the locationRecorder using the collection iBeacons which the location recorder resides.
- crosses (Stream Processor)
Returns true when the the specified object of which the location is specified in terms of longitude and latitude crosses the geographic location specified in geo.json.geometry.fence. Returns false when the object crosses out of the location specified in geo.json.geometry.fence.
Or Returns true when the object (i.e. geo.json.geometry) crosses the specified geographic location (i.e. geo.json.geometry.fence). Returns false when the object crosses out of geo.json.geometry.fence. - proximity (Stream Processor)
This will returns true when two objects (specified in terms of longitude and latitude) are within the specified radius to another object. Returns false when the specified object moves out of the specified radius. The proximityWith optional attribute indicates the ID of the object that the object specified is in close proximity with. proximityID is a unique ID for the two objects in close proximity.
- stationary (Stream Processor)
Returns true when the object (defined in terms of longitude and latitude) becomes stationary within the specified radius. Returns false when the object moves out of the specified radius.
How to Contribute
-
Please report issues at GitHub Issue Tracker.
-
Send your contributions as pull requests to master branch.
Contact us
-
Post your questions with the "Siddhi" tag in Stackoverflow.
-
Siddhi developers can be contacted via the mailing lists:
Developers List : dev@wso2.org
Architecture List : architecture@wso2.org
Support
-
We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.
-
For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.