|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <unistd.h>#include <string.h>#include <errno.h>#include <grass/gis.h>#include <grass/raster.h>#include <grass/glocale.h>#include "raster3d_intern.h"
Go to the source code of this file.
Functions | |
| int | Rast3d_write_tile (RASTER3D_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. | |
| int | Rast3d_write_tile_float (RASTER3D_Map *map, int tileIndex, const void *tile) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, FCELL_TYPE). | |
| int | Rast3d_write_tile_double (RASTER3D_Map *map, int tileIndex, const void *tile) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, DCELL_TYPE). | |
| int | Rast3d_flush_tile (RASTER3D_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 invocation of Rast3d_flush_tile, a tile filled with NULL-values is written. | |
| int | Rast3d_flush_tile_cube (RASTER3D_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. | |
| int | Rast3d_flush_tiles_in_cube (RASTER3D_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. | |
| int Rast3d_flush_tile | ( | RASTER3D_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 invocation of Rast3d_flush_tile, a tile filled with NULL-values is written.
| map | |
| tileIndex |
Definition at line 258 of file tilewrite.c.
References NULL, Rast3d__remove_tile(), Rast3d_error(), Rast3d_get_tile_ptr(), Rast3d_write_tile(), and RASTER3D_Map::typeIntern.
Referenced by Rast3d_flush_tile_cube().
| int Rast3d_flush_tile_cube | ( | RASTER3D_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.
| map | |
| xMin | |
| yMin | |
| zMin | |
| xMax | |
| yMax | |
| zMax |
Definition at line 302 of file tilewrite.c.
References Rast3d_error(), Rast3d_fatal_error(), Rast3d_flush_tile(), Rast3d_tile2tile_index(), RASTER3D_Map::useCache, and x.
Referenced by Rast3d_flush_tiles_in_cube().
| int Rast3d_flush_tiles_in_cube | ( | RASTER3D_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 347 of file tilewrite.c.
References MAX, MIN, Rast3d_coord2tile_coord(), Rast3d_error(), Rast3d_fatal_error(), Rast3d_flush_tile_cube(), Rast3d_get_coords_map(), and RASTER3D_Map::useCache.
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 129 of file tilewrite.c.
References _, RASTER3D_Map::compression, RASTER3D_Map::data_fd, err(), G_fatal_error(), RASTER3D_Map::index, RASTER3D_Map::nTiles, Rast3d_compute_clipped_tile_dimensions(), Rast3d_error(), Rast3d_fatal_error(), Rast3d_range_update_from_tile(), RASTER3D_NO_COMPRESSION, and RASTER3D_Map::tileLength.
Referenced by Rast3d_change_precision(), Rast3d_change_type(), Rast3d_flush_tile(), Rast3d_write_tile_double(), and Rast3d_write_tile_float().
| int Rast3d_write_tile_double | ( | RASTER3D_Map * | map, |
| int | tileIndex, | ||
| const void * | tile | ||
| ) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, DCELL_TYPE).
| map | |
| tileIndex | |
| tile |
Definition at line 226 of file tilewrite.c.
References DCELL_TYPE, Rast3d_error(), and Rast3d_write_tile().
| int Rast3d_write_tile_float | ( | RASTER3D_Map * | map, |
| int | tileIndex, | ||
| const void * | tile | ||
| ) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, FCELL_TYPE).
| map | |
| tileIndex | |
| tile |
Definition at line 202 of file tilewrite.c.
References FCELL_TYPE, Rast3d_error(), and Rast3d_write_tile().