我想從GIS擴展中應用柵格加載到Netlogo ascii。 雖然我以前做過很多次了(雖然不是這個特定的ASCII),現在的NetLogo引發以下錯誤:擴展異常:1944553當應用柵格netlogo gis
extension exception: 1944553
error while observer running GIS:APPLY-RASTER
我不知道爲什麼會這樣。 ASCII碼有與它(WKT)投影文件,它應該很好地工作:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
ASCII碼本身有這些參數:
ncols 1481
nrows 1314
xllcorner -10.577897001
yllcorner 49.902509998994
cellsize 0.00833333333333
NODATA_value -9999
我正在這四行裝載ASCII和改變世界。
set my-dataset "data/my-folder/my-file.asc"
resize-world 0 gis:width-of (gis:load-dataset my-dataset) - 1 0 gis:height-of (gis:load-dataset my-dataset) - 1
gis:set-world-envelope-ds (gis:envelope-of (gis:load-dataset my-dataset))
gis:apply-raster (gis:load-dataset my-dataset) my-variable
是否有人熟悉這個錯誤? 還是有一個地方,我可以查找這個擴展異常是什麼意思?我找不到它,但也許我正在尋找錯誤的地方。
謝謝!
編輯: 見下面的錯誤的詳細信息
Extension exception: 1944553
error while observer running GIS:APPLY-RASTER
called by procedure LOAD-DATASETS
called by procedure CREATE-WORLD
called by Button 'create-world'
org.nlogo.nvm.EngineException: Extension exception: 1944553
at org.nlogo.agent.World.fastGetPatchAt(World.java:560)
at org.nlogo.agent.World.fastGetPatchAt(World.java:35)
at org.myworldgis.netlogo.ApplyRaster.performInternal(ApplyRaster.java:53)
at org.myworldgis.netlogo.GISExtension$Command.perform(GISExtension.java:63)
at org.nlogo.prim._extern.perform(_extern.java:54)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
at scala.util.control.Exception$Catch.apply(Exception.scala:88)
at org.nlogo.util.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:75)
NetLogo 5.2.0
main: org.nlogo.app.AppFrame
thread: JobThread
Java HotSpot(TM) Server VM 1.6.0_45 (Sun Microsystems Inc.; 1.6.0_45-b06)
operating system: Windows 7 6.1 (x86 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: test_run_world
03:23:17.778 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0
03:23:17.778 RuntimeErrorEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.app.InterfacePanel$2 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
03:23:17.778 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
這個錯誤在我看來就像是GIS擴展中的問題;該擴展是爲pxcor和/或pycor計算越界值,然後嘗試訪問不存在的補丁。我不知道地理信息系統的東西或擴展的膽量,所以我不能推測爲什麼會這樣。至少,在這種情況下,應該給出一個可理解的錯誤信息。 –