by Didier Renard » Thu Oct 31, 2013 8:55 pm
Hi Matilde
I have read your post. I checked the exporting of a ZYCIR file in RGeoS, as well as the reading.
According to the ZMAP format that is described on Internet documentation, there is no flexibility in that format
for storing an information by column or by row.
I read:
"After the last header line, there is a single line with a single "@", the line after which is the first line of data in the data section of the file. The data section has fixed field widths each field being a single grid node, and is generally right justified. There will be no more nodes on any physical line than that defined in third field of the first header line. A data field may or may not have a decimal point. If none is found, it is implied, and the decimal places are as defined in the second header line in the forth field.
The grid nodes in the data section are stored in column major order. That is the first column of data is written first, starting at the upper left corner of the grid. For example, if the grid has 7 rows and three columns, and the number of nodes per line is 4, the first line of the data section will have 4 nodes, the first four grid nodes going down from the upper left. The second line will have three nodes, the last three nodes of the first column. Then the next column is written, four nodes then three. Then the last column is written in the same pattern."
In addition, if I store a grid from RGeoS using db.write.format (db,mode="zycor",file="zycor.file"), it creates an ASCII file called "zycor.file". If a read it using db.read.format(file="zycor.file",mode="zycor"), I obtain a correct result.
So this is my question: how did you generate the file that you tried to read unsuccessfully. Is it using RGeoS or another software.
Could you provide me with the ZYCOR ASCII file, and the references of this other software.