2016-04-14 61 views
2

屬性在我的NetLogo模型,我在一個形狀文件我怎樣才能獲得代理與shape文件中的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] 

感謝

回答

1

我找到了解決我的問題:

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