SELECT
*
FROM
t_dev t
WHERE
ST_DWithin (
ST_geomfromtext ( ‘POINT(’ || t.longitude || ’ ’ || t.latitude || ‘)’ ) :: geography,
ST_geomfromtext ( ‘LINESTRING(’ || ‘113.749888 22.758269,113.748765 22.75924,113.749457 22.758649,113.750405 22.75784’ || ‘)’ ) :: geography,
10)
解析:
t.longitude || ’ ’ || t.latitude 为设备的经纬度信息
‘113.749888 22.758269,113.748765 22.75924,113.749457 22.758649,113.750405 22.75784’
为路径线段信息