![]() In this case there should only be one vertex, but use the code in the conventional coincides with a row in the vector layer attributes table. Notice that we need to cycle through the feature list. overwritten once they have been converted into "turtles" of the habitat breed using the The centroids are now drawn on the interface. Check the setup-world-function below for more details. Set centroids gis:load-dataset (word path "NFAnWood_Centroids.shp") Set wood gis:load-dataset (word path "NFAnWood.shp") Set this line to the folder where the data lies. Set path "/home/duncan/Dropbox/Public/netlogo_models/NewForest/" Do not forget the scale fator! 1 km will be 10 units in the model. Links may own the property of distance, if measured. The properties of the habitats could be estended in a more detailed model The scale_factor is the ratio between the width of a netlogo patch and the unit of The global variables include the names that the GIS layers will have when imported In fact it is very important to get this right when loading rasters and setting patch variables from them. it was all taken care of in the "setup-gis-world" function It took me a while to see why this was necessary, as I assumed ![]() There is also a global scale factor that is used to translate meters into So we have "wood" for the polygons and centroids The netlogo lists into which the gis layers are loaded have to be defined as Look for the line where the path is set and change it to the place that you have stored the data in order to run it after unzipping.Įxtensions This makes the gis extension available. So, here is the netlogo model and the data files for download. The draw-polys adds the polygon layer from which the centroids were derived to the display The make-network command (see annotated code below) then joins the points at the given separation distance as shown on the slider in meters. The gis extension has the capability to find the centroids itself, but it is probably better to extract them in GIS first in order to keep everything clear. The setup procedure for the model loads the centroids from the polygons shown in the previous post into netlogo. The example also shows some of the (good and bad) features of the netlogo gis extension that need to be considered when importing vector layers. This is unrealistic in many situations, for all the reasons previously discussed, but it can be useful if each polygon is relatively small in relation to separation distance. However, before moving towards the use of edge to edge based distances I will show a simpler setup in netlogo that uses the absolute distances between polygon centroids. The network could also be used when setting up disaggregated agent based models. Such a network forms the conceptual (and operational) basis of a great number of metapopulation models. The reason for running an analysis that extracts edge to edge distances is to use them when setting up a network of connected nodes for modelling processes on a landscape. In a recent post I showed how to obtain minimum edge to edge distances using PostGIS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |