Subject: Re: import GIS ascii files systematically
From: Dake, Chris (chris.dake@agresearch.co.nz)
Date: Sat Apr 02 2005 - 01:43:39 CEST
Hi
The following procedure should do the trick.
procInitGrid
self spaceModel
initializeRegularX: 60
Y: 46
shape: #squared
nbNeighbours: #eight
boundaries: #toroidal
delimiter: true.
self spaceModel getDataFromASCFile: 'file.asc' onAttribute:
#varName.
NOTE:
that initializeRegularX: 60 must be the same as the nrows in your asci
file and
Y: 46 corresponds to the ncols.
There is a minor bug in the procedure getDataFromASCFile. The variable
'column' in this line was incorrectly written as 'columns'. So just
delete the 's'.
(cols ~= self column or: [rows ~= self line])
Cheers
Chris Dake
Chris Dake PhD
Systems Modelling
AgResearch Ltd
Ruakura Research Centre
East Street
Private Bag 3123
Hamilton, New Zealand
Direct Dial + 64 7 838 5219
Fax + 64 7 838 5117
Email chris.dake@agresearch.co.nz
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================