我已经使用GIS扩展名在Netlogo上完成了地图表示,并使用.shp数据集加载了数据。现在我想获得距离b.w两点。
有什么方法可以获取我用蓝色表示的两个测站的距离b.w。距离需要通过道路来计算(例如红线和白线)
extensions [GIS]
globals [
boundaries-gis1
Roads-gis2
Fire_Stations-gis3
waypoints
Buildings-gis4
]
to load
clear-all
set Boundaries-gis1 gis:load-dataset "Boundaries.shp"
set Roads-gis2 gis:load-dataset "Roads.shp"
set Fire_Stations-gis3 gis:load-dataset "Fire_Stations.shp"
set Buildings-gis4 gis:load-dataset "Buildings.shp"
gis:set-world-envelope (gis:envelope-union-of (gis:envelope-of Boundaries-gis1)
(gis:envelope-of Roads-gis2)
(gis:envelope-of Fire_Stations-gis3)
(gis:envelope-of Buildings-gis4)
)
gis:set-drawing-color red
gis:draw Boundaries-gis1 2
gis:set-drawing-color white
gis:draw Roads-gis2 1
gis:set-drawing-color blue
gis:draw Fire_Stations-gis3 5
gis:set-drawing-color pink
gis:draw Buildings-gis4 2
end