I have converted a shapefile for the Northern Ireland map (at SOA level) (see the files at the bottom of this link: http://www.nisra.gov.uk/geography/default.asp3.htm) into an S-plus format ready for importing into winbugs using teh R package maptools and the function sp2WB. The S plus formatted file saved as a text file looks fine (it has the three sections as set out in= the geobugs user manual) but when I try to import it I get the following error, there are 890 Super output areas and I wondered if this might be why it is crashing.
Any help appreciated.
index out of range
MapsSplus.Import [00000569H]
.centreX REAL 0.0
.centreY REAL 0.0
.i INTEGER 10000
.id INTEGER 890
.map MapsMap.Map [01015CC0H]
.name ARRAY 80 OF CHAR "area95BB14S1" ...
.numReg INTEGER 890
.ok BOOLEAN TRUE
.polygon MapsMap.Polygon [010984A0H]
.pos INTEGER 17
.region MapsMap.Region [0101E0E0H]
.s TextMappers.Scanner Fields
.string ARRAY 80 OF CHAR "area95BB14S1" ...
.x ARRAY 10000 OF REAL Elements
.xScale REAL 1.0
.y ARRAY 10000 OF REAL Elements
.yScale REAL 1.0
MapsImporter.Import [00000164H]
.f Files.File NIL
.fileName Files.Name "" ...
.item Meta.Item Fields
.loc Files.Locator NIL
.m Models.Model [0100C5D0H]
.map MapsMap.Map [01015CC0H]
.ok BOOLEAN TRUE
.pos INTEGER 0
.protocol ARRAY 256 OF CHAR "MapsSplus"
.res INTEGER 0
.s TextMappers.Scanner Fields
.string ARRAY 120 OF CHAR "MapsSplus.Import"
.text TextModels.Model [0100C5D0H]
.v MapsImporter.RECORD Fields
.wr Stores.Writer Fields
StdInterpreter.CallProc [0000047AH]
.a BOOLEAN FALSE
.b BOOLEAN FALSE
.c BOOLEAN FALSE
.i Meta.Item Fields
.imported ARRAY 256 OF CHAR "" ...
.importing ARRAY 256 OF CHAR "" ...
.mn Meta.Name "MapsImporter"
.mod StdInterpreter.Ident "MapsImporter"
.object ARRAY 256 OF CHAR "" ...
.ok BOOLEAN TRUE
.parType INTEGER 3
.pn Meta.Name "Import"
.proc StdInterpreter.Ident "Import" ...
.res INTEGER 0
.v StdInterpreter.ProcVal Fields
.vi StdInterpreter.ProcIVal Fields
.vii StdInterpreter.ProcIIVal Fields
.vr StdInterpreter.ProcRVal Fields
.vri StdInterpreter.ProcRIVal Fields
.vrii StdInterpreter.ProcRIIVal Fields
.vrr StdInterpreter.ProcRRVal Fields
.vrri StdInterpreter.ProcRRIVal Fields
.vrrii StdInterpreter.ProcRRIIVal Fields
.vrs StdInterpreter.ProcRSVal Fields
.vrsi StdInterpreter.ProcRSIVal Fields
.vrsii StdInterpreter.ProcRSIIVal Fields
.vs StdInterpreter.ProcSVal Fields
.vsi StdInterpreter.ProcSIVal Fields
.vsii StdInterpreter.ProcSIIVal Fields
.vsr StdInterpreter.ProcSRVal Fields
.vsri StdInterpreter.ProcSRIVal Fields
.vsrii StdInterpreter.ProcSRIIVal Fields
.vss StdInterpreter.ProcSSVal Fields
.vssi StdInterpreter.ProcSSIVal Fields
.vssii StdInterpreter.ProcSSIIVal Fields
StdInterpreter.Command [0000131CH]
.left StdInterpreter.Ident "MapsImporter"
.ptype INTEGER 3
.right StdInterpreter.Ident "Import" ...
StdInterpreter.CallHook.Call [00001441H]
.ch CHAR 0X
.e ARRAY 64 OF CHAR "" ...
.errorMsg ARRAY 2 OF CHAR " "
.f ARRAY 64 OF CHAR "" ...
.g ARRAY 64 OF CHAR "" ...
.hook StdInterpreter.CallHook [01060050H]
.i INTEGER 33
.i0 INTEGER 0
.i1 INTEGER 0
.id StdInterpreter.Ident "Import" ...
.par0 Dialog.String "" ...
.par1 Views.Title "" ...
.proc ARRAY 33 OF CHAR "MapsImporter.Import('MapsSplus')" ...
.res INTEGER 0
.s0 Dialog.String "MapsSplus"
.s1 Dialog.String "" ...
.type INTEGER 3
.x INTEGER 0
Dialog.Call [00002FC8H]
.errorMsg ARRAY 2 OF CHAR " "
.proc ARRAY 33 OF CHAR "MapsImporter.Import('MapsSplus')" ...
.res INTEGER 0
StdDialog.HandleItem [0000084BH]
.i StdDialog.Item [0112E760H]
.res INTEGER 0
HostMenus.HandleCustomMenu [0000209EH]
.i StdDialog.Item [0112E760H]
.id INTEGER 410
.m HostMenus.Menu [0112DE00H]
HostMenus.MenuCommand [0000221AH]
.id INTEGER 410
.lParam INTEGER 0
.old INTEGER 65553
.res INTEGER 0
.wParam INTEGER 410
.wnd INTEGER 12125998
Kernel.Try [00003A61H]
.a INTEGER 12125998
.b INTEGER 410
.c INTEGER 0
.h PROCEDURE HostMenus.MenuCommand
HostMenus.ApplWinHandler [0000378AH]
.Proc PROCEDURE NIL
.hit BOOLEAN FALSE
.lParam INTEGER 0
.message INTEGER 273
.res INTEGER 0
.s ARRAY 256 OF SHORTCHAR "" ...
.w INTEGER 0
.wParam INTEGER 410
.wnd INTEGER 12125998
<system> (pc=7E418733H, fp=0022FB84H)
<system> (pc=7E418815H, fp=0022FBECH)
<system> (pc=7E4189CCH, fp=0022FC4CH)
<system> (pc=7E4196C6H, fp=0022FC5CH)
HostMenus.Loop [00003BDEH]
.done BOOLEAN FALSE
.f SET {0..5}
.n INTEGER 2
.res INTEGER 0
.w HostWindows.Window NIL
Kernel.Start [00002B8CH]
.code PROCEDURE HostMenus.Loop
Colin O'Hare
Programme Director BSc Actuarial Science and Risk Management
Queen’s University Management School
25 University Square
Belfast
Northern Ireland
UK
BT7 1NN
Tel: 028 9097 2522
Fax: 028 9097 5156
Email: [log in to unmask]
URL: http://www.qub.ac.uk/mgt/
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|