[SOLVED]Input Zycor format

If you have problems using RGeostats package or if you simply need some help on an unlisted subject.

[SOLVED]Input Zycor format

Postby Matilde Dalla Rosa » Mon Oct 28, 2013 9:50 am

Dear all,
it seems that there are troubles in the input of zycor format (db.read.format ).
The db.read.format produces:
zycor_import.jpg
Import grid zycor
zycor_import.jpg (70.86 KiB) Viewed 3291 times

Maybe the row/column is inverted, but I don't understand where to set the way according to which reading the zycor file ("by row" or "by column").
Can you help me in solving this issue?
Thank you in advance,
Matilde
Matilde Dalla Rosa
 
Posts: 2
Joined: Fri Oct 25, 2013 7:48 am

Re: Input Zycor format

Postby 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.
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm

Re: Input Zycor format

Postby Matilde Dalla Rosa » Mon Nov 04, 2013 5:19 pm

Dear Didier,

thank you for your answer.

I checked again the Zycor file and it is OK. I can tell this because after some trials I could import it in RGeoS correctly.
The problem maybe raised because I tried to add the external grid file in an already existing db of type grid.
The two grids are defined exactly on the same area (same dimensions, same number of rows and columns) but the coordinates have different unit of measures: one in m and the other in km.

Matilde
Matilde Dalla Rosa
 
Posts: 2
Joined: Fri Oct 25, 2013 7:48 am


Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 6 guests

cron