Find and copy a particular value from a table to an agent in Netlogo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Find and copy a particular value from a table to an agent in Netlogo

construsol
In a Netlogo model I want to copy to an agent a specific value from an Attribute Table contained in a shp file. For example, I want to know what is the value of HAUN in SUBSECTOR C3 (please see attached image).
 Referring to Netlogo's GIS extension, I have an idea that maybe the gis:feature-list-of command can be used. It outputs the following:
 [
 {{gis:VectorFeature [“SUBSECTOR”:"C1"][“HARE”:"0”][HAUN:1]}}
 {{gis:VectorFeature [“SUBSECTOR”:"C2"][“HARE”:”1”][HAUN:1]}}
 {{gis:VectorFeature [“SUBSECTOR”:"C3"][“HARE”:"0”][HAUN:1]}}
 {{gis:VectorFeature [“SUBSECTOR”:"C4"][“HARE”:"0”][HAUN:1]}}
]
 
 But then, how can the query be done? or can it be done with another command? and after finding the value, how to copy it to a patch or breed? Thanks for any help.
 


Captura de pantalla 2017-12-05 a las 10.30.17.png (45K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Find and copy a particular value from a table to an agent in Netlogo

construsol
Sorry, here is the image of my previous mail:

 https://i.stack.imgur.com/e2odq.png https://i.stack.imgur.com/e2odq.png 

 Thanks in advance for any help.