With inputPoint AS
(Select st_geomfromtext('POINT(114.19061431884767 22.543833325111848)', 4326) as pnt )
select buffer.* from (
select r.* from road as r,inputPoint as p
where st_intersects(r.geom,ST_Buffer(Geography(p.pnt), 100,'quad_segs=8')::geometry) ) as buffer,inputPoint as p
order by ST_distance(geom,p.pnt) limit 1
————————————————
版权声明:本文为CSDN博主「hey laosha」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/geol200709/article/details/102931463
网友评论