redislabs / geo.lua Goto Github PK
View Code? Open in Web Editor NEWA helper library for Redis geospatial indices
License: Other
A helper library for Redis geospatial indices
License: Other
I'm not very familiar with calling Lua scripts in Redis and had trouble getting commands to work.
An easy to follow example might help:
redis> GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"
$ redis-cli SCRIPT LOAD "$(cat geo.lua)"
$ redis-cli EVALSHA fd07... 0 help
The calls I tried below gave me errors. I'm not sure what i'm doing wrong and I tried various combinations but no luck.
$ redis-cli EVALSHA fd07... 0 GEOBEARING Sicily "Catania" "Palermo"
No geoset key name provided
$ redis-cli EVALSHA fd07... 1 GEODEL Sicily "Catania"
Unknown command SICILY
By combining any search and real-time location updates
When trying to add a polygon using GEOJSONPOLYADD I get this error:
(error) ERR Error running script (call to f_00246cc50061d17a18f65f3b32eaf921e6902d69): @user_script:548: user_script:548: attempt to call field '_polygonencode' (a nil value)
Looking in the source I found that there is a call to Geo._polygonencode, however such function does not exist.
Also, in the documentation there is no mention of GEOJSONPOLYADD, I tried to use GEOJSONADD to add a polygon and it failed with the error:
@user_script:516: user_script:516: Feature geometry must be a Point
Then I've found the GEOJSONPOLYADD command in the source code.
Thanks,
Kirill.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.