Comments (5)
Try
SETCHAN channelFord INTERSECTS cars WHERE 'info.brand == "ford"' FENCE DETECT inside,outside [...]
With this command the result was the same
from tile38.
The WHERE clause is considered to be part of the geofence constraint.
Basically the INTERSECTS command you are providing says:
For all cars that are inside of the provided polygon and are a ford, send an "inside" event, otherwise send an "outside" event.
Perhaps using "enter,exit" instead of "inside,outside" will give you better results, because an "exit" event cannot happen unless the car was previously considered inside.
from tile38.
My bad, I overlooked your inside,outside
Using a channel like so:
SETCHAN channelFord INTERSECTS cars WHERE 'info.brand == "ford"' FENCE DETECT enter,exit OBJECT {"type":"Polygon","coordinates":[[[-87.6875402606167,41.91766993152294],[-87.6875402606167,41.91053637115587],[-87.67749935516063,41.91053637115587],[-87.67749935516063,41.91766993152294],[-87.6875402606167,41.91766993152294]]]}
works as expected on ford vehicles, but ignores everything else.
>> 127.0.0.1:9851> SET cars ABC1234 FIELD info {"brand":"ford","year":"2010"} POINT 41.91323014924143 -87.68240968749839
>> {"ok":true,"elapsed":"1.109292ms"}
>> {"command":"set","group":"64ef2d1716fcd30001286d1d","detect":"enter","hook":"channelFord","key":"cars","time":"2023-08-30T11:50:46.999727689Z","id":"ABC1234","object":{"type":"Point","coordinates":[-87.68240968749839,41.91323014924143]},"fields":{"info":{"brand":"ford","year":"2010"}}}
>> SET cars DEF5678 FIELD info {"brand":"bmw","year":"2012"} POINT 41.91323014924143 -87.68240968749839
{"ok":true,"elapsed":"235.875µs"}
>>
from tile38.
Try
SETCHAN channelFord INTERSECTS cars WHERE 'info.brand == "ford"' FENCE DETECT inside,outside [...]
from tile38.
Got it, thanks for the help guys.
Enter, exit really works
I will use enter, exit
from tile38.
Related Issues (20)
- include z difference in fence test
- Major slowdowns writing to tile38 HOT 2
- AUTH should not be dependent on dataset loading
- PING when loading data has a different behavior on tile38 vs redis HOT 2
- tile38_version and redis_version need to be different HOT 1
- WHEREIN is not returning the correct count when field key is mixed case
- Add support for 'none' authentication for kafka while still allowing SSL HOT 1
- Wrong region name parsing for AWS China
- Tile38 Nearby Does not produce results as expected HOT 5
- Sysdig found high severity vulnerabilities in the dependencies of release 1.32.0 HOT 1
- How to set up a speed limit fence, where speed is within a certain range HOT 3
- Panic in tile38 causing server crash due to bug in geojson HOT 2
- Ui HOT 3
- tile38_expired_keys is never returned
- RESP response encodes all field values as strings, JSON retains types of fields HOT 9
- WHERE clause with nested properties not working HOT 1
- Different geofences listening to the same collection (but with a WHERE filter) emit an event at the same time
- Tile38 does not support EXISTS command. HOT 2
- FSET does not have a FGET counterpoint HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tile38.