如何让代理与 NetLogo 中的 shapefile 的属性进行交互

How can I get agents to interact with the attributes of a shapefile in NetLogo

在我的 NetLogo 模型中,我加载了一个形状文件

set map gis:load-dataset "land_use.shp"
  gis:set-world-envelope gis:envelope-of map

而且我可以根据它们是在水上还是在陆地上为这个形状文件的属性着色,如下所示:

foreach gis:feature-list-of map
[if gis:property-value ? "CODE_12" = "523" [ gis:set-drawing-color blue gis:fill ? 2.0]
if gis:property-value ? "CODE_12" = "522" [ gis:set-drawing-color green  gis:fill ? 2.0]
if gis:property-value ? "CODE_12" = "521" [ gis:set-drawing-color green  gis:fill ? 2.0] ]

完成后,我如何让我的代理根据颜色与补丁进行交互?

例如,在没有 GIS 数据的标准模型中,我可以有类似的东西:

if [pcolor] of patch-here = blue [set size 2] 

谢谢

我找到了问题的解决方案:

to check
let estuaries gis:find-features map "CODE_12" "522"
if gis:intersects? estuaries self [
set color red
]
end