geohash.json 9.0 KB

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