hive 查詢多邊形範圍內的點

查詢閉合圖形區間內的數據

select * from table where col1 like 'YGeo@fl=mortonhash&shape=polygon&lon=10,170,170,10,10&lat=60,60,2,2,60'

前提是存儲的時候將經緯度轉爲mortonhash格式

col1  匹配經緯度轉化字段

lon  經度(閉合區間的經度列表,閉合區間,首尾必須相同)

lat 緯度 (閉合區間的緯度列表,首尾必須相同)

shape=polygon  形狀 = 多邊形

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章