Home
Learn NetLogo
What is NetLogo? Tutorial #0 Sample Model Tutorial #1 Models Tutorial #2 Commands Tutorial #3 Procedures
Documentation
NetLogo Dictionary Interface Guide Interface Tab Guide Info Tab Guide Code Tab Guide Programming Guide Transition Guide Preferences Guide Version History
Advanced Tools
Extension Manager Shapes Editor BehaviorSpace System Dynamics HubNet HubNet Authoring Logging Controlling Mathematica Link NetLogo 3D Cluster Computing (HPC)
Extensions
Extensions Guide Arduino Array Bitmap CSV GIS GoGo LevelSpace Matrix Networks Palette Profiler Python Resource Rnd Sound Simple R Table Time Vid View2.5D
FAQ
Home
Learn NetLogo
What is NetLogo? Tutorial #0 Sample Model Tutorial #1 Models Tutorial #2 Commands Tutorial #3 Procedures
Documentation
NetLogo Dictionary Interface Guide Interface Tab Guide Info Tab Guide Code Tab Guide Programming Guide Transition Guide Preferences Guide Version History
Advanced Tools
Extension Manager Shapes Editor BehaviorSpace System Dynamics HubNet HubNet Authoring Logging Controlling Mathematica Link NetLogo 3D Cluster Computing (HPC)
Extensions
Extensions Guide Arduino Array Bitmap CSV GIS GoGo LevelSpace Matrix Networks Palette Profiler Python Resource Rnd Sound Simple R Table Time Vid View2.5D
FAQ
primitive: gis:create-turtles-from-points
GIS Extension Dictionary
  • No items found

gis:create-turtles-from-points

gis:create-turtles-from-points vector-dataset breed commands

For each point in a VectorDataset of points, create a turtle of the specified breed at the point’s location. For each agent variable (as defined in <breeds>-own), if there is a property with the same name in the dataset, set that variable’s value to be the value of that property. Finally, execute any commands in the optional command block. To use generic turtles as the chosen breed, simply supply turtles as the breed argument.

Property names and variable names are compared case-insensitively. Keep in mind that when importing shapefiles, property names may be modified for backwards compatibility reasons. The names given by gis:property-names can always be trusted as authoritative. For manually specifying a mapping between property names and variable names, see the create-turtles-from-points-manual primitive.

For multi-point datasets, a turtle is created at each point of multi-point feature, each with the same set of variable values.

Built-in variables such as “label” and “heading” are supported. NetLogo color numeric representations are supported for setting “color” and “label-color”, as well as the 15 default color string representations (“red”, “blue”, “black”, etc.).

As an example: say you wanted to create a turtle of breed “cities/city” for each city in a dataset of cities like the one included in the “GIS General Examples” model from the models library. The cities dataset has four properties, “NAME”, “COUNTRY”, “POPULATION”, and “CAPITAL”. To map them all to NetLogo turtle variables and set their shapes to circles, you could do this:

extensions [gis]
breed
[cities city]
cities-own
[name country population capital]
globals
[cities-dataset]

to
setup
set cities-dataset gis:load-dataset "cities.shp"
gis:create-turtles-from-points cities-dataset cities [
set shape "circle"
]
end

Take me to the full GIS Extension Dictionary.

GIS Extension Dictionary: create-raster

Documentation for the create-raster primitive.

GIS Extension Dictionary: create-turtles-from-points-manual

Documentation for the create-turtles-from-points-manual primitive.


NetLogo is a programmable modeling environment for simulating natural and social phenomena. It was authored by Uri Wilensky in 1999 and has been in continuous development ever since at the Center for Connected Learning and Computer-Based Modeling.

Related Links
  • NetLogo Home
  • CCL Home
  • NetLogo Web
  • NetTango Web
  • NetLogo 3D
  • BehaviorSearch
  • Contact Us

Copyright © 1999-2025 Uri Wilensky and the Center for Connected Learning and Computer-Based Modeling at Northwestern University . All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License , or (at your option) any later version.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at netlogo-commercial-admin@ccl.northwestern.edu .

For more information, visit the NetLogo website .