Import_shp_File_OSU

No preview image

1 collaborator

Default-person Joshua Lee (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3.1 • Viewed 411 times • Downloaded 42 times • Run 0 times
Download the 'Import_shp_File_OSU' 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 ]

globals [building-dataset
         pavement-dataset]

breed [ building-labels building-label]
breed [ pavement-labels pavement-label]

to set-up
  clear-all
  set building-dataset gis:load-dataset "/Users/student/Documents/Geog5226/lab5/OSU_data/buildings.shp"
  set pavement-dataset gis:load-dataset "/Users/student/Documents/Geog5226/lab5/OSU_data/pavement.shp"
  gis:set-world-envelope (gis:envelope-union-of (gis:envelope-of building-dataset)
                                                (gis:envelope-of pavement-dataset))
  reset-ticks
end 

to display-buildings
 ask building-labels [die]
 gis:set-drawing-color green
 gis:draw building-dataset 1
 if True
 [foreach gis:feature-list-of building-dataset
   [ let centroid gis:location-of gis:centroid-of ?
     if not empty? centroid
     [ create-building-labels 1
       [ set xcor item 0 centroid
         set ycor item 1 centroid
         set size 0
         set label gis:property-value ? "BLDG_NAME"]]]]
end 

to display-pavement
 gis:set-drawing-color orange
 gis:draw pavement-dataset 1
end 

to hide-labels
  ask building-labels
  [hide-turtle]
end 

to show-labels
  ask building-labels
  [show-turtle]
end 

to create-NetLogo-data
  create-buildings
  create-paths
end 

to create-buildings
  hide-labels
  ask patches gis:intersecting building-dataset
  [set pcolor green]
end 

to create-paths
  ask patches gis:intersecting pavement-dataset
  [set pcolor orange]
end 

There is only one version of this model, created over 8 years ago by Joshua Lee.

Attached files

File Type Description Last updated
buildings.shp data OSU_shp over 8 years ago, by Joshua Lee Download
OSU GIS - data loading and creation - shell.nlogo data Importing shp files into net logo over 8 years ago, by Joshua Lee Download
pavement.shp data OSUPavement_shp over 8 years ago, by Joshua Lee Download

This model does not have any ancestors.

This model does not have any descendants.