GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include "G3d_intern.h"
Go to the source code of this file.
Macros | |
#define | MIN(a, b) (a < b ? a : b) |
#define | MAX(a, b) (a > b ? a : b) |
Functions | |
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 tile are of type which must be one of FCELL_TYPE and DCELL_TYPE. The actual type used to write the tile depends on the type specified at the time when map is initialized. A tile can only be written once. Subsequent attempts to write the same tile are ignored. More... | |
int | G3d_writeTileFloat (G3D_Map *map, int tileIndex, const void *tile) |
Is equivalent to G3d_writeTile (map, tileIndex, tile, FCELL_TYPE). More... | |
int | G3d_writeTileDouble (G3D_Map *map, int tileIndex, const void *tile) |
Is equivalent to G3d_writeTile (map, tileIndex, tile, DCELL_TYPE). More... | |
int | G3d_flushTile (G3D_Map *map, int tileIndex) |
Writes the tile with tileIndex to the file corresponding to map and removes the tile from the cache (in non-cache mode the buffer provided by the map-structure is written). If this tile has already been written before the write request is ignored. If the tile was never referred to before the invokation of G3d_flushTile, a tile filled with NULL-values is written. More... | |
int | G3d_flushTileCube (G3D_Map *map, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax) |
Writes the tiles with tile-coordinates contained in the axis-parallel cube with vertices (xMin, yMin, zMin) and (xMax, yMax, zMax). Tiles which are not stored in the cache are written as NULL-tiles. Write attempts for tiles which have already been written earlier are ignored. More... | |
int | G3d_flushTilesInCube (G3D_Map *map, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax) |
Writes those tiles for which every cell has coordinate contained in the axis-parallel cube defined by the vertices with cell-coordinates (xMin, yMin, zMin) and (xMax, yMax, zMax). Tiles which are not stored in the cache are written as NULL-tiles. Write attempts for tiles which have already been written earlier are ignored. More... | |
int | G3d_putDouble () |
Is equivalent to G3d_putValue (map, x, y, z, &value, DCELL_TYPE). More... | |
int | G3d_putFloat (G3D_Map *map, int x, int y, int z, float value) |
Is equivalent to G3d_putValue (map, x, y, z, &value, FCELL_TYPE). More... | |
int | G3d_putDouble (G3D_Map *map, int x, int y, int z, double value) |
Is equivalent to G3d_putValue (map, x, y, z, &value, DCELL_TYPE). More... | |
int | G3d_putValue (G3D_Map *map, int x, int y, int z, const void *value, int type) |
After converting *value of type into the type specified at the initialization time (i.e. typeIntern) this function writes the value into the tile buffer corresponding to cell-coordinate (x, y, z). More... | |
Definition at line 281 of file tilewrite.c.
Referenced by G3d_flushTilesInCube().
Definition at line 280 of file tilewrite.c.
Referenced by G3d_flushTilesInCube().
Writes the tile with tileIndex to the file corresponding to map and removes the tile from the cache (in non-cache mode the buffer provided by the map-structure is written). If this tile has already been written before the write request is ignored. If the tile was never referred to before the invokation of G3d_flushTile, a tile filled with NULL-values is written.
map | |
tileIndex |
Definition at line 254 of file tilewrite.c.
References G3d__removeTile(), G3d_error(), G3d_getTilePtr(), G3d_writeTile(), NULL, and utils::tile.
Referenced by G3d_flushTileCube().
Writes the tiles with tile-coordinates contained in the axis-parallel cube with vertices (xMin, yMin, zMin) and (xMax, yMax, zMax). Tiles which are not stored in the cache are written as NULL-tiles. Write attempts for tiles which have already been written earlier are ignored.
map | |
xMin | |
yMin | |
zMin | |
xMax | |
yMax | |
zMax |
Definition at line 306 of file tilewrite.c.
References G3d_error(), G3d_fatalError(), G3d_flushTile(), G3d_tile2tileIndex(), and y.
Referenced by G3d_flushTilesInCube().
int G3d_flushTilesInCube | ( | G3D_Map * | map, |
int | xMin, | ||
int | yMin, | ||
int | zMin, | ||
int | xMax, | ||
int | yMax, | ||
int | zMax | ||
) |
Writes those tiles for which every cell has coordinate contained in the axis-parallel cube defined by the vertices with cell-coordinates (xMin, yMin, zMin) and (xMax, yMax, zMax). Tiles which are not stored in the cache are written as NULL-tiles. Write attempts for tiles which have already been written earlier are ignored.
map | |
xMin | |
yMin | |
zMin | |
xMax | |
yMax | |
zMax |
Definition at line 352 of file tilewrite.c.
References G3d_coord2tileCoord(), G3d_error(), G3d_fatalError(), G3d_flushTileCube(), G3d_getCoordsMap(), MAX, and MIN.
int G3d_putDouble | ( | ) |
Is equivalent to G3d_putValue (map, x, y, z, &value, DCELL_TYPE).
map | |
x | |
y | |
z | |
value |
Referenced by G3d_putFloat(), G3d_putValue(), and N_write_array_3d_to_rast3d().
Is equivalent to G3d_putValue (map, x, y, z, &value, DCELL_TYPE).
map | |
x | |
y | |
z | |
value |
Definition at line 496 of file tilewrite.c.
References G3d_coord2tileIndex(), G3d_error(), G3d_getTilePtr(), G3d_putFloat(), NULL, utils::tile, and value.
Is equivalent to G3d_putValue (map, x, y, z, &value, FCELL_TYPE).
map | |
x | |
y | |
z | |
value |
Definition at line 456 of file tilewrite.c.
References G3d_coord2tileIndex(), G3d_error(), G3d_getTilePtr(), G3d_putDouble(), NULL, utils::tile, and value.
Referenced by G3d_putDouble(), G3d_putValue(), and N_write_array_3d_to_rast3d().
After converting *value of type into the type specified at the initialization time (i.e. typeIntern) this function writes the value into the tile buffer corresponding to cell-coordinate (x, y, z).
map | |
x | |
y | |
z | |
value | |
type |
Definition at line 540 of file tilewrite.c.
References G3d_error(), G3d_putDouble(), and G3d_putFloat().
Referenced by G3d_makeAlignedVolumeFile(), and G3d_retile().
Writes tile with index tileIndex to the file corresponding to map. It is assumed that the cells in tile are of type which must be one of FCELL_TYPE and DCELL_TYPE. The actual type used to write the tile depends on the type specified at the time when map is initialized. A tile can only be written once. Subsequent attempts to write the same tile are ignored.
map | |
tileIndex | |
tile | |
type |
Definition at line 128 of file tilewrite.c.
References dialogs::cols, G3d_computeClippedTileDimensions(), G3d_error(), G3d_fatalError(), and G3d_range_updateFromTile().
Referenced by G3d_changePrecision(), G3d_changeType(), G3d_flushTile(), G3d_writeTileDouble(), and G3d_writeTileFloat().
Is equivalent to G3d_writeTile (map, tileIndex, tile, DCELL_TYPE).
map | |
tileIndex | |
tile |
Definition at line 219 of file tilewrite.c.
References G3d_error(), and G3d_writeTile().
Is equivalent to G3d_writeTile (map, tileIndex, tile, FCELL_TYPE).
map | |
tileIndex | |
tile |
Definition at line 194 of file tilewrite.c.
References G3d_error(), and G3d_writeTile().