S-GeMS data format

S-GeMS handles two data formats: The classical ASCII GEOEAS format, that has been widely used in the geostatistical community. In addition, S-GeMS make use of a new in BINARY format. The binary format is much faster to work with, and handles both point set data and grid data, will full description of the grid properties (cell size, origin, grid size).

In order to run S-GeMS interactively from Matlab only the binary format can be used, as there is no way to instruct S-GeMS about grid size properties reading a EAS file.

Reading and writing of the GEOEAS format are done using the the section called “read_eas” and the section called “write_eas” function.

Binary S-GeMS formatted data (both point set and grid data) can be read using the the section called “sgems_read” function.

Binary point set data can be written using the the section called “sgems_write_pointset” function, and binary grid data can be written using the the section called “sgems_write_grid” function, and

GEOEAS to S-GeMS

EAS files can be converted to S-GeMS-binary formatted files using the section called “eas2sgems”.

GEOEAS Point Set to S-GeMS-binary

An EAS with data formatted as a point-set, the data section starts with 'ndim' columns defining the location in ndim-space, followed by N columns of DATA.

Use the following syntax:

 
O=eas2sgems(file_eas,file_sgems,ndim);

Convert a 3D EAS file with two data sets (5 cols, 3 dimensions) using

 
ndim=3
eas2sgems('file.eas','file.sgems',ndim)

Convert a 2D EAS file with two data sets (4 cols, 2 dimensions) using

 
ndim=2
eas2sgems('file.eas','file.sgems',ndim)

GEOEAS GRID to S-GeMS-binary

For an EAS with data formatted as GRIDS, the data section consist of N colums, representing N grids. An EAS not does not contain information about the cell size (dx,dy,dx) cell size, or the location of the first cell for each dimension (x0,y0,z0).

It 'may' (not part of strict format) contain information about the size of the grid(s) in the first line 'xxxxx (90x10x1)'.

Use the following syntax:

O=eas2sgems(file_eas,file_sgems,nx,ny,nz,dx,dy,dz,x0,y0,z0);

Convert an EAS file with 2 grids, assuming the grid size is given in the EAS header ('HEADER (60x70x1)'), and(dx,dy,dz)=(1,1,1), (x0,y0,z0)=(0,0,0):

 
ndim=2
eas2sgems('file.eas','file.sgems')

Same as above, but all manual settings:

 
eas2sgems('file.eas','file.sgems',60,70,1,1,1,1,0,0,0); 

Same as above, but but (x0,y0,z0)=(10,10,6):

 
eas2sgems('file.eas','file.sgems',60,70,1,10,10,6,0,0,0); 

S-GeMS to EAS

S-GeMS-binary formatted files can be converted to EAS ASCII formatted files using the section called “sgems2eas”. Simply call :

sgems2eas('file.sgems','file.eas');