geohash.json 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. {
  2. "about": {
  3. "trial": false,
  4. "author": {
  5. "name": "EMQ",
  6. "email": "contact@emqx.io",
  7. "company": "EMQ Technologies Co., Ltd",
  8. "website": "https://www.emqx.io"
  9. },
  10. "helpUrl": {
  11. "en_US": "https://ekuiper.org/docs/en/latest/sqls/custom_functions.html",
  12. "zh_CN": "https://ekuiper.org/docs/zh/latest/sqls/custom_functions.html"
  13. },
  14. "description": {
  15. "en_US": "",
  16. "zh_CN": ""
  17. }
  18. },
  19. "libs": ["github.com/mmcloughlin/geohash@master"],
  20. "name":"geohash",
  21. "functions": [{
  22. "name": "geohashEncode",
  23. "example": "geohashEncode(la,lo)",
  24. "hint": {
  25. "en_US": "Encode latitude and longitude as characters",
  26. "zh_CN": "将经纬度编码为字符"
  27. },
  28. "args": [
  29. {
  30. "name": "la",
  31. "hidden": true,
  32. "optional": false,
  33. "control": "text",
  34. "type": "string",
  35. "hint": {
  36. "en_US": "Input la",
  37. "zh_CN": "输入经度"
  38. },
  39. "label": {
  40. "en_US": "Input la",
  41. "zh_CN": "输入经度"
  42. }
  43. },
  44. {
  45. "name": "lo",
  46. "hidden": true,
  47. "optional": false,
  48. "control": "text",
  49. "type": "string",
  50. "hint": {
  51. "en_US": "Input lo",
  52. "zh_CN": "输入纬度"
  53. },
  54. "label": {
  55. "en_US": "Input lo",
  56. "zh_CN": "输入纬度"
  57. }
  58. }
  59. ],
  60. "return": {
  61. "type": "int",
  62. "hint": {
  63. "en_US": "Encoded string",
  64. "zh_CN": "编码字符"
  65. }
  66. },
  67. "node": {
  68. "category": "function",
  69. "icon": "iconPath",
  70. "label": {
  71. "en_US": "geohashEncode",
  72. "zh_CN": "geohashEncode"
  73. }
  74. }
  75. }, {
  76. "name": "geohashEncodeInt",
  77. "example": "geohashEncodeInt(la,lo )",
  78. "hint": {
  79. "en_US": "Encode latitude and longitude as numbers",
  80. "zh_CN": "将经纬度编码为数字"
  81. },
  82. "args": [
  83. {
  84. "name": "la",
  85. "hidden": true,
  86. "optional": false,
  87. "control": "text",
  88. "type": "string",
  89. "hint": {
  90. "en_US": "Input la",
  91. "zh_CN": "输入经度"
  92. },
  93. "label": {
  94. "en_US": "Input la",
  95. "zh_CN": "输入经度"
  96. }
  97. },
  98. {
  99. "name": "lo",
  100. "hidden": true,
  101. "optional": false,
  102. "control": "text",
  103. "type": "string",
  104. "hint": {
  105. "en_US": "Input lo",
  106. "zh_CN": "输入纬度"
  107. },
  108. "label": {
  109. "en_US": "Input lo",
  110. "zh_CN": "输入纬度"
  111. }
  112. }
  113. ],
  114. "return": {
  115. "type": "int",
  116. "hint": {
  117. "en_US": "Encoded value",
  118. "zh_CN": "编码值"
  119. }
  120. },
  121. "node": {
  122. "category": "function",
  123. "icon": "iconPath",
  124. "label": {
  125. "en_US": "geohashEncodeInt",
  126. "zh_CN": "geohashEncodeInt"
  127. }
  128. }
  129. }, {
  130. "name": "geohashDecode",
  131. "example": "geohashDecode(hash )",
  132. "hint": {
  133. "en_US": "Decode characters into latitude and longitude",
  134. "zh_CN": "将字符解码为经纬度"
  135. },
  136. "args": [
  137. {
  138. "name": "data",
  139. "hidden": true,
  140. "optional": false,
  141. "control": "text",
  142. "type": "string",
  143. "hint": {
  144. "en_US": "Input data",
  145. "zh_CN": "输入数据"
  146. },
  147. "label": {
  148. "en_US": "Input data",
  149. "zh_CN": "输入数据"
  150. }
  151. }
  152. ],
  153. "return": {
  154. "type": "struct",
  155. "hint": {
  156. "en_US": "Decoded Value",
  157. "zh_CN": "解码值"
  158. }
  159. },
  160. "node": {
  161. "category": "function",
  162. "icon": "iconPath",
  163. "label": {
  164. "en_US": "geohashDecode",
  165. "zh_CN": "geohashDecode"
  166. }
  167. }
  168. }, {
  169. "name": "geohashDecodeInt",
  170. "example": "geohashDecodeInt(hash)",
  171. "hint": {
  172. "en_US": "Decode numbers into latitude and longitude",
  173. "zh_CN": "将数字解码为经纬度"
  174. },
  175. "args": [
  176. {
  177. "name": "data",
  178. "hidden": true,
  179. "optional": false,
  180. "control": "text",
  181. "type": "string",
  182. "hint": {
  183. "en_US": "Input data",
  184. "zh_CN": "输入数据"
  185. },
  186. "label": {
  187. "en_US": "Input data",
  188. "zh_CN": "输入数据"
  189. }
  190. }
  191. ],
  192. "return": {
  193. "type": "struct",
  194. "hint": {
  195. "en_US": "Decoded Value",
  196. "zh_CN": "解码值"
  197. }
  198. },
  199. "node": {
  200. "category": "function",
  201. "icon": "iconPath",
  202. "label": {
  203. "en_US": "geohashDecodeInt",
  204. "zh_CN": "geohashDecodeInt"
  205. }
  206. }
  207. }, {
  208. "name": "geohashBoundingBox",
  209. "example": "geohashBoundingBox(hash )",
  210. "hint": {
  211. "en_US": "Area for calculating character codes",
  212. "zh_CN": "计算字符编码的区域"
  213. },
  214. "args": [
  215. {
  216. "name": "data",
  217. "hidden": true,
  218. "optional": false,
  219. "control": "text",
  220. "type": "string",
  221. "hint": {
  222. "en_US": "Input data",
  223. "zh_CN": "输入数据"
  224. },
  225. "label": {
  226. "en_US": "Input data",
  227. "zh_CN": "输入数据"
  228. }
  229. }
  230. ],
  231. "return": {
  232. "type": "struct",
  233. "hint": {
  234. "en_US": "Box",
  235. "zh_CN": "区域"
  236. }
  237. },
  238. "node": {
  239. "category": "function",
  240. "icon": "iconPath",
  241. "label": {
  242. "en_US": "geohashBoundingBox",
  243. "zh_CN": "geohashBoundingBox"
  244. }
  245. }
  246. }, {
  247. "name": "geohashBoundingBoxInt",
  248. "example": "geohashBoundingBoxInt(hash)",
  249. "hint": {
  250. "en_US": "Calculate the area of digital coding",
  251. "zh_CN": "计算数字编码的区域"
  252. },
  253. "args": [
  254. {
  255. "name": "data",
  256. "hidden": true,
  257. "optional": false,
  258. "control": "text",
  259. "type": "string",
  260. "hint": {
  261. "en_US": "Input data",
  262. "zh_CN": "输入数据"
  263. },
  264. "label": {
  265. "en_US": "Input data",
  266. "zh_CN": "输入数据"
  267. }
  268. }
  269. ],
  270. "return": {
  271. "type": "int",
  272. "hint": {
  273. "en_US": "Bounding Box",
  274. "zh_CN": "区域编码"
  275. }
  276. },
  277. "node": {
  278. "category": "function",
  279. "icon": "iconPath",
  280. "label": {
  281. "en_US": "geohashBoundingBoxInt",
  282. "zh_CN": "geohashBoundingBoxInt"
  283. }
  284. }
  285. }, {
  286. "name": "geohashNeighbor",
  287. "example": "geohashNeighbor(hash,direction )",
  288. "hint": {
  289. "en_US": "Calculate the neighbor of the corresponding direction of the character encoding",
  290. "zh_CN": "计算字符编码对应方向的邻居"
  291. },
  292. "args": [
  293. {
  294. "name": "hash",
  295. "hidden": true,
  296. "optional": false,
  297. "control": "text",
  298. "type": "string",
  299. "hint": {
  300. "en_US": "Input data",
  301. "zh_CN": "输入数据"
  302. },
  303. "label": {
  304. "en_US": "Input data",
  305. "zh_CN": "输入数据"
  306. }
  307. },
  308. {
  309. "name": "direction",
  310. "hidden": true,
  311. "optional": false,
  312. "control": "text",
  313. "type": "string",
  314. "hint": {
  315. "en_US": "Input direction",
  316. "zh_CN": "输入数据"
  317. },
  318. "label": {
  319. "en_US": "Input direction",
  320. "zh_CN": "输入数据"
  321. }
  322. }
  323. ],
  324. "return": {
  325. "type": "string",
  326. "hint": {
  327. "en_US": "Neighbor",
  328. "zh_CN": "相邻位置"
  329. }
  330. },
  331. "node": {
  332. "category": "function",
  333. "icon": "iconPath",
  334. "label": {
  335. "en_US": "geohashNeighbor",
  336. "zh_CN": "geohashNeighbor"
  337. }
  338. }
  339. }, {
  340. "name": "geohashNeighborInt",
  341. "example": "geohashNeighborInt(hash,direction )",
  342. "hint": {
  343. "en_US": "Calculate the neighbors in the corresponding direction of the digital code",
  344. "zh_CN": "计算数字编码对应方向的邻居"
  345. },
  346. "args": [
  347. {
  348. "name": "hash",
  349. "hidden": true,
  350. "optional": false,
  351. "control": "text",
  352. "type": "string",
  353. "hint": {
  354. "en_US": "Input data",
  355. "zh_CN": "输入数据"
  356. },
  357. "label": {
  358. "en_US": "Input data",
  359. "zh_CN": "输入数据"
  360. }
  361. },
  362. {
  363. "name": "direction",
  364. "hidden": true,
  365. "optional": false,
  366. "control": "text",
  367. "type": "string",
  368. "hint": {
  369. "en_US": "Input direction",
  370. "zh_CN": "输入数据"
  371. },
  372. "label": {
  373. "en_US": "Input direction",
  374. "zh_CN": "输入数据"
  375. }
  376. }
  377. ],
  378. "return": {
  379. "type": "string",
  380. "hint": {
  381. "en_US": "Neighbor",
  382. "zh_CN": "相邻位置编码"
  383. }
  384. },
  385. "node": {
  386. "category": "function",
  387. "icon": "iconPath",
  388. "label": {
  389. "en_US": "geohashNeighborInt",
  390. "zh_CN": "geohashNeighborInt"
  391. }
  392. }
  393. }, {
  394. "name": "geohashNeighbors",
  395. "example": "geohashNeighbors(hash)",
  396. "hint": {
  397. "en_US": "Calculate all neighbors of character encoding",
  398. "zh_CN": "计算字符编码的所有邻居"
  399. },
  400. "args": [
  401. {
  402. "name": "hash",
  403. "hidden": true,
  404. "optional": false,
  405. "control": "text",
  406. "type": "string",
  407. "hint": {
  408. "en_US": "Input data",
  409. "zh_CN": "输入数据"
  410. },
  411. "label": {
  412. "en_US": "Input data",
  413. "zh_CN": "输入数据"
  414. }
  415. }
  416. ],
  417. "return": {
  418. "type": "array",
  419. "hint": {
  420. "en_US": "All Neighbor",
  421. "zh_CN": "所有相邻位置"
  422. }
  423. },
  424. "node": {
  425. "category": "function",
  426. "icon": "iconPath",
  427. "label": {
  428. "en_US": "geohashNeighbors",
  429. "zh_CN": "geohashNeighbors"
  430. }
  431. }
  432. }, {
  433. "name": "geohashNeighborsInt",
  434. "example": "geohashNeighborsInt(hash)",
  435. "hint": {
  436. "en_US": "Calculate all neighbors of digital encoding",
  437. "zh_CN": "计算数字编码的所有邻居"
  438. },
  439. "args": [{
  440. "name": "hash",
  441. "hidden": true,
  442. "optional": false,
  443. "control": "text",
  444. "type": "string",
  445. "hint": {
  446. "en_US": "Input data",
  447. "zh_CN": "输入数据"
  448. },
  449. "label": {
  450. "en_US": "Input data",
  451. "zh_CN": "输入数据"
  452. }
  453. }
  454. ],
  455. "return": {
  456. "type": "array",
  457. "hint": {
  458. "en_US": "All Neighbor",
  459. "zh_CN": "所有相邻位置编码"
  460. }
  461. },
  462. "node": {
  463. "category": "function",
  464. "icon": "iconPath",
  465. "label": {
  466. "en_US": "geohashNeighbors",
  467. "zh_CN": "geohashNeighbors"
  468. }
  469. }
  470. }]
  471. }