扩展例外:1944553,同时应用了栅格netlogo gis [英] extension exception: 1944553 while applying raster netlogo gis

查看:269
本文介绍了扩展例外:1944553,同时应用了栅格netlogo gis的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用GIS扩展中的apply-raster将ASCII加载到Netlogo中. 虽然我之前做了很多次(尽管没有使用此特定的ascii),但netlogo现在会引发以下错误:

I am trying to load an ascii into Netlogo with apply-raster from the GIS extension. While I did this many times before (although not with this specific ascii), netlogo now throws the following error:

extension exception: 1944553
error while observer running GIS:APPLY-RASTER

我不确定为什么会这样. ASCII文件中有一个投影文件(WKT),应该可以正常工作:

I am not sure why this is happening. The ascii has a projection file with it (WKT), which should work fine:

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

ascii本身具有以下参数:

The ascii itself has these parameters:

ncols         1481
nrows         1314
xllcorner     -10.577897001
yllcorner     49.902509998994
cellsize      0.00833333333333
NODATA_value  -9999

我正在运行这四行代码来加载ascii和调整世界大小.

I am running these four lines for loading the ascii and resizing the world.

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

有人知道这个错误吗? 还是在某个地方可以查找此扩展例外的含义?我找不到它,但也许我在错误的地方找东西.

Is anyone familiar with this error? Or is there a place where I can look up what this extension exception means? I could not find it, but maybe I am looking in the wrong places.

谢谢!

有关错误的详细信息,请参见下文

edit: See below for the details of the error

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

推荐答案

重新创建所有ascii文件后,终于解决了该问题.即使旧的和新的ascii文件没有明显的区别,旧文件也一定已经损坏.问题中的代码现在可以正常工作.希望该主题对遇到相同错误的任何人仍然有帮助.

The issue was finally solved after recreating all ascii files. Even though there was no apparent difference in the old and new ascii files, the old files must have been corrupted somehow. The code in the question works fine now. Hopefully this topic is still helpful for anybody running into the same error.

这篇关于扩展例外:1944553,同时应用了栅格netlogo gis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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