【发布时间】:2019-08-07 16:43:24
【问题描述】:
我有一个调查位置表
id,from,to,azimuth,x,y
'L1',0,5,120,508776,7098873
'L1',5,10,141,null,null
'L1',10,24,121,null,null
'L2',0,12,135,507882,8020098
'L2',12,15,121,null,null
'L2',15,25,null,null
每行“id”可以有 2 条或更多条记录来定义它们的几何形状。
使用 postgis 查询,假设行开始的 x 和 y 值在 EPSG:3578 中,我如何为每个记录创建线段? 我已经尝试过 LAG 和 LEAD OVER (Partition BY "id" order by "from_m"),但我迷失在所需的递归中。我正在尝试的可能吗?
【问题讨论】:
标签: postgresql postgis survey