【问题标题】:Histogram from streets coordinates in NetlogoNetlogo中街道坐标的直方图
【发布时间】:2017-02-04 13:20:08
【问题描述】:

我在 Netlogo 中加载了一个带有街道末端坐标的 GIS shapefile。 在做

set nodes-dataset gis:load-dataset "nodes.shp"
show gis:feature-list-of nodes-dataset gives me the list of gis features


[{{gis:VectorFeature ["HIGHWAY":""]["LON":"3.7282846"]["OSMID":"145809"]["LAT":"51.0559224"]}} {{gis:VectorFeature ["HIGHWAY":""]["LON":"3.717492"]["OSMID":"82775029"]["LAT":"51.0563512"]}} {{gis:VectorFeature ["HIGHWAY":""]["LON":"3.7173761"]["OSMID":"82775030"]["LAT":"51.0567027"]}} {{gis:VectorFeature ["HIGHWAY":""]["LON":"3.7182838"]["OSMID":"82775032"]["LAT":"51.0577545"]}} {{gis:VectorFeature ["HIGHWAY":""]["LON":"3.7187206"]["OSMI .....

其中包含每个节点的LAT和LON。

同样,我还将连接这些节点的街道/道路的 shapefile 加载到 Netlogo 中。

有没有办法计算这些节点之间的街道距离?

目的是获取距离列表并用直方图绘制它们。

感谢您的帮助

【问题讨论】:

  • 另一个 shapefile,即带有边缘的文件,具有对之间连接的链接(街道)的属性“LENGTH”。要获得街道的长度,我只需要在列表中收集这些值。 Netlogo gis 扩展有任何形式吗?

标签: gis netlogo shapefile


【解决方案1】:

我将每对节点之间的“长度”作为 shapefile 的 VectorFeatures 的属性。 为了提取我运行的数字

let dim-street []
foreach gis:feature-list-of edges-dataset [ [?1] ->
    set dim-street lput ( read-from-string gis:property-value ?1 "LENGTH" ) dim-street
  ]

【讨论】:

    猜你喜欢
    • 2012-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-07
    • 1970-01-01
    • 1970-01-01
    • 2020-10-07
    • 1970-01-01
    相关资源
    最近更新 更多