简体   繁体   English

道路等时线的创建和可视化。距离警察局的网络间隔:2、5、10、15 分钟,如果移动速度为 40 公里/小时

[英]Creation and visualization of isochrones in the road network from the police station in intervals: 2,5,10,15 min, if the speed of movement is 40km/h

Here is the code which I have created for interval 2minutes这是我为间隔 2 分钟创建的代码

select ways.the_geom from                     
(WITH distance_query AS (
  SELECT *, 
         (length / 1000) / (30 / 3600) AS time_in_seconds
  FROM ways
)
SELECT * FROM 
pgr_drivingDistance('SELECT gid as id, 
                     source, target, 
                     cost FROM ways',
                    2338,
                    120)) as route 
left outer join ways ways 
  on ways.gid = route.edge  

The problem is, when I change the seconds(intervals) from 120 to 300, I get the same results always, I will be very grateful if anyone can help me!问题是,当我将秒数(间隔)从 120 更改为 300 时,我总是得到相同的结果,如果有人能帮助我,我将不胜感激!

The query is looking for points, but joining on edges.查询正在寻找点,但在边上加入。

Change the join condition to on ways.gid = route.node将加入条件改为on ways.gid = route.node

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM