GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-4d852dd394
|
Go to the source code of this file.
Functions | |
void | Rast3d_cache_reset (RASTER3D_cache *) |
void | Rast3d_cache_dispose (RASTER3D_cache *) |
void * | Rast3d_cache_new (int, int, int, write_fn *, void *, read_fn *, void *) |
void | Rast3d_cache_set_remove_fun (RASTER3D_cache *, write_fn *, void *) |
void | Rast3d_cache_set_load_fun (RASTER3D_cache *, read_fn *, void *) |
void * | Rast3d_cache_new_read (int, int, int, read_fn *, void *) |
int | Rast3d_cache_lock (RASTER3D_cache *, int) |
void | Rast3d_cache_lock_intern (RASTER3D_cache *, int) |
int | Rast3d_cache_unlock (RASTER3D_cache *, int) |
int | Rast3d_cache_unlock_all (RASTER3D_cache *) |
int | Rast3d_cache_lock_all (RASTER3D_cache *) |
void | Rast3d_cache_autolock_on (RASTER3D_cache *) |
void | Rast3d_cache_autolock_off (RASTER3D_cache *) |
void | Rast3d_cache_set_min_unlock (RASTER3D_cache *, int) |
int | Rast3d_cache_remove_elt (RASTER3D_cache *, int) |
int | Rast3d_cache_flush (RASTER3D_cache *, int) |
int | Rast3d_cache_remove_all (RASTER3D_cache *) |
int | Rast3d_cache_flush_all (RASTER3D_cache *) |
void * | Rast3d_cache_elt_ptr (RASTER3D_cache *, int) |
int | Rast3d_cache_load (RASTER3D_cache *, int) |
int | Rast3d_cache_get_elt (RASTER3D_cache *, int, void *) |
int | Rast3d_cache_put_elt (RASTER3D_cache *, int, const void *) |
void | Rast3d_cache_hash_reset (Rast3d_cache_hash *) |
void | Rast3d_cache_hash_dispose (Rast3d_cache_hash *) |
void * | Rast3d_cache_hash_new (int) |
void | Rast3d_cache_hash_remove_name (Rast3d_cache_hash *, int) |
void | Rast3d_cache_hash_load_name (Rast3d_cache_hash *, int, int) |
int | Rast3d_cache_hash_name2index (Rast3d_cache_hash *, int) |
void | Rast3d_change_precision (void *, int, const char *) |
Makes a copy of map with name nameOut which is written with precision. The source code can be found in changeprecision.c. More... | |
void | Rast3d_change_type (void *, const char *) |
Makes a copy of map with name nameOut in which the cells are of type FCELL_TYPE if they are DCELL_TYPE in map, and in DCELL_TYPE otherwise. The source code can be found in changetype.c. More... | |
void | Rast3d_compare_files (const char *, const char *, const char *, const char *) |
Compares the cell-values of file f1 in mapset mapset1 and file f2 in mapset mapset2. The values are compared up to precision. Terminates in error if the files don't match. This function uses the more advanced features of the cache. The source code can be found in filecompare.c. More... | |
void | Rast3d_filename (char *, const char *, const char *, const char *) |
void | Rast3d_fpcompress_print_binary (char *, int) |
void | Rast3d_fpcompress_dissect_xdr_double (unsigned char *) |
int | Rast3d_fpcompress_write_xdr_nums (int, char *, int, int, char *, int) |
int | Rast3d_fpcompress_read_xdr_nums (int, char *, int, int, int, char *, int) |
void * | Rast3d_malloc (int) |
Same as malloc (nBytes), except that in case of error Rast3d_error() is invoked. More... | |
void * | Rast3d_realloc (void *, int) |
Same as realloc (ptr, nBytes), except that in case of error Rast3d_error() is invoked. More... | |
void | Rast3d_free (void *) |
Same as free (ptr). More... | |
int | Rast3d_init_cache (RASTER3D_Map *, int) |
int | Rast3d_dispose_cache (RASTER3D_Map *) |
int | Rast3d_flush_all_tiles (RASTER3D_Map *) |
int | Rast3d_write_cats (const char *, struct Categories *) |
Writes the categories stored in the cats structure into the categories file for map name in the current mapset. See Rast_write_cats (Raster_Category_File) for details and return values. More... | |
int | Rast3d_read_cats (const char *, const char *, struct Categories *) |
Reads the categories file for map name in mapset and stores the categories in the pcats structure. See Rast_read_cats (Raster_Category_File) for details and return values. More... | |
int | Rast3d_close (RASTER3D_Map *) |
Close 3D raster map files. More... | |
int | Rast3d_remove_color (const char *) |
Removes the primary and/or secondary color file. More... | |
int | Rast3d_read_colors (const char *, const char *, struct Colors *) |
Reads color file for map name in mapset into the Colors structure. More... | |
int | Rast3d_write_colors (const char *, const char *, struct Colors *) |
Writes the colors for map name in mapset into a color file. More... | |
void | Rast3d_set_compression_mode (int, int) |
set compression mode More... | |
void | Rast3d_get_compression_mode (int *, int *) |
Gets compression mode. More... | |
void | Rast3d_set_cache_size (int) |
set cache size More... | |
int | Rast3d_get_cache_size (void) |
get cache size More... | |
void | Rast3d_set_cache_limit (int) |
Set cache limit. More... | |
int | Rast3d_get_cache_limit (void) |
Get cache limit. More... | |
void | Rast3d_set_file_type (int) |
set G3d file type More... | |
int | Rast3d_get_file_type (void) |
get G3d file type More... | |
void | Rast3d_set_tile_dimension (int, int, int) |
set Tile Dimension More... | |
void | Rast3d_get_tile_dimension (int *, int *, int *) |
get Tile Dimension More... | |
void | Rast3d_set_error_fun (void(*)(const char *)) |
set error function More... | |
void | Rast3d_init_defaults (void) |
Initializes the default values described in RASTER3D Defaults. Applications have to use this function only if they need to query the default values before the first file (either old or new) has been opened. More... | |
int | Rast3d_write_doubles (int, int, const double *, int) |
int | Rast3d_read_doubles (int, int, double *, int) |
void | Rast3d_skip_error (const char *) |
void | Rast3d_print_error (const char *) |
Prints error message. More... | |
void | Rast3d_fatal_error (const char *,...) __attribute__((format(printf |
void | __attribute__ ((noreturn)) |
void | Rast3d_fatal_error_noargs (const char *) __attribute__((noreturn)) |
void | Rast3d_error (const char *,...) __attribute__((format(printf |
void int | Rast3d_is_xdr_null_num (const void *, int) |
int | Rast3d_is_xdr_null_float (const float *) |
int | Rast3d_is_xdr_null_double (const double *) |
void | Rast3d_set_xdr_null_num (void *, int) |
void | Rast3d_set_xdr_null_double (double *) |
void | Rast3d_set_xdr_null_float (float *) |
int | Rast3d_init_fp_xdr (RASTER3D_Map *, int) |
int | Rast3d_init_copy_to_xdr (RASTER3D_Map *, int) |
int | Rast3d_copy_to_xdr (const void *, int) |
int | Rast3d_init_copy_from_xdr (RASTER3D_Map *, int) |
int | Rast3d_copy_from_xdr (int, void *) |
void | Rast3d_gradient_double (RASTER3D_Array_double *, double *, RASTER3D_Array_double *, RASTER3D_Array_double *, RASTER3D_Array_double *) |
Gradient computation. More... | |
int | Rast3d_write_history (const char *, struct History *) |
write raster3d History file More... | |
int | Rast3d_read_history (const char *, const char *, struct History *) |
read raster3d History file More... | |
int | Rast3d_write_ints (int, int, const int *, int) |
int | Rast3d_read_ints (int, int, int *, int) |
int | Rast3d_key_get_int (struct Key_Value *, const char *, int *) |
int | Rast3d_key_get_double (struct Key_Value *, const char *, double *) |
int | Rast3d_key_get_string (struct Key_Value *, const char *, char **) |
int | Rast3d_key_get_value (struct Key_Value *, const char *, char *, char *, int, int, int *) |
int | Rast3d_key_set_int (struct Key_Value *, const char *, const int *) |
int | Rast3d_key_set_double (struct Key_Value *, const char *, const double *) |
int | Rast3d_key_set_string (struct Key_Value *, const char *, char *const *) |
int | Rast3d_key_set_value (struct Key_Value *, const char *, const char *, const char *, int, int, const int *) |
int | Rast3d_long_encode (long *, unsigned char *, int) |
void | Rast3d_long_decode (unsigned char *, long *, int, int) |
void | Rast3d_make_mapset_map_directory (const char *) |
int | Rast3d_mask_close (void) |
int | Rast3d_mask_file_exists (void) |
Returns 1 if the 3d mask file exists. More... | |
int | Rast3d_mask_open_old (void) |
int | Rast3d_mask_reopen (int) |
This function should be used to adjust the cache size used for the 3d-mask. First the open 3d-mask is closed and then opened again with a cache size as specified with cache. More... | |
int | Rast3d_is_masked (RASTER3D_Map *, int, int, int) |
Returns 1 if the cell with cell-coordinates (x, y, z) is masked out. Returns 0 otherwise. More... | |
void | Rast3d_mask_num (RASTER3D_Map *, int, int, int, void *, int) |
Replaces the value stored in value with the NULL-value if Rast3d_is_masked (x, y, z) returns 1. Does nothing otherwise. value is assumed to be oftype. More... | |
void | Rast3d_mask_float (RASTER3D_Map *, int, int, int, float *) |
Same as Rast3d_mask_num (x, y, z, value, FCELL_TYPE). More... | |
void | Rast3d_mask_double (RASTER3D_Map *, int, int, int, double *) |
Same as Rast3d_mask_num (x, y, z, value, DCELL_TYPE). More... | |
void | Rast3d_mask_tile (RASTER3D_Map *, int, void *, int) |
Replaces the values stored in tile (with tileIndex) for which Rast3d_is_masked returns 1 with NULL-values. Does not change the remaining values. The values are assumed to be of type. Whether replacement is performed or not only depends on location of the cells of the tile and not on the status of the mask for map (i.e. turned on or off). More... | |
void | Rast3d_mask_on (RASTER3D_Map *) |
Turns on the mask for map. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values. More... | |
void | Rast3d_mask_off (RASTER3D_Map *) |
Turns off the mask for map. This is the default. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values. More... | |
int | Rast3d_mask_is_on (RASTER3D_Map *) |
Returns 1 if the mask for map is turned on. Returns 0 otherwise. More... | |
int | Rast3d_mask_is_off (RASTER3D_Map *) |
Returns 1 if the mask for map is turned off. Returns 0 otherwise. More... | |
const char * | Rast3d_mask_file (void) |
Returns the name of the 3d mask file. More... | |
int | Rast3d_mask_map_exists (void) |
Returns 1 if the 3d mask is loaded. More... | |
int | Rast3d_mask_d_select (DCELL *, d_Mask *) |
DCELL | Rast3d_mask_match_d_interval (DCELL, d_Interval *) |
void | Rast3d_parse_vallist (char **, d_Mask **) |
int | Rast3d_g3d_type2cell_type (int) |
void | Rast3d_copy_float2Double (const float *, int, double *, int, int) |
void | Rast3d_copy_double2Float (const double *, int, float *, int, int) |
void | Rast3d_copy_values (const void *, int, int, void *, int, int, int) |
int | Rast3d_length (int) |
int | Rast3d_extern_length (int) |
int | Rast3d_is_null_value_num (const void *, int) |
void | Rast3d_set_null_value (void *, int, int) |
Fills the vector pointed to by c with nofElts NULL-values of type. More... | |
void * | Rast3d_open_new_param (const char *, int, int, RASTER3D_Region *, int, int, int, int, int, int) |
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with typeIntern which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. The methods for compression can be specified LZW or RLE. The digits of the floating point mantissa can be specified. In case of FCELL_TYPE 0-23 and 0-52 in case of DCELL_TYPE. The number cells in X, Y and Z direction defines the size of each tile. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More... | |
void * | Rast3d_open_cell_old_no_header (const char *, const char *) |
void * | Rast3d_open_cell_old (const char *, const char *, RASTER3D_Region *, int, int) |
Opens existing g3d-file name in mapset. Tiles are stored in memory with type which must be any of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. window sets the window-region for the map. It is either a pointer to a window structure or RASTER3D_DEFAULT_WINDOW, which uses the window stored at initialization time or set via Rast3d_set_window () (cf.{g3d:G3d.setWindow}). To modify the window for the map after it has already been opened use Rast3d_set_window_map () (cf.{g3d:G3d.setWindowMap}). Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More... | |
void * | Rast3d_open_cell_new (const char *, int, int, RASTER3D_Region *) |
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More... | |
void * | Rast3d_open_new_opt_tile_size (const char *, int, RASTER3D_Region *, int, int) |
Opens new g3d-file with name in the current mapset. This method tries to compute optimal tile size based on the number of rows, cols and depths and the maximum allowed tile size in KB. Tiles are stored in memory using RASTER3D_TILE_SAME_AS_FILE method. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More... | |
void | Rast3d_set_standard3d_input_params (void) |
Initializes a parameter structure for the subset of command line arguments which lets the user overwrite the default properties of the new file. Applications are encouraged to use this function in order to provide a uniform style. The command line arguments provided are the type of the cell values, the precision, the properties of the compression, and the dimension of the tiles (tiledimension). Every of these values defaults to the value described in RASTER3D Defaults. This function has to be used in conjunction with Rast3d_getStandard3dInputParams() (cf.{g3d:G3d.getStandard3dInputParams}). More... | |
int | Rast3d_get_standard3d_params (int *, int *, int *, int *, int *, int *, int *, int *, int *, int *) |
void | Rast3d_set_window_params (void) |
char * | Rast3d_get_window_params (void) |
void | Rast3d_range_update_from_tile (RASTER3D_Map *, const void *, int, int, int, int, int, int, int, int) |
int | Rast3d_read_range (const char *, const char *, struct FPRange *) |
int | Rast3d_range_load (RASTER3D_Map *) |
Loads the range into the range structure of map. More... | |
void | Rast3d_range_min_max (RASTER3D_Map *, double *, double *) |
Returns in min and max the minimum and maximum values of the range. More... | |
int | Rast3d_range_write (RASTER3D_Map *) |
Writes the range which is stored in the range structure of map. (This function is invoked automatically when a new file is closed). More... | |
int | Rast3d_range_init (RASTER3D_Map *) |
void | Rast3d_get_region_value (RASTER3D_Map *, double, double, double, void *, int) |
Returns in value the value of the map which corresponds to region coordinates (north, east, top). More... | |
void | Rast3d_adjust_region (RASTER3D_Region *) |
Computes an adjusts the resolutions in the region structure from the region boundaries and number of cells per dimension. More... | |
void | Rast3d_region_copy (RASTER3D_Region *, RASTER3D_Region *) |
Copies the values of regionSrc into regionDst. More... | |
void | Rast3d_incorporate2d_region (struct Cell_head *, RASTER3D_Region *) |
Replaces the 2d portion of region3d with the values stored in region2d. More... | |
void | Rast3d_region_from_to_cell_head (struct Cell_head *, RASTER3D_Region *) |
Replaces the 2d portion of region3d with the values stored in region2d. More... | |
void | Rast3d_adjust_region_res (RASTER3D_Region *) |
Computes an adjusts the number of cells per dimension in the region structure from the region boundaries and resolutions. More... | |
void | Rast3d_extract2d_region (RASTER3D_Region *, struct Cell_head *) |
Returns in region2d the 2d portion of region3d. More... | |
void | Rast3d_region_to_cell_head (RASTER3D_Region *, struct Cell_head *) |
Returns in region2d the 2d portion of region3d. More... | |
int | Rast3d_read_region_map (const char *, const char *, RASTER3D_Region *) |
int | Rast3d_is_valid_location (RASTER3D_Region *, double, double, double) |
Returns 1 if region-coordinates (north, east, top) are inside the region of map. Returns 0 otherwise. More... | |
void | Rast3d_location2coord (RASTER3D_Region *, double, double, double, int *, int *, int *) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). More... | |
void | Rast3d_location2coord_double (RASTER3D_Region *, double, double, double, double *, double *, double *) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). More... | |
void | Rast3d_location2coord2 (RASTER3D_Region *, double, double, double, int *, int *, int *) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). This function calls Rast3d_fatal_error in case location is not in window. More... | |
void | Rast3d_coord2location (RASTER3D_Region *, double, double, double, double *, double *, double *) |
Converts cell-coordinates (x, y, z) into region-coordinates (north, east, top). More... | |
void | Rast3d_nearest_neighbor (RASTER3D_Map *, int, int, int, void *, int) |
The default resampling function which uses nearest neighbor resampling. This method converts the window coordinates x, y, and z into region coordinates and returned the nearest neighbor. More... | |
void | Rast3d_set_resampling_fun (RASTER3D_Map *, void(*)(RASTER3D_Map *, int, int, int, void *, int)) |
Sets the resampling function to be used by Rast3d_get_value () (cf.{g3d:G3d.getValue}). This function is defined as follows: More... | |
void | Rast3d_get_resampling_fun (RASTER3D_Map *, void(**)(RASTER3D_Map *, int, int, int, void *, int)) |
Returns in resampleFun a pointer to the resampling function used by map. More... | |
void | Rast3d_get_nearest_neighbor_fun_ptr (void(**)(RASTER3D_Map *, int, int, int, void *, int)) |
Returns in nnFunPtr a pointer to Rast3d_nearest_neighbor () (cf.{g3d:G3d.nearestNeighbor}). More... | |
void | Rast3d_get_volume_a (void *, double[2][2][2][3], int, int, int, void *, int) |
void | Rast3d_get_volume (void *, double, double, double, double, double, double, double, double, double, double, double, double, int, int, int, void *, int) |
void | Rast3d_get_aligned_volume (void *, double, double, double, double, double, double, int, int, int, void *, int) |
void | Rast3d_make_aligned_volume_file (void *, const char *, double, double, double, double, double, double, int, int, int) |
void | Rast3d_get_value (RASTER3D_Map *, int, int, int, void *, int) |
Returns in *value the resampled cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs. More... | |
float | Rast3d_get_float (RASTER3D_Map *, int, int, int) |
Is equivalent to Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE); return value. More... | |
double | Rast3d_get_double (RASTER3D_Map *, int, int, int) |
Is equivalent to Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE); return value. More... | |
void | Rast3d_get_window_value (RASTER3D_Map *, double, double, double, void *, int) |
Returns in value the value of the map which corresponds to window coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type. More... | |
RASTER3D_Region * | Rast3d_window_ptr (void) |
void | Rast3d_set_window (RASTER3D_Region *) |
Sets the default window used for every map opened later in the program. Can be used multiple times in the same program. More... | |
void | Rast3d_set_window_map (RASTER3D_Map *, RASTER3D_Region *) |
Sets the window for map to window. Can be used multiple times for the same map. More... | |
void | Rast3d_get_window (RASTER3D_Region *) |
Stores the current default window in window. More... | |
void | Rast3d_use_window_params (void) |
Writes window to the file specified by windowName. The name is converted by the rules defined in window defaults. A NULL pointer indicates the WIND3 file in the current mapset. More... | |
int | Rast3d_read_window (RASTER3D_Region *, const char *) |
Reads window from the file specified by windowName. The name is converted by the rules defined in window defaults. A NULL pointer indicates the WIND3 file in the current mapset. More... | |
void | Rast3d_get_block_nocache (RASTER3D_Map *, int, int, int, int, int, int, void *, int) |
void | Rast3d_get_block (RASTER3D_Map *, int, int, int, int, int, int, void *, int) |
Copies the cells contained in the block (cube) with vertices (x0, y0, z0) and (x0 + nx - 1, y0 + ny - 1, z0 + nz - 1) into block. The cell-values in block are of type. The source code can be found in getblock.c. More... | |
int | Rast3d_read_header (RASTER3D_Map *, int *, int *, double *, double *, double *, double *, double *, double *, int *, int *, int *, double *, double *, double *, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *, char **, int *, int *) |
int | Rast3d_write_header (RASTER3D_Map *, int, int, double, double, double, double, double, double, int, int, int, double, double, double, int, int, int, int, int, int, int, int, int, int, int, char *, int, int) |
int | Rast3d_rewrite_header (RASTER3D_Map *map) |
int | Rast3d_cache_size_encode (int, int) |
Returns a number which encodes multiplicity n of cacheCode. This value can be used to specify the size of the cache. If cacheCode is the size (in tiles) of the cache the function returns cacheCode * n. If cacheCode is RASTER3D_USE_CACHE_DEFAULT the function returns RASTER3D_USE_CACHE_DEFAULT. If cacheCode is RASTER3D_USE_CACHE_??? the function returns a value encoding RASTER3D_USE_CACHE_??? and n. Here RASTER3D_USE_CACHE_??? is one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, or RASTER3D_USE_CACHE_XYZ, where e.g. RASTER3D_USE_CACHE_X specifies that the cache should store as many tiles as there exist in one row along the x-axis of the tile cube, and RASTER3D_USE_CACHE_XY specifies that the cache should store as many tiles as there exist in one slice of the tile cube with constant Z coordinate. More... | |
int | Rast3d__compute_cache_size (RASTER3D_Map *, int) |
int | Rast3d_fill_header (RASTER3D_Map *, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, double, double, double, double, double, double, int, int, int, double, double, double, char *, int, int) |
void | Rast3d_get_coords_map (RASTER3D_Map *, int *, int *, int *) |
Returns the size of the region of map in cells. More... | |
void | Rast3d_get_coords_map_window (RASTER3D_Map *, int *, int *, int *) |
void | Rast3d_get_nof_tiles_map (RASTER3D_Map *, int *, int *, int *) |
Returns the dimensions of the tile-cube used to tile the region of map. These numbers include partial tiles. More... | |
void | Rast3d_get_region_map (RASTER3D_Map *, double *, double *, double *, double *, double *, double *) |
Returns the size of the region. More... | |
void | Rast3d_get_window_map (RASTER3D_Map *, double *, double *, double *, double *, double *, double *) |
void | Rast3d_get_tile_dimensions_map (RASTER3D_Map *, int *, int *, int *) |
Returns the tile dimensions used for map. More... | |
int | Rast3d_tile_type_map (RASTER3D_Map *) |
Returns the type in which tiles of map are stored in memory. More... | |
int | Rast3d_file_type_map (RASTER3D_Map *) |
Returns the type with which tiles of map are stored on file. More... | |
int | Rast3d_tile_precision_map (RASTER3D_Map *) |
Returns the precision used to store map. More... | |
int | Rast3d_tile_use_cache_map (RASTER3D_Map *) |
Returns 1 if map uses cache, returns 0 otherwise. More... | |
void | Rast3d_print_header (RASTER3D_Map *) |
Prints the header information of map. More... | |
void | Rast3d_get_region_struct_map (RASTER3D_Map *, RASTER3D_Region *) |
Returns in region the region of map. More... | |
const char * | Rast3d_get_unit (RASTER3D_Map *map) |
Return the data unit definition of map. More... | |
int | Rast3d_get_vertical_unit2 (RASTER3D_Map *map) |
Returns the vertical unit of map as integer. Units are defined in gis.h. More... | |
const char * | Rast3d_get_vertical_unit (RASTER3D_Map *map) |
Return the name of the unit of map. Units are defined in gis.h. More... | |
void | Rast3d_set_unit (RASTER3D_Map *map, const char *) |
Set the data unit defintiong. More... | |
void | Rast3d_set_vertical_unit (RASTER3D_Map *map, const char *) |
set Vertical unit from string More... | |
void | Rast3d_set_vertical_unit2 (RASTER3D_Map *map, int) |
set Vertical unit from integer value defined in gis.h (U_METERS, ...) More... | |
int | Rast3d_flush_index (RASTER3D_Map *) |
int | Rast3d_init_index (RASTER3D_Map *, int) |
void | Rast3d_retile (void *, const char *, int, int, int) |
Makes a copy of map with name nameOut which has tile dimensions tileX, tileY, tileZ. The source code can be found in retile.c. More... | |
int | Rast3d_rle_count_only (char *, int, int) |
void | Rast3d_rle_encode (char *, char *, int, int) |
void | Rast3d_rle_decode (char *, char *, int, int, int *, int *) |
void * | Rast3d_alloc_tiles_type (RASTER3D_Map *, int, int) |
Allocates a vector of nofTiles tiles with the same dimensions as the tiles of map and large enough to store cell-values of type. More... | |
void * | Rast3d_alloc_tiles (RASTER3D_Map *, int) |
Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)). More... | |
void | Rast3d_free_tiles (void *) |
Is equivalent to Rast3d_free (tiles); More... | |
void * | Rast3d_get_tile_ptr (RASTER3D_Map *, int) |
This function returns a pointer to a tile which contains the data for the tile with index tileIndex. The type of the data stored in the tile depends on the type specified at the initialization time of map. The functionality is different depending on whether map is old or new and depending on the cache-mode of map. More... | |
int | Rast3d_tile_load (RASTER3D_Map *, int) |
Same functionality as Rast3d_get_tile_ptr() but does not return the pointer. More... | |
int | Rast3d__remove_tile (RASTER3D_Map *, int) |
float | Rast3d_get_float_region (RASTER3D_Map *, int, int, int) |
Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, FCELL_TYPE); return value. More... | |
double | Rast3d_get_double_region (RASTER3D_Map *, int, int, int) |
Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, DCELL_TYPE); return value. More... | |
void | Rast3d_get_value_region (RASTER3D_Map *, int, int, int, void *, int) |
Returns in *value the cell-value of the cell with region-coordinate (x, y, z). The value returned is of type. Here region means the coordinate in the cube of data in the file, i.e. ignoring geographic coordinates. In case the region coordinates are out of bounds, the Null value will be returned. This function invokes a fatal error if an error occurs. More... | |
void | Rast3d_compute_optimal_tile_dimension (RASTER3D_Region *, int, int *, int *, int *, int) |
Compute the optimal tile size. More... | |
void | Rast3d_tile_index2tile (RASTER3D_Map *, int, int *, int *, int *) |
Converts index tileIndex into tile-coordinates (xTile, yTile, zTile). More... | |
int | Rast3d_tile2tile_index (RASTER3D_Map *, int, int, int) |
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile). More... | |
void | Rast3d_tile_coord_origin (RASTER3D_Map *, int, int, int, int *, int *, int *) |
Computes the cell-coordinates (x, y, z) which correspond to the origin of the tile with tile-coordinates (xTile, yTile, zTile). More... | |
void | Rast3d_tile_index_origin (RASTER3D_Map *, int, int *, int *, int *) |
Computes the cell-coordinates (x, y, z) which correspond to the origin of the tile with tileIndex. More... | |
void | Rast3d_coord2tile_coord (RASTER3D_Map *, int, int, int, int *, int *, int *, int *, int *, int *) |
Converts cell-coordinates (x, y, z) into tile-coordinates (xTile, yTile, zTile) and the coordinate of the cell (xOffs, yOffs, zOffs) within the tile. More... | |
void | Rast3d_coord2tile_index (RASTER3D_Map *, int, int, int, int *, int *) |
Converts cell-coordinates (x, y, z) into tileIndex and the offset of the cell within the tile. More... | |
int | Rast3d_coord_in_range (RASTER3D_Map *, int, int, int) |
Returns 1 if cell-coordinate (x, y, z) is a coordinate inside the region. Returns 0 otherwise. More... | |
int | Rast3d_tile_index_in_range (RASTER3D_Map *, int) |
Returns 1 if tileIndex is a valid index for map. Returns 0 otherwise. More... | |
int | Rast3d_tile_in_range (RASTER3D_Map *, int, int, int) |
Returns 1 if tile-coordinate (x, y, z) is a coordinate inside tile cube. Returns 0 otherwise. More... | |
int | Rast3d_compute_clipped_tile_dimensions (RASTER3D_Map *, int, int *, int *, int *, int *, int *, int *) |
Computes the dimensions of the tile when clipped to fit the region of map. The clipped dimensions are returned in rows, cols, depths. The complement is returned in xRedundant, yRedundant, and zRedundant. This function returns the number of cells in the clipped tile. More... | |
void | Rast3d_set_null_tile_type (RASTER3D_Map *, void *, int) |
Assumes that tile is a tile with the same dimensions as the tiles of map. Fills tile with NULL-values of type. More... | |
void | Rast3d_set_null_tile (RASTER3D_Map *, void *) |
Is equivalent to Rast3d_set_null_tile_type (map, tile, Rast3d_file_type_map (map)). More... | |
int | Rast3d_read_tile (RASTER3D_Map *, int, void *, int) |
Reads tile with index tileIndex into the tile buffer. The cells are stored with type type which must be one of FCELL_TYPE and DCELL_TYPE. If the tile with tileIndex is not stored on the file corresponding to map, and tileIndex is a valid index tile is filled with NULL-values. More... | |
int | Rast3d_read_tile_float (RASTER3D_Map *, int, void *) |
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, FCELL_TYPE). More... | |
int | Rast3d_read_tile_double (RASTER3D_Map *, int, void *) |
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, DCELL_TYPE). More... | |
int | Rast3d_lock_tile (RASTER3D_Map *, int) |
Locks tile with tileIndex in cache. If after locking fewer than the minimum number of unlocked tiles are unlocked, the lock request is ignored. More... | |
int | Rast3d_unlock_tile (RASTER3D_Map *, int) |
Unlocks tile with tileIndex. More... | |
int | Rast3d_unlock_all (RASTER3D_Map *) |
Unlocks every tile in cache of map. More... | |
void | Rast3d_autolock_on (RASTER3D_Map *) |
Turns autolock mode on. More... | |
void | Rast3d_autolock_off (RASTER3D_Map *) |
Turns autolock mode Off. More... | |
void | Rast3d_min_unlocked (RASTER3D_Map *, int) |
Sets the minimum number of unlocked tiles to minUnlocked. This function should be used in combination with Rast3d_unlock_all () in order to avoid situations where the new minimum is larger than the actual number of unlocked tiles. minUnlocked must be one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode() (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which explicitly specifies the number of tiles. More... | |
int | Rast3d_begin_cycle (RASTER3D_Map *) |
Starts a new cycle. More... | |
int | Rast3d_end_cycle (RASTER3D_Map *) |
Ends a cycle. More... | |
int | Rast3d_write_tile (RASTER3D_Map *, int, const void *, int) |
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 | Rast3d_write_tile_float (RASTER3D_Map *, int, const void *) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, FCELL_TYPE). More... | |
int | Rast3d_write_tile_double (RASTER3D_Map *, int, const void *) |
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, DCELL_TYPE). More... | |
int | Rast3d_flush_tile (RASTER3D_Map *, int) |
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. More... | |
int | Rast3d_flush_tile_cube (RASTER3D_Map *, int, int, int, int, int, int) |
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 | Rast3d_flush_tiles_in_cube (RASTER3D_Map *, int, int, int, int, int, int) |
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 | Rast3d_put_float (RASTER3D_Map *, int, int, int, float) |
Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE). More... | |
int | Rast3d_put_double (RASTER3D_Map *, int, int, int, double) |
Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE). More... | |
int | Rast3d_put_value (RASTER3D_Map *, int, int, int, const void *, int) |
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... | |
void | Rast3d_write_ascii (void *, const char *) |
Writes the cell-values of map in ascii format to file fname. The values are organized by horizontal slices. More... | |
void __attribute__ | ( | (noreturn) | ) |
int Rast3d__compute_cache_size | ( | RASTER3D_Map * | map, |
int | cacheCode | ||
) |
Definition at line 330 of file raster3d/header.c.
References g3d_cache_default, RASTER3D_Map::nTiles, RASTER3D_Map::nx, RASTER3D_Map::nxy, RASTER3D_Map::ny, RASTER3D_Map::nz, Rast3d_fatal_error(), RASTER3D_MAX, RASTER3D_MIN, RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XYZ, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_YZ, and RASTER3D_USE_CACHE_Z.
Referenced by Rast3d_min_unlocked().
int Rast3d__remove_tile | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
Definition at line 135 of file tileio.c.
References RASTER3D_Map::cache, Rast3d_cache_remove_elt(), Rast3d_error(), and RASTER3D_Map::useCache.
Referenced by Rast3d_flush_tile().
void Rast3d_adjust_region | ( | RASTER3D_Region * | region | ) |
void Rast3d_adjust_region_res | ( | RASTER3D_Region * | region | ) |
void* Rast3d_alloc_tiles | ( | RASTER3D_Map * | map, |
int | nofTiles | ||
) |
Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)).
map | |
nofTiles |
Definition at line 49 of file tilealloc.c.
References NULL, Rast3d_alloc_tiles_type(), Rast3d_error(), and RASTER3D_Map::typeIntern.
void* Rast3d_alloc_tiles_type | ( | RASTER3D_Map * | map, |
int | nofTiles, | ||
int | type | ||
) |
Allocates a vector of nofTiles tiles with the same dimensions as the tiles of map and large enough to store cell-values of type.
map | |
nofTiles | |
type |
Definition at line 23 of file tilealloc.c.
Referenced by Rast3d_alloc_tiles().
void Rast3d_autolock_off | ( | RASTER3D_Map * | map | ) |
Turns autolock mode Off.
map |
Definition at line 360 of file tileread.c.
References RASTER3D_Map::cache, Rast3d_cache_autolock_off(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
Referenced by Rast3d_end_cycle().
void Rast3d_autolock_on | ( | RASTER3D_Map * | map | ) |
Turns autolock mode on.
map |
Definition at line 340 of file tileread.c.
References RASTER3D_Map::cache, Rast3d_cache_autolock_on(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
Referenced by Rast3d_begin_cycle().
int Rast3d_begin_cycle | ( | RASTER3D_Map * | map | ) |
Starts a new cycle.
map |
Definition at line 411 of file tileread.c.
References Rast3d_autolock_on(), Rast3d_fatal_error(), and Rast3d_unlock_all().
void Rast3d_cache_autolock_off | ( | RASTER3D_cache * | c | ) |
Definition at line 361 of file cache1.c.
Referenced by Rast3d_autolock_off().
void Rast3d_cache_autolock_on | ( | RASTER3D_cache * | c | ) |
Definition at line 354 of file cache1.c.
Referenced by Rast3d_autolock_on().
void Rast3d_cache_dispose | ( | RASTER3D_cache * | c | ) |
void* Rast3d_cache_elt_ptr | ( | RASTER3D_cache * | c, |
int | name | ||
) |
Definition at line 468 of file cache1.c.
Referenced by Rast3d_get_tile_ptr().
int Rast3d_cache_flush | ( | RASTER3D_cache * | c, |
int | name | ||
) |
int Rast3d_cache_flush_all | ( | RASTER3D_cache * | c | ) |
int Rast3d_cache_get_elt | ( | RASTER3D_cache * | c, |
int | name, | ||
void * | dst | ||
) |
void Rast3d_cache_hash_dispose | ( | Rast3d_cache_hash * | h | ) |
Definition at line 36 of file cachehash.c.
void Rast3d_cache_hash_load_name | ( | Rast3d_cache_hash * | h, |
int | name, | ||
int | index | ||
) |
Definition at line 93 of file cachehash.c.
int Rast3d_cache_hash_name2index | ( | Rast3d_cache_hash * | h, |
int | name | ||
) |
Definition at line 108 of file cachehash.c.
void* Rast3d_cache_hash_new | ( | int | nofNames | ) |
Definition at line 50 of file cachehash.c.
void Rast3d_cache_hash_remove_name | ( | Rast3d_cache_hash * | h, |
int | name | ||
) |
Definition at line 76 of file cachehash.c.
void Rast3d_cache_hash_reset | ( | Rast3d_cache_hash * | h | ) |
Definition at line 24 of file cachehash.c.
int Rast3d_cache_load | ( | RASTER3D_cache * | c, |
int | name | ||
) |
int Rast3d_cache_lock | ( | RASTER3D_cache * | c, |
int | name | ||
) |
Definition at line 267 of file cache1.c.
Referenced by Rast3d_lock_tile().
int Rast3d_cache_lock_all | ( | RASTER3D_cache * | c | ) |
void Rast3d_cache_lock_intern | ( | RASTER3D_cache * | c, |
int | index | ||
) |
void* Rast3d_cache_new_read | ( | int | nofElts, |
int | sizeOfElts, | ||
int | nofNames, | ||
read_fn * | eltLoadFun, | ||
void * | eltLoadFunData | ||
) |
Definition at line 161 of file cache1.c.
References Rast3d_cache_new().
int Rast3d_cache_put_elt | ( | RASTER3D_cache * | c, |
int | name, | ||
const void * | src | ||
) |
int Rast3d_cache_remove_all | ( | RASTER3D_cache * | c | ) |
Definition at line 434 of file cache1.c.
Referenced by Rast3d_flush_all_tiles().
int Rast3d_cache_remove_elt | ( | RASTER3D_cache * | c, |
int | name | ||
) |
Definition at line 410 of file cache1.c.
Referenced by Rast3d__remove_tile().
void Rast3d_cache_reset | ( | RASTER3D_cache * | c | ) |
void Rast3d_cache_set_load_fun | ( | RASTER3D_cache * | , |
read_fn * | , | ||
void * | |||
) |
void Rast3d_cache_set_min_unlock | ( | RASTER3D_cache * | c, |
int | nofMinUnLocked | ||
) |
Definition at line 368 of file cache1.c.
Referenced by Rast3d_min_unlocked().
void Rast3d_cache_set_remove_fun | ( | RASTER3D_cache * | , |
write_fn * | , | ||
void * | |||
) |
Referenced by Rast3d_flush_all_tiles().
int Rast3d_cache_size_encode | ( | int | cacheCode, |
int | n | ||
) |
Returns a number which encodes multiplicity n of cacheCode. This value can be used to specify the size of the cache. If cacheCode is the size (in tiles) of the cache the function returns cacheCode * n. If cacheCode is RASTER3D_USE_CACHE_DEFAULT the function returns RASTER3D_USE_CACHE_DEFAULT. If cacheCode is RASTER3D_USE_CACHE_??? the function returns a value encoding RASTER3D_USE_CACHE_??? and n. Here RASTER3D_USE_CACHE_??? is one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, or RASTER3D_USE_CACHE_XYZ, where e.g. RASTER3D_USE_CACHE_X specifies that the cache should store as many tiles as there exist in one row along the x-axis of the tile cube, and RASTER3D_USE_CACHE_XY specifies that the cache should store as many tiles as there exist in one slice of the tile cube with constant Z coordinate.
cacheCode | |
n |
Definition at line 315 of file raster3d/header.c.
References Rast3d_fatal_error(), RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, and RASTER3D_USE_CACHE_XYZ.
int Rast3d_cache_unlock | ( | RASTER3D_cache * | c, |
int | name | ||
) |
Definition at line 303 of file cache1.c.
Referenced by Rast3d_unlock_tile().
int Rast3d_cache_unlock_all | ( | RASTER3D_cache * | c | ) |
Definition at line 324 of file cache1.c.
Referenced by Rast3d_unlock_all().
void Rast3d_change_precision | ( | 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 in changeprecision.c.
map | |
precision | |
nameOut |
Definition at line 22 of file changeprecision.c.
References x.
void Rast3d_change_type | ( | void * | map, |
const char * | nameOut | ||
) |
Makes a copy of map with name nameOut in which the cells are of type FCELL_TYPE if they are DCELL_TYPE in map, and in DCELL_TYPE otherwise. The source code can be found in changetype.c.
map | |
nameOut |
Definition at line 22 of file changetype.c.
References x.
int Rast3d_close | ( | RASTER3D_Map * | map | ) |
Close 3D raster map files.
Closes g3d-file. If map is new and cache-mode is used for map then every tile which is not flushed before closing is flushed.
map | pointer to RASTER3D_Map to be closed |
Definition at line 153 of file raster3d/close.c.
References RASTER3D_Map::operation, and RASTER3D_WRITE_DATA.
Referenced by close_g3d_file().
void Rast3d_compare_files | ( | const char * | f1, |
const char * | mapset1, | ||
const char * | f2, | ||
const char * | mapset2 | ||
) |
Compares the cell-values of file f1 in mapset mapset1 and file f2 in mapset mapset2. The values are compared up to precision. Terminates in error if the files don't match. This function uses the more advanced features of the cache. The source code can be found in filecompare.c.
f1 | |
mapset1 | |
f2 | |
mapset2 |
Definition at line 377 of file filecompare.c.
References NULL, Rast3d_fatal_error(), Rast3d_get_coords_map(), Rast3d_get_nof_tiles_map(), Rast3d_get_tile_dimensions_map(), Rast3d_open_cell_old(), Rast3d_print_header(), Rast3d_tile_precision_map(), Rast3d_tile_type_map(), Rast3d_tile_use_cache_map(), RASTER3D_DEFAULT_WINDOW, RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT, and x.
int Rast3d_compute_clipped_tile_dimensions | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
int * | rows, | ||
int * | cols, | ||
int * | depths, | ||
int * | xRedundant, | ||
int * | yRedundant, | ||
int * | zRedundant | ||
) |
Computes the dimensions of the tile when clipped to fit the region of map. The clipped dimensions are returned in rows, cols, depths. The complement is returned in xRedundant, yRedundant, and zRedundant. This function returns the number of cells in the clipped tile.
map | |
tileIndex | |
rows | |
cols | |
depths | |
xRedundant | |
yRedundant | |
zRedundant |
Definition at line 253 of file tilemath.c.
References RASTER3D_Map::clipX, RASTER3D_Map::clipY, RASTER3D_Map::clipZ, RASTER3D_Region::cols, RASTER3D_Region::depths, Rast3d_tile_index2tile(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Map::tileSize, RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, and x.
Referenced by Rast3d_init_index().
void Rast3d_compute_optimal_tile_dimension | ( | RASTER3D_Region * | region, |
int | type, | ||
int * | tileX, | ||
int * | tileY, | ||
int * | tileZ, | ||
int | maxSize | ||
) |
Compute the optimal tile size.
This function computes tile sizes with an optimal ratio between tile dimensions and minimized border tile overlapping. Large dimensions (in most cases x and y) will be reduced more often than small dimensions to fit the maxSize criteria.
region | The region of the map |
type | The type of the map (FCELL_TYPE or DCELL_TYPE) |
tileX | Pointer of the tile size in x direction for result storage |
tileY | Pointer of the tile size in y direction for result storage |
tileZ | Pointer of the tile size in z direction for result storage |
maxSize | The max size of the tile in kilo bytes |
Definition at line 317 of file tilemath.c.
void Rast3d_coord2location | ( | RASTER3D_Region * | region, |
double | x, | ||
double | y, | ||
double | z, | ||
double * | north, | ||
double * | east, | ||
double * | top | ||
) |
Converts cell-coordinates (x, y, z) into region-coordinates (north, east, top).
region | |
x | |
y | |
z | |
north | |
east | |
top |
void Rast3d_coord2tile_coord | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
int * | xTile, | ||
int * | yTile, | ||
int * | zTile, | ||
int * | xOffs, | ||
int * | yOffs, | ||
int * | zOffs | ||
) |
Converts cell-coordinates (x, y, z) into tile-coordinates (xTile, yTile, zTile) and the coordinate of the cell (xOffs, yOffs, zOffs) within the tile.
map | |
x | |
y | |
z | |
xTile | |
yTile | |
zTile | |
xOffs | |
yOffs | |
zOffs |
Definition at line 129 of file tilemath.c.
References RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, and x.
Referenced by Rast3d_coord2tile_index(), and Rast3d_flush_tiles_in_cube().
void Rast3d_coord2tile_index | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
int * | tileIndex, | ||
int * | offset | ||
) |
Converts cell-coordinates (x, y, z) into tileIndex and the offset of the cell within the tile.
map | |
x | |
y | |
z | |
tileIndex | |
offset |
Definition at line 158 of file tilemath.c.
References Rast3d_coord2tile_coord(), Rast3d_tile2tile_index(), RASTER3D_Map::tileX, RASTER3D_Map::tileXY, and x.
Referenced by Rast3d_get_double_region(), Rast3d_get_float_region(), Rast3d_put_double(), and Rast3d_put_float().
int Rast3d_coord_in_range | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Returns 1 if cell-coordinate (x, y, z) is a coordinate inside the region. Returns 0 otherwise.
map | |
x | |
y | |
z |
Definition at line 185 of file tilemath.c.
References RASTER3D_Region::cols, RASTER3D_Region::depths, RASTER3D_Map::region, RASTER3D_Region::rows, and x.
void Rast3d_copy_double2Float | ( | const double * | src, |
int | offsSrc, | ||
float * | dst, | ||
int | offsDst, | ||
int | nElts | ||
) |
Definition at line 36 of file raster3d/misc.c.
void Rast3d_copy_float2Double | ( | const float * | src, |
int | offsSrc, | ||
double * | dst, | ||
int | offsDst, | ||
int | nElts | ||
) |
Definition at line 22 of file raster3d/misc.c.
void Rast3d_copy_values | ( | const void * | src, |
int | offsSrc, | ||
int | typeSrc, | ||
void * | dst, | ||
int | offsDst, | ||
int | typeDst, | ||
int | nElts | ||
) |
Definition at line 50 of file raster3d/misc.c.
int Rast3d_dispose_cache | ( | RASTER3D_Map * | map | ) |
Definition at line 249 of file cache.c.
References RASTER3D_Map::operation, and RASTER3D_READ_DATA.
int Rast3d_end_cycle | ( | RASTER3D_Map * | map | ) |
Ends a cycle.
map |
Definition at line 434 of file tileread.c.
References Rast3d_autolock_off().
void Rast3d_error | ( | const char * | , |
... | |||
) |
Referenced by Rast3d__remove_tile(), Rast3d_alloc_tiles(), Rast3d_flush_all_tiles(), Rast3d_flush_tile(), Rast3d_flush_tile_cube(), Rast3d_flush_tiles_in_cube(), Rast3d_get_tile_ptr(), Rast3d_init_fp_xdr(), Rast3d_init_index(), Rast3d_lock_tile(), Rast3d_malloc(), Rast3d_open_cell_old_no_header(), Rast3d_put_double(), Rast3d_put_float(), Rast3d_read_tile_double(), Rast3d_read_tile_float(), Rast3d_realloc(), Rast3d_tile_load(), Rast3d_unlock_all(), Rast3d_unlock_tile(), Rast3d_write_tile_double(), and Rast3d_write_tile_float().
int Rast3d_extern_length | ( | int | t | ) |
Definition at line 87 of file raster3d/misc.c.
References DCELL_TYPE, FCELL_TYPE, Rast3d_fatal_error(), RASTER3D_IS_CORRECT_TYPE, RASTER3D_XDR_DOUBLE_LENGTH, RASTER3D_XDR_FLOAT_LENGTH, and t.
void Rast3d_extract2d_region | ( | RASTER3D_Region * | region3d, |
struct Cell_head * | region2d | ||
) |
Returns in region2d the 2d portion of region3d.
region3d | |
region2d |
Definition at line 19 of file region.c.
References Cell_head::cols, RASTER3D_Region::cols, Cell_head::east, RASTER3D_Region::east, Cell_head::ew_res, RASTER3D_Region::ew_res, Cell_head::north, RASTER3D_Region::north, Cell_head::ns_res, RASTER3D_Region::ns_res, Cell_head::proj, RASTER3D_Region::proj, Cell_head::rows, RASTER3D_Region::rows, Cell_head::south, RASTER3D_Region::south, Cell_head::west, RASTER3D_Region::west, Cell_head::zone, and RASTER3D_Region::zone.
void Rast3d_fatal_error | ( | const char * | , |
... | |||
) |
Referenced by Rast3d__compute_cache_size(), Rast3d_autolock_off(), Rast3d_autolock_on(), Rast3d_begin_cycle(), Rast3d_cache_size_encode(), Rast3d_compare_files(), Rast3d_extern_length(), Rast3d_flush_tile_cube(), Rast3d_flush_tiles_in_cube(), Rast3d_get_double_region(), Rast3d_get_float_region(), Rast3d_length(), Rast3d_lock_tile(), Rast3d_min_unlocked(), Rast3d_set_cache_limit(), Rast3d_set_cache_size(), Rast3d_set_compression_mode(), Rast3d_set_tile_dimension(), Rast3d_unlock_all(), Rast3d_unlock_tile(), and Rast3d_write_ascii().
void Rast3d_fatal_error_noargs | ( | const char * | msg | ) |
Definition at line 63 of file raster3d/error.c.
References G_fatal_error().
int Rast3d_file_type_map | ( | RASTER3D_Map * | map | ) |
Returns the type with which tiles of map are stored on file.
map |
Definition at line 276 of file headerinfo.c.
References RASTER3D_Map::type.
void Rast3d_filename | ( | char * | path, |
const char * | elementName, | ||
const char * | mapName, | ||
const char * | mapset | ||
) |
Definition at line 9 of file filename.c.
References G_file_name_misc(), and RASTER3D_DIRECTORY.
Referenced by Rast3d_range_write().
int Rast3d_fill_header | ( | RASTER3D_Map * | map, |
int | operation, | ||
int | compression, | ||
int | useRle, | ||
int | useLzw, | ||
int | type, | ||
int | precision, | ||
int | cache, | ||
int | hasIndex, | ||
int | useXdr, | ||
int | typeIntern, | ||
int | nofHeaderBytes, | ||
int | tileX, | ||
int | tileY, | ||
int | tileZ, | ||
int | proj, | ||
int | zone, | ||
double | north, | ||
double | south, | ||
double | east, | ||
double | west, | ||
double | top, | ||
double | bottom, | ||
int | rows, | ||
int | cols, | ||
int | depths, | ||
double | ew_res, | ||
double | ns_res, | ||
double | tb_res, | ||
char * | unit, | ||
int | vertical_unit, | ||
int | version | ||
) |
Definition at line 369 of file raster3d/header.c.
int Rast3d_flush_all_tiles | ( | RASTER3D_Map * | map | ) |
Definition at line 283 of file cache.c.
References RASTER3D_Map::cache, RASTER3D_Map::operation, Rast3d_cache_remove_all(), Rast3d_cache_set_remove_fun(), Rast3d_error(), and RASTER3D_READ_DATA.
int Rast3d_flush_index | ( | RASTER3D_Map * | map | ) |
Definition at line 91 of file raster3d/index.c.
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 253 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 298 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 344 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.
void Rast3d_fpcompress_dissect_xdr_double | ( | unsigned char * | numPointer | ) |
Definition at line 31 of file fpcompress.c.
References Rast3d_fpcompress_print_binary(), and sign().
void Rast3d_fpcompress_print_binary | ( | char * | c, |
int | numBits | ||
) |
Definition at line 16 of file fpcompress.c.
Referenced by Rast3d_fpcompress_dissect_xdr_double().
int Rast3d_fpcompress_read_xdr_nums | ( | int | fd, |
char * | dst, | ||
int | nofNum, | ||
int | fileBytes, | ||
int | precision, | ||
char * | compressBuf, | ||
int | isFloat | ||
) |
Definition at line 716 of file fpcompress.c.
int Rast3d_fpcompress_write_xdr_nums | ( | int | fd, |
char * | src, | ||
int | nofNum, | ||
int | precision, | ||
char * | compressBuf, | ||
int | isFloat | ||
) |
Definition at line 685 of file fpcompress.c.
void Rast3d_free | ( | void * | buf | ) |
Same as free (ptr).
buf |
Definition at line 66 of file raster3d/alloc.c.
References free().
Referenced by Rast3d_free_tiles().
void Rast3d_free_tiles | ( | void * | tiles | ) |
Is equivalent to Rast3d_free (tiles);
tiles |
Definition at line 73 of file tilealloc.c.
References Rast3d_free().
int Rast3d_g3d_type2cell_type | ( | int | g3dType | ) |
Definition at line 13 of file raster3d/misc.c.
References DCELL_TYPE, and FCELL_TYPE.
void Rast3d_get_aligned_volume | ( | void * | map, |
double | originNorth, | ||
double | originWest, | ||
double | originBottom, | ||
double | lengthNorth, | ||
double | lengthWest, | ||
double | lengthBottom, | ||
int | nx, | ||
int | ny, | ||
int | nz, | ||
void * | volumeBuf, | ||
int | type | ||
) |
void Rast3d_get_block | ( | RASTER3D_Map * | map, |
int | x0, | ||
int | y0, | ||
int | z0, | ||
int | nx, | ||
int | ny, | ||
int | nz, | ||
void * | block, | ||
int | type | ||
) |
Copies the cells contained in the block (cube) with vertices (x0, y0, z0) and (x0 + nx - 1, y0 + ny - 1, z0 + nz - 1) into block. The cell-values in block are of type. The source code can be found in getblock.c.
map | |
x0 | |
y0 | |
z0 | |
nx | |
ny | |
nz | |
block | |
type |
Definition at line 102 of file getblock.c.
void Rast3d_get_block_nocache | ( | RASTER3D_Map * | map, |
int | x0, | ||
int | y0, | ||
int | z0, | ||
int | nx, | ||
int | ny, | ||
int | nz, | ||
void * | block, | ||
int | type | ||
) |
Definition at line 11 of file getblock.c.
int Rast3d_get_cache_limit | ( | void | ) |
int Rast3d_get_cache_size | ( | void | ) |
void Rast3d_get_compression_mode | ( | int * | doCompress, |
int * | precision | ||
) |
Gets compression mode.
doCompress | pointer to the integer where the compression mode will be stored |
precision | pointer to the integer where the precision mode will be stored |
Definition at line 127 of file defaults.c.
References g3d_do_compression, g3d_precision, and NULL.
void Rast3d_get_coords_map | ( | RASTER3D_Map * | map, |
int * | rows, | ||
int * | cols, | ||
int * | depths | ||
) |
Returns the size of the region of map in cells.
map | |
rows | |
cols | |
depths |
Definition at line 18 of file headerinfo.c.
References RASTER3D_Region::cols, RASTER3D_Region::depths, RASTER3D_Map::region, and RASTER3D_Region::rows.
Referenced by Rast3d_compare_files(), Rast3d_flush_tiles_in_cube(), and Rast3d_write_ascii().
void Rast3d_get_coords_map_window | ( | RASTER3D_Map * | map, |
int * | rows, | ||
int * | cols, | ||
int * | depths | ||
) |
Definition at line 27 of file headerinfo.c.
References RASTER3D_Region::cols, RASTER3D_Region::depths, RASTER3D_Region::rows, and RASTER3D_Map::window.
double Rast3d_get_double | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Is equivalent to Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE);
return value.
map | |
x | |
y | |
z |
Definition at line 68 of file getvalue.c.
References DCELL_TYPE, Rast3d_get_value(), and x.
double Rast3d_get_double_region | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, DCELL_TYPE);
return value.
map | |
x | |
y | |
z |
Definition at line 208 of file getvalue.c.
References RASTER3D_Region::cols, DCELL_TYPE, RASTER3D_Region::depths, FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_fatal_error(), Rast3d_get_float_region(), Rast3d_get_tile_ptr(), Rast3d_set_null_value(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Map::typeIntern, and x.
Referenced by Rast3d_get_float_region().
int Rast3d_get_file_type | ( | void | ) |
float Rast3d_get_float | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Is equivalent to Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE);
return value.
map | |
x | |
y | |
z |
Definition at line 44 of file getvalue.c.
References FCELL_TYPE, Rast3d_get_value(), and x.
float Rast3d_get_float_region | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, FCELL_TYPE);
return value.
map | |
x | |
y | |
z |
Definition at line 165 of file getvalue.c.
References RASTER3D_Region::cols, DCELL_TYPE, RASTER3D_Region::depths, FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_fatal_error(), Rast3d_get_double_region(), Rast3d_get_tile_ptr(), Rast3d_set_null_value(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Map::typeIntern, and x.
Referenced by Rast3d_get_double_region().
void Rast3d_get_nearest_neighbor_fun_ptr | ( | void(**)(RASTER3D_Map *, int, int, int, void *, int) | nnFunPtr | ) |
Returns in nnFunPtr a pointer to Rast3d_nearest_neighbor () (cf.{g3d:G3d.nearestNeighbor}).
Definition at line 91 of file resample.c.
References Rast3d_nearest_neighbor().
void Rast3d_get_nof_tiles_map | ( | RASTER3D_Map * | map, |
int * | nx, | ||
int * | ny, | ||
int * | nz | ||
) |
Returns the dimensions of the tile-cube used to tile the region of map. These numbers include partial tiles.
map | |
nx | |
ny | |
nz |
Definition at line 50 of file headerinfo.c.
References RASTER3D_Map::nx, RASTER3D_Map::ny, and RASTER3D_Map::nz.
Referenced by Rast3d_compare_files().
void Rast3d_get_region_map | ( | RASTER3D_Map * | map, |
double * | north, | ||
double * | south, | ||
double * | east, | ||
double * | west, | ||
double * | top, | ||
double * | bottom | ||
) |
Returns the size of the region.
map | |
north | |
south | |
east | |
west | |
top | |
bottom |
Definition at line 74 of file headerinfo.c.
References RASTER3D_Region::bottom, RASTER3D_Region::east, RASTER3D_Region::north, RASTER3D_Map::region, RASTER3D_Region::south, RASTER3D_Region::top, and RASTER3D_Region::west.
void Rast3d_get_region_struct_map | ( | RASTER3D_Map * | map, |
RASTER3D_Region * | region | ||
) |
Returns in region the region of map.
map | |
region |
Definition at line 112 of file headerinfo.c.
void Rast3d_get_region_value | ( | RASTER3D_Map * | map, |
double | north, | ||
double | east, | ||
double | top, | ||
void * | value, | ||
int | type | ||
) |
Returns in value the value of the map which corresponds to region coordinates (north, east, top).
map | |
north | |
east | |
top | |
value | |
type |
Definition at line 131 of file getvalue.c.
void Rast3d_get_resampling_fun | ( | RASTER3D_Map * | map, |
void(**)(RASTER3D_Map *, int, int, int, void *, int) | resampleFun | ||
) |
Returns in resampleFun a pointer to the resampling function used by map.
Definition at line 72 of file resample.c.
References RASTER3D_Map::resampleFun.
int Rast3d_get_standard3d_params | ( | int * | useTypeDefault, |
int * | type, | ||
int * | useCompressionDefault, | ||
int * | doCompression, | ||
int * | usePrecisionDefault, | ||
int * | precision, | ||
int * | useDimensionDefault, | ||
int * | tileX, | ||
int * | tileY, | ||
int * | tileZ | ||
) |
void Rast3d_get_tile_dimension | ( | int * | tileX, |
int * | tileY, | ||
int * | tileZ | ||
) |
get Tile Dimension
tileX | |
tileY | |
tileZ |
Definition at line 262 of file defaults.c.
References g3d_tile_dimension.
void Rast3d_get_tile_dimensions_map | ( | RASTER3D_Map * | map, |
int * | x, | ||
int * | y, | ||
int * | z | ||
) |
Returns the tile dimensions used for map.
map | |
x | |
y | |
z |
Definition at line 138 of file headerinfo.c.
References RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, and x.
Referenced by Rast3d_compare_files().
void* Rast3d_get_tile_ptr | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
This function returns a pointer to a tile which contains the data for the tile with index tileIndex. The type of the data stored in the tile depends on the type specified at the initialization time of map. The functionality is different depending on whether map is old or new and depending on the cache-mode of map.
If map is old and the cache is not used the tile with tileIndex is read from file and stored in the buffer provided by the map structure. The pointer to this buffer is returned. If the buffer already contains the tile with tileIndex reading is skipped. Data which was stored in earlier calls to Rast3d_get_tile_ptr
is destroyed. If the tile with tileIndex is not stored on the file corresponding to map, and tileIndex is a valid index the buffer is filled with NULL-values.
If map is old and the cache is used the tile with tileIndex is read from file and stored in one of the cache buffers. The pointer to buffer is returned. If no free cache buffer is available an unlocked cache-buffer is freed up and the new tile is stored in its place. If the tile with tileIndex is not stored on the file corresponding to map, and tileIndex is a valid index the buffer is filled with NULL-values. If one of the cache buffers already contains the tile with tileIndex reading is skipped and the pointer to this buffer is returned.
If map is new and the cache is not used the functionality is the same as if map is old and the cache is not used. If the tile with tileIndex is already stored on file, it is read into the buffer, if not, the cells are set to null-values. If the buffer corresponding to the pointer is used for writing, subsequent calls to Rast3d_get_tile_ptr
may destroy the values already stored in the buffer. Use Rast3d_flush_tile
to write the buffer to the file before reusing it for a different index. The use of this buffer as write buffer is discouraged.
If map is new and the cache is used the functionality is the same as if map is old and the cache is used with the following exception. If tileIndex is a valid index and the tile with this index is not found in the cache and is not stored on the file corresponding to map, then the file cache is queried next. If the file-cache contains the tile it is loaded into the cache (memory-cache). Only if the file-cache does not contain the tile it is filled with NULL-values. Tile contents of buffers are never destroyed. If a cache buffer needs to be freed up, and the tile stored in the buffer has not been written to the file corresponding to map yet, the tile is copied into the file-cache.
Care has to be taken if this function is used in non-cache mode since it is implicitly invoked every time a read or write request is issued. The only I/O-functions for which it is safe to assume that they do not invoke Rast3d_get_tile_ptr
are Rast3d_read_tile()
and Rast3d_write_tile()
and their corresponding type-specific versions.
map | |
tileIndex |
Definition at line 79 of file tileio.c.
References RASTER3D_Map::cache, RASTER3D_Map::currentIndex, RASTER3D_Map::data, RASTER3D_Map::nTiles, NULL, Rast3d_cache_elt_ptr(), Rast3d_error(), Rast3d_read_tile(), RASTER3D_Map::typeIntern, and RASTER3D_Map::useCache.
Referenced by Rast3d_flush_tile(), Rast3d_get_double_region(), Rast3d_get_float_region(), Rast3d_put_double(), Rast3d_put_float(), and Rast3d_tile_load().
const char* Rast3d_get_unit | ( | RASTER3D_Map * | map | ) |
Return the data unit definition of map.
map |
Definition at line 223 of file headerinfo.c.
References RASTER3D_Map::unit.
void Rast3d_get_value | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
void * | value, | ||
int | type | ||
) |
Returns in *value the resampled cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs.
map | |
x | |
y | |
z | |
value | |
type |
Definition at line 22 of file getvalue.c.
Referenced by Rast3d_get_double(), and Rast3d_get_float().
void Rast3d_get_value_region | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
void * | value, | ||
int | type | ||
) |
Returns in *value the cell-value of the cell with region-coordinate (x, y, z). The value returned is of type. Here region means the coordinate in the cube of data in the file, i.e. ignoring geographic coordinates. In case the region coordinates are out of bounds, the Null value will be returned. This function invokes a fatal error if an error occurs.
map | |
x | |
y | |
z | |
value | |
type |
Definition at line 257 of file getvalue.c.
Referenced by Rast3d_write_ascii().
const char* Rast3d_get_vertical_unit | ( | RASTER3D_Map * | map | ) |
Return the name of the unit of map. Units are defined in gis.h.
Vertical units may have temporal type
map |
Definition at line 260 of file headerinfo.c.
References G_get_units_name(), and RASTER3D_Map::vertical_unit.
int Rast3d_get_vertical_unit2 | ( | RASTER3D_Map * | map | ) |
Returns the vertical unit of map as integer. Units are defined in gis.h.
Vertical units may have temporal type
map |
Definition at line 242 of file headerinfo.c.
References RASTER3D_Map::vertical_unit.
void Rast3d_get_volume | ( | void * | map, |
double | originNorth, | ||
double | originWest, | ||
double | originBottom, | ||
double | vxNorth, | ||
double | vxWest, | ||
double | vxBottom, | ||
double | vyNorth, | ||
double | vyWest, | ||
double | vyBottom, | ||
double | vzNorth, | ||
double | vzWest, | ||
double | vzBottom, | ||
int | nx, | ||
int | ny, | ||
int | nz, | ||
void * | volumeBuf, | ||
int | type | ||
) |
void Rast3d_get_volume_a | ( | void * | map, |
double | u[2][2][2][3], | ||
int | nx, | ||
int | ny, | ||
int | nz, | ||
void * | volumeBuf, | ||
int | type | ||
) |
void Rast3d_get_window | ( | RASTER3D_Region * | window | ) |
Stores the current default window in window.
window |
Definition at line 58 of file raster3d/window.c.
Referenced by GVL_libinit().
void Rast3d_get_window_map | ( | RASTER3D_Map * | map, |
double * | north, | ||
double * | south, | ||
double * | east, | ||
double * | west, | ||
double * | top, | ||
double * | bottom | ||
) |
Definition at line 88 of file headerinfo.c.
References RASTER3D_Region::bottom, RASTER3D_Region::east, RASTER3D_Region::north, RASTER3D_Region::south, RASTER3D_Region::top, RASTER3D_Region::west, and RASTER3D_Map::window.
void Rast3d_get_window_value | ( | RASTER3D_Map * | map, |
double | north, | ||
double | east, | ||
double | top, | ||
void * | value, | ||
int | type | ||
) |
Returns in value the value of the map which corresponds to window coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type.
map | |
north | |
east | |
top | |
value | |
type |
Definition at line 95 of file getvalue.c.
void Rast3d_gradient_double | ( | RASTER3D_Array_double * | array, |
double * | step, | ||
RASTER3D_Array_double * | grad_x, | ||
RASTER3D_Array_double * | grad_y, | ||
RASTER3D_Array_double * | grad_z | ||
) |
Gradient computation.
Gradient computation (second order approximation) using central differencing scheme (plus forward and backward difference of second order approximation). When one or more of the cells, from which the gradient for a particular cell is computed, is null, gradient for that particular cell is set to 0.
array | pointer to RASTER3D_Array with input values | |
step | array of x, y, z steps for gradient (resolution values) | |
[out] | grad_x | pointer to RASTER3D_Array_double with gradient in x direction |
[out] | grad_y | pointer to RASTER3D_Array_double with gradient in y direction |
[out] | grad_z | pointer to RASTER3D_Array_double with gradient in z direction |
Definition at line 34 of file gradient.c.
void Rast3d_incorporate2d_region | ( | struct Cell_head * | region2d, |
RASTER3D_Region * | region3d | ||
) |
Replaces the 2d portion of region3d with the values stored in region2d.
region2d | |
region3d |
Definition at line 86 of file region.c.
References Cell_head::cols, RASTER3D_Region::cols, Cell_head::east, RASTER3D_Region::east, Cell_head::ew_res, RASTER3D_Region::ew_res, Cell_head::north, RASTER3D_Region::north, Cell_head::ns_res, RASTER3D_Region::ns_res, Cell_head::proj, RASTER3D_Region::proj, Cell_head::rows, RASTER3D_Region::rows, Cell_head::south, RASTER3D_Region::south, Cell_head::west, RASTER3D_Region::west, Cell_head::zone, and RASTER3D_Region::zone.
int Rast3d_init_cache | ( | RASTER3D_Map * | map, |
int | nCached | ||
) |
Definition at line 221 of file cache.c.
References RASTER3D_Map::operation, and RASTER3D_READ_DATA.
int Rast3d_init_copy_from_xdr | ( | RASTER3D_Map * | map, |
int | dType | ||
) |
int Rast3d_init_copy_to_xdr | ( | RASTER3D_Map * | map, |
int | sType | ||
) |
void Rast3d_init_defaults | ( | void | ) |
Initializes the default values described in RASTER3D Defaults. Applications have to use this function only if they need to query the default values before the first file (either old or new) has been opened.
Definition at line 294 of file defaults.c.
Referenced by GVL_libinit(), and Rast3d_open_cell_old_no_header().
int Rast3d_init_fp_xdr | ( | RASTER3D_Map * | map, |
int | misuseBytes | ||
) |
Definition at line 65 of file fpxdr.c.
References NULL, RASTER3D_Map::numLengthExtern, RASTER3D_Map::numLengthIntern, Rast3d_error(), Rast3d_malloc(), Rast3d_realloc(), RASTER3D_MAX, RASTER3D_Map::tileSize, xdr, and xdrLength.
int Rast3d_init_index | ( | RASTER3D_Map * | map, |
int | hasIndex | ||
) |
Definition at line 157 of file raster3d/index.c.
References RASTER3D_Map::hasIndex, RASTER3D_Map::index, RASTER3D_Map::nTiles, NULL, RASTER3D_Map::numLengthExtern, RASTER3D_Map::offset, RASTER3D_Map::operation, Rast3d_compute_clipped_tile_dimensions(), Rast3d_error(), Rast3d_malloc(), RASTER3D_WRITE_DATA, and RASTER3D_Map::tileLength.
int Rast3d_is_masked | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
int Rast3d_is_null_value_num | ( | const void * | n, |
int | type | ||
) |
Definition at line 12 of file null.c.
Referenced by N_copy_array_3d(), and Rast3d_print_header().
int Rast3d_is_valid_location | ( | RASTER3D_Region * | region, |
double | north, | ||
double | east, | ||
double | top | ||
) |
int Rast3d_is_xdr_null_float | ( | const float * | f | ) |
Definition at line 24 of file fpxdr.c.
References Rast3d_is_xdr_null_num().
void int Rast3d_is_xdr_null_num | ( | const void * | num, |
int | isFloat | ||
) |
Definition at line 13 of file fpxdr.c.
Referenced by Rast3d_is_xdr_null_float().
int Rast3d_key_get_double | ( | struct Key_Value * | keys, |
const char * | key, | ||
double * | d | ||
) |
int Rast3d_key_get_int | ( | struct Key_Value * | keys, |
const char * | key, | ||
int * | i | ||
) |
int Rast3d_key_get_string | ( | struct Key_Value * | keys, |
const char * | key, | ||
char ** | returnStr | ||
) |
int Rast3d_key_get_value | ( | struct Key_Value * | keys, |
const char * | key, | ||
char * | val1, | ||
char * | val2, | ||
int | result1, | ||
int | result2, | ||
int * | resultVar | ||
) |
int Rast3d_key_set_double | ( | struct Key_Value * | keys, |
const char * | key, | ||
const double * | d | ||
) |
int Rast3d_key_set_int | ( | struct Key_Value * | keys, |
const char * | key, | ||
const int * | i | ||
) |
int Rast3d_key_set_string | ( | struct Key_Value * | keys, |
const char * | key, | ||
char *const * | keyValStr | ||
) |
int Rast3d_key_set_value | ( | struct Key_Value * | keys, |
const char * | key, | ||
const char * | val1, | ||
const char * | val2, | ||
int | keyval1, | ||
int | keyval2, | ||
const int * | keyvalVar | ||
) |
int Rast3d_length | ( | int | t | ) |
Definition at line 75 of file raster3d/misc.c.
References DCELL_TYPE, FCELL_TYPE, Rast3d_fatal_error(), RASTER3D_IS_CORRECT_TYPE, and t.
void Rast3d_location2coord | ( | RASTER3D_Region * | region, |
double | north, | ||
double | east, | ||
double | top, | ||
int * | x, | ||
int * | y, | ||
int * | z | ||
) |
void Rast3d_location2coord2 | ( | RASTER3D_Region * | region, |
double | north, | ||
double | east, | ||
double | top, | ||
int * | x, | ||
int * | y, | ||
int * | z | ||
) |
void Rast3d_location2coord_double | ( | RASTER3D_Region * | region, |
double | north, | ||
double | east, | ||
double | top, | ||
double * | x, | ||
double * | y, | ||
double * | z | ||
) |
int Rast3d_lock_tile | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
Locks tile with tileIndex in cache. If after locking fewer than the minimum number of unlocked tiles are unlocked, the lock request is ignored.
map | |
tileIndex |
Definition at line 262 of file tileread.c.
References RASTER3D_Map::cache, Rast3d_cache_lock(), Rast3d_error(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
void Rast3d_long_decode | ( | unsigned char * | source, |
long * | dst, | ||
int | nofNums, | ||
int | longNbytes | ||
) |
int Rast3d_long_encode | ( | long * | source, |
unsigned char * | dst, | ||
int | nofNums | ||
) |
void Rast3d_make_aligned_volume_file | ( | void * | map, |
const char * | fileName, | ||
double | originNorth, | ||
double | originWest, | ||
double | originBottom, | ||
double | lengthNorth, | ||
double | lengthWest, | ||
double | lengthBottom, | ||
int | nx, | ||
int | ny, | ||
int | nz | ||
) |
void Rast3d_make_mapset_map_directory | ( | const char * | mapName | ) |
Definition at line 9 of file raster3d/mapset.c.
References G_make_mapset_dir_object(), and RASTER3D_DIRECTORY.
void* Rast3d_malloc | ( | int | nBytes | ) |
Same as malloc (nBytes), except that in case of error Rast3d_error()
is invoked.
nBytes |
Definition at line 21 of file raster3d/alloc.c.
References malloc(), NULL, and Rast3d_error().
Referenced by Rast3d_init_fp_xdr(), Rast3d_init_index(), and Rast3d_open_cell_old_no_header().
Definition at line 45 of file maskfn.c.
References _d_mask::list, _d_interval::next, NULL, Rast3d_mask_match_d_interval(), and x.
void Rast3d_mask_double | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
double * | value | ||
) |
const char* Rast3d_mask_file | ( | void | ) |
Returns the name of the 3d mask file.
Definition at line 387 of file mask.c.
References RASTER3D_MASK_MAP.
int Rast3d_mask_file_exists | ( | void | ) |
Returns 1 if the 3d mask file exists.
Definition at line 64 of file mask.c.
References G_find_file_misc(), G_mapset(), NULL, RASTER3D_CELL_ELEMENT, RASTER3D_DIRECTORY, and RASTER3D_MASK_MAP.
void Rast3d_mask_float | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
float * | value | ||
) |
int Rast3d_mask_is_off | ( | RASTER3D_Map * | map | ) |
Returns 1 if the mask for map is turned off. Returns 0 otherwise.
map |
Definition at line 374 of file mask.c.
References RASTER3D_Map::useMask.
int Rast3d_mask_is_on | ( | RASTER3D_Map * | map | ) |
Returns 1 if the mask for map is turned on. Returns 0 otherwise.
map |
Definition at line 360 of file mask.c.
References RASTER3D_Map::useMask.
int Rast3d_mask_map_exists | ( | void | ) |
DCELL Rast3d_mask_match_d_interval | ( | DCELL | x, |
d_Interval * | I | ||
) |
Definition at line 58 of file maskfn.c.
References _d_interval::high, _d_interval::inf, _d_interval::low, and x.
Referenced by Rast3d_mask_d_select().
void Rast3d_mask_num | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
void * | value, | ||
int | type | ||
) |
void Rast3d_mask_off | ( | RASTER3D_Map * | map | ) |
Turns off the mask for map. This is the default. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values.
map |
Definition at line 345 of file mask.c.
References RASTER3D_Map::useMask.
Referenced by Rast3d_open_cell_old_no_header().
void Rast3d_mask_on | ( | RASTER3D_Map * | map | ) |
Turns on the mask for map. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values.
map |
Definition at line 329 of file mask.c.
References RASTER3D_Map::useMask.
int Rast3d_mask_open_old | ( | void | ) |
Definition at line 74 of file mask.c.
Referenced by Rast3d_open_cell_old_no_header().
int Rast3d_mask_reopen | ( | int | cache | ) |
void Rast3d_mask_tile | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
void * | tile, | ||
int | type | ||
) |
Replaces the values stored in tile (with tileIndex) for which Rast3d_is_masked returns 1 with NULL-values. Does not change the remaining values. The values are assumed to be of type. Whether replacement is performed or not only depends on location of the cells of the tile and not on the status of the mask for map (i.e. turned on or off).
map | |
tileIndex | |
tile | |
type |
void Rast3d_min_unlocked | ( | RASTER3D_Map * | map, |
int | minUnlocked | ||
) |
Sets the minimum number of unlocked tiles to minUnlocked. This function should be used in combination with Rast3d_unlock_all ()
in order to avoid situations where the new minimum is larger than the actual number of unlocked tiles. minUnlocked must be one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode() (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which explicitly specifies the number of tiles.
map | |
minUnlocked |
Definition at line 389 of file tileread.c.
References RASTER3D_Map::cache, Rast3d__compute_cache_size(), Rast3d_cache_set_min_unlock(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
void Rast3d_nearest_neighbor | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
void * | value, | ||
int | type | ||
) |
The default resampling function which uses nearest neighbor resampling. This method converts the window coordinates x, y, and z into region coordinates and returned the nearest neighbor.
map | |
col | |
row | |
depth | |
value | |
type |
Definition at line 23 of file resample.c.
Referenced by Rast3d_get_nearest_neighbor_fun_ptr().
void* Rast3d_open_cell_new | ( | const char * | name, |
int | typeIntern, | ||
int | cache, | ||
RASTER3D_Region * | region | ||
) |
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode ()
(cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.
name | |
type | |
cache | |
region |
Definition at line 209 of file raster3d/open.c.
void* Rast3d_open_cell_old | ( | const char * | name, |
const char * | mapset, | ||
RASTER3D_Region * | window, | ||
int | typeIntern, | ||
int | cache | ||
) |
Opens existing g3d-file name in mapset. Tiles are stored in memory with type which must be any of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode ()
(cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. window sets the window-region for the map. It is either a pointer to a window structure or RASTER3D_DEFAULT_WINDOW, which uses the window stored at initialization time or set via Rast3d_set_window ()
(cf.{g3d:G3d.setWindow}). To modify the window for the map after it has already been opened use Rast3d_set_window_map ()
(cf.{g3d:G3d.setWindowMap}). Returns a pointer to the cell structure ... if successful, NULL ... otherwise.
name | |
mapset | |
window | |
type | |
cache |
Definition at line 80 of file raster3d/open.c.
Referenced by Rast3d_compare_files().
void* Rast3d_open_cell_old_no_header | ( | const char * | name, |
const char * | mapset | ||
) |
Definition at line 12 of file raster3d/open.c.
References _, RASTER3D_Map::data_fd, RASTER3D_Map::fileName, G_open_old_misc(), G_store(), G_unqualified_name(), GMAPSET_MAX, GNAME_MAX, RASTER3D_Map::mapset, name, NULL, Rast3d_error(), Rast3d_init_defaults(), Rast3d_malloc(), Rast3d_mask_off(), Rast3d_mask_open_old(), Rast3d_range_init(), RASTER3D_CELL_ELEMENT, and RASTER3D_DIRECTORY.
void* Rast3d_open_new_opt_tile_size | ( | const char * | name, |
int | cache, | ||
RASTER3D_Region * | region, | ||
int | type, | ||
int | maxSize | ||
) |
Opens new g3d-file with name in the current mapset. This method tries to compute optimal tile size based on the number of rows, cols and depths and the maximum allowed tile size in KB. Tiles are stored in memory using RASTER3D_TILE_SAME_AS_FILE method. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode ()
(cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.
name | The name of the map |
cache | The type of the caching |
region | The region of the map |
type | The type of the map (FCELL_TYPE, or DCELL_TYPE) |
maxSize | The maximum size of a tile in kilo bytes |
void* Rast3d_open_new_param | ( | const char * | name, |
int | typeIntern, | ||
int | cache, | ||
RASTER3D_Region * | region, | ||
int | type, | ||
int | compression, | ||
int | precision, | ||
int | tileX, | ||
int | tileY, | ||
int | tileZ | ||
) |
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with typeIntern which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode ()
(cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. The methods for compression can be specified LZW or RLE. The digits of the floating point mantissa can be specified. In case of FCELL_TYPE 0-23 and 0-52 in case of DCELL_TYPE. The number cells in X, Y and Z direction defines the size of each tile. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.
name | The name of the map |
typeIntern | The internal storage type for in memory cached tiles |
cache | The type of the caching |
region | The region of the map |
type | The type of the map (FCELL_TYPE, or DCELL_TYPE) |
doLzw | Use the LZW compression algorithm |
doRle | Use the Run-Length-Encoding algroithm for compression |
precision | The precision used for the mantissa (0 - 52) or RASTER3D_MAX_PRECISION |
tileX | The number of cells in X direction of a tile |
tileY | The number of cells in Y direction of a tile |
tileZ | The number of cells in Z direction of a tile |
void Rast3d_parse_vallist | ( | char ** | vallist, |
d_Mask ** | d_mask | ||
) |
void Rast3d_print_error | ( | const char * | msg | ) |
Prints error message.
This function prints the error message msg to stderr and returns.
msg |
Definition at line 34 of file raster3d/error.c.
void Rast3d_print_header | ( | RASTER3D_Map * | map | ) |
Prints the header information of map.
map |
Definition at line 322 of file headerinfo.c.
References RASTER3D_Region::bottom, RASTER3D_Region::cols, RASTER3D_Map::compression, RASTER3D_Map::data_fd, DCELL_TYPE, RASTER3D_Region::depths, RASTER3D_Region::east, FCELL_TYPE, RASTER3D_Map::fileName, G_get_units_name(), RASTER3D_Region::north, RASTER3D_Map::nx, RASTER3D_Map::ny, RASTER3D_Map::nz, RASTER3D_Map::operation, RASTER3D_Map::precision, Rast3d_is_null_value_num(), Rast3d_range_min_max(), RASTER3D_NO_COMPRESSION, RASTER3D_READ_DATA, RASTER3D_WRITE_DATA, RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Region::south, RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, RASTER3D_Region::top, RASTER3D_Map::type, RASTER3D_Map::typeIntern, RASTER3D_Map::unit, RASTER3D_Map::useCache, RASTER3D_Map::useLzw, RASTER3D_Map::useRle, RASTER3D_Map::version, RASTER3D_Map::vertical_unit, and RASTER3D_Region::west.
Referenced by Rast3d_compare_files().
int Rast3d_put_double | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
double | value | ||
) |
Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE).
map | |
x | |
y | |
z | |
value |
Definition at line 53 of file putvalue.c.
References FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_error(), Rast3d_get_tile_ptr(), Rast3d_put_float(), RASTER3D_Map::typeIntern, and x.
Referenced by Rast3d_put_float().
int Rast3d_put_float | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z, | ||
float | value | ||
) |
Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE).
map | |
x | |
y | |
z | |
value |
Definition at line 18 of file putvalue.c.
References DCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_error(), Rast3d_get_tile_ptr(), Rast3d_put_double(), RASTER3D_Map::typeIntern, and x.
Referenced by Rast3d_put_double().
int Rast3d_put_value | ( | RASTER3D_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).
map | |
x | |
y | |
z | |
value | |
type |
Definition at line 92 of file putvalue.c.
int Rast3d_range_init | ( | RASTER3D_Map * | map | ) |
Definition at line 203 of file raster3d/range.c.
References RASTER3D_Map::range, and Rast_init_fp_range().
Referenced by Rast3d_open_cell_old_no_header().
int Rast3d_range_load | ( | RASTER3D_Map * | map | ) |
Loads the range into the range structure of map.
map | a pointer to a raster 3D map object |
Definition at line 109 of file raster3d/range.c.
References RASTER3D_Map::fileName, RASTER3D_Map::mapset, RASTER3D_Map::operation, RASTER3D_Map::range, Rast3d_read_range(), and RASTER3D_WRITE_DATA.
void Rast3d_range_min_max | ( | RASTER3D_Map * | map, |
double * | min, | ||
double * | max | ||
) |
Returns in min and max the minimum and maximum values of the range.
map | a pointer to a raster 3D map object |
min | a pointer to a double to store minumim |
max | a pointer to a double to store maximum |
Definition at line 131 of file raster3d/range.c.
References max, min, RASTER3D_Map::range, and Rast_get_fp_range_min_max().
Referenced by Rast3d_print_header().
void Rast3d_range_update_from_tile | ( | RASTER3D_Map * | , |
const void * | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
int | |||
) |
int Rast3d_range_write | ( | RASTER3D_Map * | map | ) |
Writes the range which is stored in the range structure of map. (This function is invoked automatically when a new file is closed).
map |
Definition at line 186 of file raster3d/range.c.
References RASTER3D_Map::fileName, GPATH_MAX, RASTER3D_Map::mapset, Rast3d_filename(), and RASTER3D_RANGE_ELEMENT.
int Rast3d_read_cats | ( | const char * | name, |
const char * | mapset, | ||
struct Categories * | pcats | ||
) |
Reads the categories file for map name in mapset and stores the categories in the pcats structure. See Rast_read_cats (Raster_Category_File) for details and return values.
name | |
mapset | |
pcats |
Definition at line 175 of file raster3d/cats.c.
int Rast3d_read_colors | ( | const char * | name, |
const char * | mapset, | ||
struct Colors * | colors | ||
) |
Reads color file for map name
in mapset
into the Colors structure.
name | 3D raster map name |
mapset | mapset name |
colors | colors to be associated with a map |
Definition at line 44 of file raster3d/color.c.
int Rast3d_read_doubles | ( | int | fd, |
int | useXdr, | ||
double * | i, | ||
int | nofNum | ||
) |
Definition at line 53 of file doubleio.c.
int Rast3d_read_header | ( | RASTER3D_Map * | map, |
int * | proj, | ||
int * | zone, | ||
double * | north, | ||
double * | south, | ||
double * | east, | ||
double * | west, | ||
double * | top, | ||
double * | bottom, | ||
int * | rows, | ||
int * | cols, | ||
int * | depths, | ||
double * | ew_res, | ||
double * | ns_res, | ||
double * | tb_res, | ||
int * | tileX, | ||
int * | tileY, | ||
int * | tileZ, | ||
int * | type, | ||
int * | compression, | ||
int * | useRle, | ||
int * | useLzw, | ||
int * | precision, | ||
int * | dataOffset, | ||
int * | useXdr, | ||
int * | hasIndex, | ||
char ** | unit, | ||
int * | vertical_unit, | ||
int * | version | ||
) |
Definition at line 197 of file raster3d/header.c.
int Rast3d_read_history | ( | const char * | name, |
const char * | mapset, | ||
struct History * | hist | ||
) |
read raster3d History file
This routine reads the History file for the raster3d file name in mapset into the History structure. A diagnostic message is printed and -1 is returned if there is an error reading the History file. Otherwise, 0 is returned. A warning message is printed if the file is incorrect.
name | |
mapset | |
history |
Definition at line 63 of file raster3d/history.c.
References G_fopen_old_misc(), G_zero(), name, Rast__read_history(), RASTER3D_DIRECTORY, RASTER3D_HISTORY_ELEMENT, and SimpleErrorMessage().
int Rast3d_read_ints | ( | int | fd, |
int | useXdr, | ||
int * | i, | ||
int | nofNum | ||
) |
int Rast3d_read_range | ( | const char * | name, |
const char * | mapset, | ||
struct FPRange * | drange | ||
) |
Definition at line 56 of file raster3d/range.c.
References _, G_open_old_misc(), G_warning(), G_xdr_get_double(), name, Rast_init_fp_range(), Rast_update_fp_range(), RASTER3D_DIRECTORY, RASTER3D_RANGE_ELEMENT, and RASTER3D_XDR_DOUBLE_LENGTH.
Referenced by Rast3d_range_load().
int Rast3d_read_region_map | ( | const char * | name, |
const char * | mapset, | ||
RASTER3D_Region * | region | ||
) |
int Rast3d_read_tile | ( | RASTER3D_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 be one of FCELL_TYPE and DCELL_TYPE. If the tile with tileIndex is not stored on the file corresponding to map, and tileIndex is a valid index tile is filled with NULL-values.
map | |
tileIndex | |
tile | |
type |
Definition at line 151 of file tileread.c.
Referenced by Rast3d_get_tile_ptr(), Rast3d_read_tile_double(), and Rast3d_read_tile_float().
int Rast3d_read_tile_double | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
void * | tile | ||
) |
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, DCELL_TYPE).
map | |
tileIndex | |
tile |
Definition at line 233 of file tileread.c.
References DCELL_TYPE, Rast3d_error(), and Rast3d_read_tile().
int Rast3d_read_tile_float | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
void * | tile | ||
) |
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, FCELL_TYPE).
map | |
tileIndex | |
tile |
Definition at line 210 of file tileread.c.
References FCELL_TYPE, Rast3d_error(), and Rast3d_read_tile().
int Rast3d_read_window | ( | RASTER3D_Region * | window, |
const char * | windowName | ||
) |
Reads window from the file specified by windowName. The name is converted by the rules defined in window defaults. A NULL pointer indicates the WIND3 file in the current mapset.
window | |
windowName |
Definition at line 133 of file windowio.c.
Referenced by GVL_init_region().
void* Rast3d_realloc | ( | void * | ptr, |
int | nBytes | ||
) |
Same as realloc (ptr, nBytes), except that in case of error Rast3d_error()
is invoked.
ptr | |
nBytes |
Definition at line 46 of file raster3d/alloc.c.
References NULL, and Rast3d_error().
Referenced by Rast3d_init_fp_xdr().
void Rast3d_region_copy | ( | RASTER3D_Region * | regionDest, |
RASTER3D_Region * | regionSrc | ||
) |
Copies the values of regionSrc into regionDst.
regionDest | |
regionSrc |
Definition at line 203 of file region.c.
References RASTER3D_Region::bottom, RASTER3D_Region::cols, RASTER3D_Region::depths, RASTER3D_Region::east, RASTER3D_Region::ew_res, RASTER3D_Region::north, RASTER3D_Region::ns_res, RASTER3D_Region::proj, RASTER3D_Region::rows, RASTER3D_Region::south, RASTER3D_Region::tb_res, RASTER3D_Region::top, RASTER3D_Region::west, and RASTER3D_Region::zone.
void Rast3d_region_from_to_cell_head | ( | struct Cell_head * | region2d, |
RASTER3D_Region * | region3d | ||
) |
Replaces the 2d portion of region3d with the values stored in region2d.
region2d | |
region3d |
Definition at line 115 of file region.c.
References Cell_head::bottom, RASTER3D_Region::bottom, RASTER3D_Region::cols, Cell_head::cols3, Cell_head::depths, RASTER3D_Region::depths, Cell_head::east, RASTER3D_Region::east, RASTER3D_Region::ew_res, Cell_head::ew_res3, Cell_head::north, RASTER3D_Region::north, RASTER3D_Region::ns_res, Cell_head::ns_res3, Cell_head::proj, RASTER3D_Region::proj, RASTER3D_Region::rows, Cell_head::rows3, Cell_head::south, RASTER3D_Region::south, Cell_head::tb_res, RASTER3D_Region::tb_res, Cell_head::top, RASTER3D_Region::top, Cell_head::west, RASTER3D_Region::west, Cell_head::zone, and RASTER3D_Region::zone.
void Rast3d_region_to_cell_head | ( | RASTER3D_Region * | region3d, |
struct Cell_head * | region2d | ||
) |
Returns in region2d the 2d portion of region3d.
region3d | |
region2d |
Definition at line 47 of file region.c.
References Cell_head::bottom, RASTER3D_Region::bottom, Cell_head::cols, RASTER3D_Region::cols, Cell_head::cols3, Cell_head::depths, RASTER3D_Region::depths, Cell_head::east, RASTER3D_Region::east, Cell_head::ew_res, RASTER3D_Region::ew_res, Cell_head::ew_res3, Cell_head::north, RASTER3D_Region::north, Cell_head::ns_res, RASTER3D_Region::ns_res, Cell_head::ns_res3, Cell_head::proj, RASTER3D_Region::proj, Cell_head::rows, RASTER3D_Region::rows, Cell_head::rows3, Cell_head::south, RASTER3D_Region::south, Cell_head::tb_res, RASTER3D_Region::tb_res, Cell_head::top, RASTER3D_Region::top, Cell_head::west, RASTER3D_Region::west, Cell_head::zone, and RASTER3D_Region::zone.
Referenced by N_init_geom_data_3d().
int Rast3d_remove_color | ( | const char * | name | ) |
Removes the primary and/or secondary color file.
Definition at line 26 of file raster3d/color.c.
References G_remove_misc(), name, RASTER3D_COLOR_ELEMENT, and RASTER3D_DIRECTORY.
void Rast3d_retile | ( | void * | map, |
const char * | nameOut, | ||
int | tileX, | ||
int | tileY, | ||
int | tileZ | ||
) |
int Rast3d_rewrite_header | ( | RASTER3D_Map * | map | ) |
Definition at line 271 of file raster3d/header.c.
References _, RASTER3D_Region::bottom, RASTER3D_Region::cols, RASTER3D_Map::compression, RASTER3D_Region::depths, RASTER3D_Region::east, RASTER3D_Region::ew_res, RASTER3D_Map::fileName, G_warning(), RASTER3D_Map::hasIndex, RASTER3D_Region::north, RASTER3D_Region::ns_res, RASTER3D_Map::offset, RASTER3D_Map::precision, RASTER3D_Region::proj, Rast3d_write_header(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Region::south, RASTER3D_Region::tb_res, RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, RASTER3D_Region::top, RASTER3D_Map::type, RASTER3D_Map::unit, RASTER3D_Map::useLzw, RASTER3D_Map::useRle, RASTER3D_Map::useXdr, RASTER3D_Map::version, RASTER3D_Map::vertical_unit, RASTER3D_Region::west, and RASTER3D_Region::zone.
int Rast3d_rle_count_only | ( | char * | src, |
int | nofElts, | ||
int | eltLength | ||
) |
void Rast3d_rle_decode | ( | char * | src, |
char * | dst, | ||
int | nofElts, | ||
int | eltLength, | ||
int * | lengthEncode, | ||
int * | lengthDecode | ||
) |
void Rast3d_rle_encode | ( | char * | src, |
char * | dst, | ||
int | nofElts, | ||
int | eltLength | ||
) |
void Rast3d_set_cache_limit | ( | int | nBytes | ) |
Set cache limit.
nBytes |
Definition at line 174 of file defaults.c.
References g3d_cache_max, and Rast3d_fatal_error().
void Rast3d_set_cache_size | ( | int | nTiles | ) |
set cache size
nTiles |
Definition at line 144 of file defaults.c.
References g3d_cache_default, and Rast3d_fatal_error().
void Rast3d_set_compression_mode | ( | int | doCompress, |
int | precision | ||
) |
set compression mode
doCompress should be one of RASTER3D_NO_COMPRESSION and RASTER3D_COMPRESSION. precision should be either RASTER3D_MAX_PRECISION or a positive integer.
Calls Rast3d_fatal_error() if a wrong parameter value is provided.
doCompress | specifies if a compression should be performed |
precision | a precision of compression |
Definition at line 94 of file defaults.c.
References g3d_do_compression, g3d_precision, Rast3d_fatal_error(), RASTER3D_COMPRESSION, and RASTER3D_NO_COMPRESSION.
void Rast3d_set_error_fun | ( | void(*)(const char *) | fun | ) |
set error function
fun |
Definition at line 278 of file defaults.c.
References g3d_error_fun.
void Rast3d_set_file_type | ( | int | type | ) |
void Rast3d_set_null_tile | ( | RASTER3D_Map * | map, |
void * | tile | ||
) |
Is equivalent to Rast3d_set_null_tile_type (map, tile, Rast3d_file_type_map (map)).
map | |
tile |
Definition at line 40 of file tilenull.c.
References Rast3d_set_null_tile_type(), and RASTER3D_Map::typeIntern.
void Rast3d_set_null_tile_type | ( | RASTER3D_Map * | map, |
void * | tile, | ||
int | type | ||
) |
Assumes that tile is a tile with the same dimensions as the tiles of map. Fills tile with NULL-values of type.
map | |
tile | |
type |
Definition at line 22 of file tilenull.c.
Referenced by Rast3d_set_null_tile().
void Rast3d_set_null_value | ( | void * | c, |
int | nofElts, | ||
int | type | ||
) |
Fills the vector pointed to by c with nofElts NULL-values of type.
c | |
nofElts | |
type |
Definition at line 34 of file null.c.
Referenced by N_copy_array_3d(), Rast3d_get_double_region(), and Rast3d_get_float_region().
void Rast3d_set_resampling_fun | ( | RASTER3D_Map * | map, |
void(*)(RASTER3D_Map *, int, int, int, void *, int) | resampleFun | ||
) |
Sets the resampling function to be used by Rast3d_get_value () (cf.{g3d:G3d.getValue}). This function is defined as follows:
Definition at line 53 of file resample.c.
References RASTER3D_Map::resampleFun.
void Rast3d_set_standard3d_input_params | ( | void | ) |
Initializes a parameter structure for the subset of command line arguments which lets the user overwrite the default properties of the new file. Applications are encouraged to use this function in order to provide a uniform style. The command line arguments provided are the type of the cell values, the precision, the properties of the compression, and the dimension of the tiles (tiledimension). Every of these values defaults to the value described in RASTER3D Defaults. This function has to be used in conjunction with Rast3d_getStandard3dInputParams() (cf.{g3d:G3d.getStandard3dInputParams}).
void Rast3d_set_tile_dimension | ( | int | tileX, |
int | tileY, | ||
int | tileZ | ||
) |
set Tile Dimension
tileX | |
tileY | |
tileZ |
Definition at line 236 of file defaults.c.
References g3d_tile_dimension, and Rast3d_fatal_error().
void Rast3d_set_unit | ( | RASTER3D_Map * | map, |
const char * | unit | ||
) |
Set the data unit defintiong.
map | |
unit |
Definition at line 173 of file headerinfo.c.
References G_store(), and RASTER3D_Map::unit.
void Rast3d_set_vertical_unit | ( | RASTER3D_Map * | map, |
const char * | vertical_unit | ||
) |
set Vertical unit from string
map | |
unit |
Definition at line 207 of file headerinfo.c.
References G_units(), and RASTER3D_Map::vertical_unit.
void Rast3d_set_vertical_unit2 | ( | RASTER3D_Map * | map, |
int | vertical_unit | ||
) |
set Vertical unit from integer value defined in gis.h (U_METERS, ...)
map | |
unit |
Definition at line 190 of file headerinfo.c.
References RASTER3D_Map::vertical_unit.
void Rast3d_set_window | ( | RASTER3D_Region * | window | ) |
Sets the default window used for every map opened later in the program. Can be used multiple times in the same program.
window |
Definition at line 41 of file raster3d/window.c.
void Rast3d_set_window_map | ( | RASTER3D_Map * | map, |
RASTER3D_Region * | window | ||
) |
Sets the window for map to window. Can be used multiple times for the same map.
map | |
window |
Definition at line 23 of file raster3d/window.c.
void Rast3d_set_window_params | ( | void | ) |
Definition at line 121 of file param.c.
Referenced by Rast3d_use_window_params().
void Rast3d_set_xdr_null_float | ( | float * | f | ) |
Definition at line 56 of file fpxdr.c.
References Rast3d_set_xdr_null_num().
void Rast3d_set_xdr_null_num | ( | void * | num, |
int | isFloat | ||
) |
Definition at line 38 of file fpxdr.c.
Referenced by Rast3d_set_xdr_null_float().
void Rast3d_skip_error | ( | const char * | ) |
int Rast3d_tile2tile_index | ( | RASTER3D_Map * | map, |
int | xTile, | ||
int | yTile, | ||
int | zTile | ||
) |
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).
map | |
xTile | |
yTile | |
zTile |
Definition at line 49 of file tilemath.c.
References RASTER3D_Map::nx, and RASTER3D_Map::nxy.
Referenced by Rast3d_coord2tile_index(), and Rast3d_flush_tile_cube().
void Rast3d_tile_coord_origin | ( | RASTER3D_Map * | map, |
int | xTile, | ||
int | yTile, | ||
int | zTile, | ||
int * | x, | ||
int * | y, | ||
int * | z | ||
) |
Computes the cell-coordinates (x, y, z) which correspond to the origin of the tile with tile-coordinates (xTile, yTile, zTile).
map | |
xTile | |
yTile | |
zTile | |
x | |
y | |
z |
Definition at line 73 of file tilemath.c.
References RASTER3D_Map::tileX, RASTER3D_Map::tileY, RASTER3D_Map::tileZ, and x.
Referenced by Rast3d_tile_index_origin().
int Rast3d_tile_in_range | ( | RASTER3D_Map * | map, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Returns 1 if tile-coordinate (x, y, z) is a coordinate inside tile cube. Returns 0 otherwise.
map | |
x | |
y | |
z |
Definition at line 225 of file tilemath.c.
References RASTER3D_Map::nx, RASTER3D_Map::ny, RASTER3D_Map::nz, and x.
void Rast3d_tile_index2tile | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
int * | xTile, | ||
int * | yTile, | ||
int * | zTile | ||
) |
Converts index tileIndex into tile-coordinates (xTile, yTile, zTile).
map | |
tileIndex | |
xTile | |
yTile | |
zTile |
Definition at line 23 of file tilemath.c.
References RASTER3D_Map::nx, and RASTER3D_Map::nxy.
Referenced by Rast3d_compute_clipped_tile_dimensions(), and Rast3d_tile_index_origin().
int Rast3d_tile_index_in_range | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
Returns 1 if tileIndex is a valid index for map. Returns 0 otherwise.
map | |
tileIndex |
Definition at line 204 of file tilemath.c.
void Rast3d_tile_index_origin | ( | RASTER3D_Map * | map, |
int | tileIndex, | ||
int * | x, | ||
int * | y, | ||
int * | z | ||
) |
Computes the cell-coordinates (x, y, z) which correspond to the origin of the tile with tileIndex.
map | |
tileIndex | |
x | |
y | |
z |
Definition at line 97 of file tilemath.c.
References Rast3d_tile_coord_origin(), Rast3d_tile_index2tile(), and x.
int Rast3d_tile_load | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
Same functionality as Rast3d_get_tile_ptr()
but does not return the pointer.
map | |
tileIndex |
Definition at line 123 of file tileio.c.
References NULL, Rast3d_error(), and Rast3d_get_tile_ptr().
int Rast3d_tile_precision_map | ( | RASTER3D_Map * | map | ) |
Returns the precision used to store map.
map |
Definition at line 292 of file headerinfo.c.
References RASTER3D_Map::precision.
Referenced by Rast3d_compare_files().
int Rast3d_tile_type_map | ( | RASTER3D_Map * | map | ) |
Returns the type in which tiles of map are stored in memory.
map |
Definition at line 156 of file headerinfo.c.
References RASTER3D_Map::typeIntern.
Referenced by Rast3d_compare_files(), and Rast3d_write_ascii().
int Rast3d_tile_use_cache_map | ( | RASTER3D_Map * | map | ) |
Returns 1 if map uses cache, returns 0 otherwise.
map |
Definition at line 308 of file headerinfo.c.
References RASTER3D_Map::useCache.
Referenced by Rast3d_compare_files().
int Rast3d_unlock_all | ( | RASTER3D_Map * | map | ) |
Unlocks every tile in cache of map.
map |
Definition at line 315 of file tileread.c.
References RASTER3D_Map::cache, Rast3d_cache_unlock_all(), Rast3d_error(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
Referenced by Rast3d_begin_cycle().
int Rast3d_unlock_tile | ( | RASTER3D_Map * | map, |
int | tileIndex | ||
) |
Unlocks tile with tileIndex.
map | |
tileIndex |
Definition at line 289 of file tileread.c.
References RASTER3D_Map::cache, Rast3d_cache_unlock(), Rast3d_error(), Rast3d_fatal_error(), and RASTER3D_Map::useCache.
void Rast3d_use_window_params | ( | void | ) |
Writes window to the file specified by windowName. The name is converted by the rules defined in window defaults. A NULL pointer indicates the WIND3 file in the current mapset.
window | |
windowName |
Allows the window to be set at run-time via the region3 command line argument. This function has to be called before G_parser (). See also window defaults.
Definition at line 265 of file windowio.c.
References Rast3d_set_window_params().
RASTER3D_Region* Rast3d_window_ptr | ( | void | ) |
Definition at line 65 of file raster3d/window.c.
References g3d_window.
void Rast3d_write_ascii | ( | void * | map, |
const char * | fname | ||
) |
Writes the cell-values of map in ascii format to file fname. The values are organized by horizontal slices.
map | |
fname |
Definition at line 19 of file writeascii.c.
References FCELL_TYPE, NULL, Rast3d_fatal_error(), Rast3d_get_coords_map(), Rast3d_get_value_region(), Rast3d_tile_type_map(), and x.
int Rast3d_write_cats | ( | const char * | name, |
struct Categories * | cats | ||
) |
Writes the categories stored in the cats structure into the categories file for map name in the current mapset. See Rast_write_cats (Raster_Category_File) for details and return values.
name | |
cats |
Definition at line 26 of file raster3d/cats.c.
References Categories::a1, Categories::a2, Categories::fmt, G_fopen_new_misc(), G_trim_decimal(), Categories::m1, Categories::m2, name, NULL, Categories::num, Categories::q, Rast_get_ith_d_cat(), Rast_quant_nof_rules(), RASTER3D_CATS_ELEMENT, RASTER3D_DIRECTORY, and Categories::title.
int Rast3d_write_colors | ( | const char * | name, |
const char * | mapset, | ||
struct Colors * | colors | ||
) |
Writes the colors
for map name
in mapset
into a color file.
name | 3D raster map name |
mapset | mapset name |
colors | colors to be associated with a map |
Definition at line 351 of file raster3d/color.c.
int Rast3d_write_doubles | ( | int | fd, |
int | useXdr, | ||
const double * | i, | ||
int | nofNum | ||
) |
Definition at line 9 of file doubleio.c.
int Rast3d_write_header | ( | RASTER3D_Map * | map, |
int | proj, | ||
int | zone, | ||
double | north, | ||
double | south, | ||
double | east, | ||
double | west, | ||
double | top, | ||
double | bottom, | ||
int | rows, | ||
int | cols, | ||
int | depths, | ||
double | ew_res, | ||
double | ns_res, | ||
double | tb_res, | ||
int | tileX, | ||
int | tileY, | ||
int | tileZ, | ||
int | type, | ||
int | compression, | ||
int | useRle, | ||
int | useLzw, | ||
int | precision, | ||
int | dataOffset, | ||
int | useXdr, | ||
int | hasIndex, | ||
char * | unit, | ||
int | vertical_unit, | ||
int | version | ||
) |
Definition at line 235 of file raster3d/header.c.
Referenced by Rast3d_rewrite_header().
int Rast3d_write_history | ( | const char * | name, |
struct History * | hist | ||
) |
write raster3d History file
This routine writes the History file for the raster3d file name in the current mapset from the History structure. A diagnostic message is printed and -1 is returned if there is an error writing the History file. Otherwise, 0 is returned. Note. The history structure should first be initialized using Rast_short_history.
name | |
history |
Definition at line 97 of file raster3d/history.c.
References G_fopen_new_misc(), name, Rast__write_history(), RASTER3D_DIRECTORY, and RASTER3D_HISTORY_ELEMENT.
int Rast3d_write_ints | ( | int | fd, |
int | useXdr, | ||
const int * | i, | ||
int | nofNum | ||
) |
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.
map | |
tileIndex | |
tile | |
type |
Definition at line 126 of file tilewrite.c.
Referenced by 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 220 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 195 of file tilewrite.c.
References FCELL_TYPE, Rast3d_error(), and Rast3d_write_tile().