26 int x,
y, z, savePrecision, saveCompression, saveLzw, saveRle;
31 int tileXsave, tileYsave, tileZsave, tileX, tileY, tileZ, saveType;
59 for (z = 0; z < nz; z++)
60 for (y = 0; y < ny; y++)
61 for (x = 0; x < nx; x++) {
65 (
"G3d_changePrecision: error in G3d_readTile");
70 (
"G3d_changePrecision: error in G3d_writeTile");
int G3d_writeTile(G3D_Map *map, int tileIndex, const void *tile, int type)
Writes tile with index tileIndex to the file corresponding to map. It is assumed that the cells in ti...
void G3d_changePrecision(void *map, int precision, const char *nameOut)
Makes a copy of map with name nameOut which is written with precision. The source code can be found i...
void * G3d_allocTiles(G3D_Map *map, int nofTiles)
Is equivalent to G3d_allocTilesType (map, nofTiles, G3d_fileTypeMap (map)).
void G3d_getCompressionMode(int *doCompress, int *doLzw, int *doRle, int *precision)
void G3d_setCompressionMode(int doCompress, int doLzw, int doRle, int precision)
doCompress should be one of G3D_NO_COMPRESSION and G3D_COMPRESSION, doRle should be either G3D_NO_RLE...
void G3d_setFileType(int type)
set G3d file type
void G3d_getTileDimension(int *tileX, int *tileY, int *tileZ)
get Tile Dimension
int G3d_closeCell(G3D_Map *map)
Closes g3d-file. If map is new and cache-mode is used for map then every tile which is not flushed be...
void G3d_freeTiles(void *tiles)
Is equivalent to G3d_free (tiles);
void G3d_setTileDimension(int tileX, int tileY, int tileZ)
set Tile Dimension
int G3d_readTile(G3D_Map *map, int tileIndex, void *tile, int type)
Reads tile with index tileIndex into the tile buffer. The cells are stored with type type which must ...
int G3d_tile2tileIndex(G3D_Map *map, int xTile, int yTile, int zTile)
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).
void G3d_fatalError(const char *,...)
This function prints the error message msg, and terminates the program with an error status...
void * G3d_openCellNew(const char *name, int typeIntern, int cache, G3D_Region *region)
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must b...
int G3d_getFileType()
get G3d file type