Comments (6)
NEARBY with a distance of 0 also works:
NEARBY cities POINT 33.4255 -111.94 0
{"ok":true,"objects":[{"id":"tempe","object":{"type":"Polygon","coordinates":[[[-111.9787,33.4411],[-111.8902,33.4377],[-111.895,33.2892],[-111.9739,33.2932],[-111.9787,33.4411]]]}}],"count":1,"cursor":0,"elapsed":"10.386782ms"}
from tile38.
I finally got around to fixing this issue. You can now issue an INTERSECTS on a point:
INTERSECTS cities OBJECT { "type": "Point", "coordinates": [ -111.9400, 33.4255] }
Though it's not possible to do a WITHIN because a within search find all objects that are fully contained inside of an object. And in your case that a Polygon cannot be fully inside a Point.
Let me know if you run into any problems and thanks for finding this bug.
from tile38.
@windrunner99
In 1.19.3 the behavior of the tile38-cli was changed in order to fix a bug. 66af8ab
It now requires that when an arguments has a space, like the geojson in your example, it must be encapsulated in quotes.
INTERSECTS cities OBJECT '{ "type": "Point", "coordinates": [ -111.9400, 33.4255] }'
from tile38.
WITHIN and INTERSECTS cannot be used with points, only polygons or boundaries. This is a limitation of Tile38. But there are workarounds.
It is possible to use your point if it's represented as a polygon:
INTERSECTS cities OBJECT { "type": "Polygon", "coordinates": [[[ -111.9400,33.4255],[ -111.9400,33.4255],[ -111.9400,33.4255],[ -111.9400,33.4255]]] }
Or you can use the BOUNDS keyword:
INTERSECTS cities BOUNDS 33.4411 -111.9787 33.4411 -111.9787
Finally you can use NEARBY and provide a small sub-meter value:
NEARBY cities POINT 33.4411 -111.9787 0.0001
Tile38 should support the Point type for INTERSECTS and WITHIN. I filed a bug #26.
Thanks for reporting this.
from tile38.
Well that's even better. Thanks for the tip and for reporting this issue.
from tile38.
This does not seem to work anymore. Running this result in:
INTERSECTS cities OBJECT { "type": "Point", "coordinates": [ -111.9400, 33.4255] }
(error) invalid data
Was this revered in a following release?
from tile38.
Related Issues (20)
- To properly support kubernetes & Sentinel. replica_announce properties should be supported HOT 1
- ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context HOT 1
- 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
- SETCHAN with FENCE DETECT inside,outside doesn't work as expected HOT 5
- 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
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.