Hi,
Thanks for your interest in NetLogo.
If you have an image file such as a jpeg or png, you can use the bitmap extension
The following code will let you choose an image file and use it to set the patches so that each one represents a pixel from the image.
I have attached a map of Evanston IL, the location of the Center for Connected Learning and Computer-Based Modeling, which brings you NetLogo.
extensions[bitmap]
to setup
ca
let image-file user-file
let image bitmap:import image-file
let height bitmap:height image
let width bitmap:width image
type "height: " print height
type "width: " print width
resize-world 0 width - 1 0 height - 1
set-patch-size 1
import-pcolors-rgb image-file
end
For large or high resolution images the large number of patches may require more memory than is practical for your computer.
For information on model size and increasing memory see this.
If you have access to GIS data for your map you could try the GIS Extension
You can find examples by going to the Models Library NetLogo Menu Files->Models Library.
Type gis in the searchbox in the lower left and you will see two models above which you can double click on and explore – “GIS General Examples” and “GIS Gradient Examples”
Please contact the list again if you have more questions.
Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
netlogo-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/netlogo-users/2ca4f563-50b3-4c1a-95b9-41a08d2a0d52n%40googlegroups.com.