我目前正在使用NetLogo中的一个模型来模拟一些农场的土地使用变化。为此,我需要在NetLogo中使用地理信息系统扩展。我远没有一个模特在跑步,但我想知道我的模特最好的方法是:
(1)使用带有农场边界的shapefile,并将其与其他栅格地图(如欧几里得距市场的距离)覆盖起来。
或
(2)使用带有代表农场的单元ID的栅格。这样,我就可以在属性和其他栅格映射之间有一个完美的重叠。
提前谢谢你!
发布于 2016-03-24 11:43:53
到一天结束时,这是解决问题的最好方法:
extensions [gis]
globals
[
land-use-map
lotid-patch-map
def-risk-map
market-dist-map
]
patches-own
[
land-use
lotid-patch
def-risk
market-dist
]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; load the maps ;;
;;;;;;;;;;;;;;;;;;;;;
to load-gis
clear-all
set land-use-map gis:load-dataset "area2_lu_black.asc" ;loads the land use map
set lotid-patch-map gis:load-dataset "area2_lot.asc" ;loads the lots map
set def-risk-map gis:load-dataset "area2_risk.asc" ;loads the deforestation risk map
set market-dist-map gis:load-dataset "area2_mkt.asc" ;loads the distance from markets map
gis:set-world-envelope-ds gis:envelope-of land-use-map ;sets the envelope of the world to match that of the GIS dataset
gis:apply-raster land-use-map land-use ;patches in the land-use-map have a specific land-use now
gis:apply-raster lotid-patch-map lotid-patch ;patches in the lot-id-map have a specific lot-id now
gis:apply-raster def-risk-map def-risk ;patches in the def-risk-map have a specific def-risk now
gis:apply-raster market-dist-map market-dist ;patches in the market-dist-map have a specific market-dist now
ask patches [
if land-use = 1 [ set pcolor 64 ] ; Green = Forest
if land-use = 2 [ set pcolor 14 ] ; Dark red = Agriculture
if land-use = 3 [ set pcolor 45 ] ; Yellow = Reforestation
]
let view gis:load-dataset "area2.shp" ;load a shapefile of the properties
gis:set-world-envelope-ds gis:envelope-of view
foreach gis:feature-list-of view
[
gis:set-drawing-color white ;draws the line of the shapefile
gis:draw ? 1
]
end
发布于 2015-10-05 23:58:48
我怀疑答案取决于您打算如何使用GIS文件中包含的信息。我真正能说的是,你收集了一些人们集成GIS的方式,看看什么看起来最相似。这是你的第一个例子。
我最近有一个模型,它有一个强大的空间成分来传播一种流行病。传染病的传染性受到人口的强烈影响。我在分区域一级获得了我在模型中的所有国家的人口密度(下拉框选择该国)作为光栅文件。当补丁信息有效地调整栅格大小时,将其导入NetLogo。然后,我将NetLogo补丁转换为真实世界的平方公里(每个国家),为每个NetLogo补丁创建人口。
https://stackoverflow.com/questions/32955515
复制相似问题