Deforestation

No preview image

1 collaborator

Default-person Matteo Sposato (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 5.3.1 • Viewed 89 times • Downloaded 4 times • Run 0 times
Download the 'Deforestation' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

extensions [gis lpsolver]
globals [landcover-dataset roads-dataset water-dataset basin-dataset]
patches-own [landcover14 landcover0 road water basin]
turtles-own []

to setup
  clear-all
  datasets+variables
  reset-ticks
end 

to datasets+variables
  set landcover-dataset gis:load-dataset "lcover.shp"
  set roads-dataset gis:load-dataset "roads.shp"
  set water-dataset gis:load-dataset "water.shp"
  set basin-dataset gis:load-dataset "basin.shp"
  gis:set-world-envelope (gis:envelope-of landcover-dataset)
  gis:set-coverage-minimum-threshold 0
  gis:apply-coverage landcover-dataset "LCOVER" landcover14
  gis:apply-coverage roads-dataset "ROAD" road
  gis:apply-coverage water-dataset "WATER" water
  gis:apply-coverage basin-dataset "BASIN" basin
  ask patches with [ water != "yes" ] [ set water "no" ]
  ask patches with [ basin != "yes" ] [ set basin "no" ]
  ask patches [ if road = "no" and water = "no" [ set landcover0 "FOREST" ] ]
end 

to cover-2014
  ask patches [
    if water = "yes" [ set landcover14 "WATER"  ]
    if landcover14 = "FOREST" [ set pcolor 63 ]
    if landcover14 = "SECONDARY.VEGETATION" [ set pcolor green ]
    if landcover14 = "AGRICULTURE" [ set pcolor orange ]
    if landcover14 = "PASTURE" [ set pcolor yellow  ]
    if landcover14 = "WATER" [ set pcolor sky ]
    if landcover14 = "MIXED" [ set pcolor magenta ]
    if landcover14 = "OTHER" [ set pcolor pink ]
    if road != "no" [ set pcolor white ]
    if (basin = "yes") and (road = "no") and (water = "no") [ set pcolor 67 ]
  ]
end 

to initial-cover
  ask patches [
    if landcover0 = "FOREST" [ set pcolor green - 2 ]
    if road = "yes" [ set pcolor white ]
    if water = "yes" [ set pcolor sky ]
    if (basin = "yes") and (road = "no") and (water = "no") [ set pcolor 67 ]
  ]
end 

There is only one version of this model, created 8 months ago by Matteo Sposato.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.