使海龟移动到gis点 [英] making turtles move to gis points

查看:60
本文介绍了使海龟移动到gis点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我使用GIS形状文件制作了一个netlogo项目.

so im making a netlogo project using GIS shape files.

我有一个大的点层,代表着城市中的餐厅和加油站之类的地方.

i have a big point layer that represent places in a city like restaurants and gas stations.

例如,我需要我的乌龟沿着要点的方向走: 居住区的乌龟弹出去随机的餐厅, 前往最近的加油站,然后回到家.

i need my turtles to go in the direction of the points for example: turtle pops at the housing area go to a random restaurant, heads to the nearst gas station and comes back home.

我找到了在表上运行的"foreach(gis:property-value?)",并根据颜色和objectID对其进行了缩放,以确保其正常工作. 所以现在我可以在列和值上运行,但我不知道如何使乌龟前进到特定点.我可以使其沿点方向或指向其所在面片的方向更改其方向吗?

i found "foreach (gis:property-value ?)" that runs on the table and made the points scale by color and objectID to ensure it works. so now i can run on the column and the value but i dont know how to make a turtle move forward to the specific point. can i make it change its heading in the points direction or its direction to the patch the points sits on?

imkaing项目是一个24小时的模拟,显示了7个城市地区的人口流动.

the project im mkaing is a 24 hour simulation that shows population movement in 7 city districts.

我有一个划分城市的多边形/矢量层,并且我想制作某些地区的海龟,除非采取特殊行动,否则它们将无法离开它们. 有没有办法让特定的海龟停留在多边形/矢量线中?

i have a polygon/vector layers dividing the city and i want to make turtles from certain districts to not be able to leave them unless a special action happens. is there a way to make specific turtles stay in the polygon/vector lines?

推荐答案

我不确定这是否是最好的方法,但是我可能会在每个要成为的地方创建海龟来解决这个问题.代表.我可能会作为一个品种来做,只是有一个属性来说明它是什么类型的地方.您可以隐藏海龟,使它们在界面上不可见.

I am not sure if this is the best way to do it, but I would probably approach this question by creating turtles at each of the places you want to be represented. I'd probably do it as a single breed and just have an attribute that says what type of place it is. You can hide the turtles so they are not visible on the interface.

此方法的优点是,您可以使用所有本地NetLogo原语来执行操作,例如在某个半径范围内找到随机餐厅并向其移动,而不必转换为GIS层.也就是说,您只需要处理一次GIS(创建海龟),这将带来显着的效率优势.

The advantage of this approach is that then you can use all the native NetLogo primitives to do things like find a random restaurant within some radius and move towards it, instead of having to convert to the GIS layer. That is, you would only need to deal with GIS once (to create the turtles), which should deliver significant efficiency benefits.

这篇关于使海龟移动到gis点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆