GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
defs/raster3d.h
Go to the documentation of this file.
1#ifndef GRASS_RASTER3DDEFS_H
2#define GRASS_RASTER3DDEFS_H
3
4/* cache.c */
7void *Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *);
10void *Rast3d_cache_new_read(int, int, int, read_fn *, void *);
25int Rast3d_cache_get_elt(RASTER3D_cache *, int, void *);
26int Rast3d_cache_put_elt(RASTER3D_cache *, int, const void *);
27
28/* cachehash.c */
31void *Rast3d_cache_hash_new(int);
35
36/* changeprecision.c */
37void Rast3d_change_precision(void *, int, const char *);
38
39/* changetype.c */
40void Rast3d_change_type(void *, const char *);
41
42/* filecompare.c */
43void Rast3d_compare_files(const char *, const char *, const char *,
44 const char *);
45
46/* filename.c */
47void Rast3d_filename(char *, const char *, const char *, const char *);
48
49/* fpcompress.c */
50void Rast3d_fpcompress_print_binary(char *, int);
51void Rast3d_fpcompress_dissect_xdr_double(unsigned char *);
52int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int);
53int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int);
54
55/* alloc.c */
56void *Rast3d_malloc(int);
57void *Rast3d_realloc(void *, int);
58void Rast3d_free(void *);
59
60/* cache.c */
64
65/* cats.c */
66int Rast3d_write_cats(const char *, struct Categories *);
67int Rast3d_read_cats(const char *, const char *, struct Categories *);
68
69/* close.c */
71
72/* color.c */
73int Rast3d_remove_color(const char *);
74int Rast3d_read_colors(const char *, const char *, struct Colors *);
75int Rast3d_write_colors(const char *, const char *, struct Colors *);
76
77/* defaults.c */
78void Rast3d_set_compression_mode(int, int);
79void Rast3d_get_compression_mode(int *, int *);
80void Rast3d_set_cache_size(int);
81int Rast3d_get_cache_size(void);
84void Rast3d_set_file_type(int);
85int Rast3d_get_file_type(void);
86void Rast3d_set_tile_dimension(int, int, int);
87void Rast3d_get_tile_dimension(int *, int *, int *);
88void Rast3d_set_error_fun(void (*)(const char *));
89void Rast3d_init_defaults(void);
90
91/* doubleio.c */
92int Rast3d_write_doubles(int, int, const double *, int);
93int Rast3d_read_doubles(int, int, double *, int);
94
95/* error.c */
96void Rast3d_skip_error(const char *);
97void Rast3d_print_error(const char *);
98void Rast3d_fatal_error(const char *, ...) __attribute__((format(printf, 1, 2)))
99__attribute__((noreturn));
100void Rast3d_fatal_error_noargs(const char *) __attribute__((noreturn));
101void Rast3d_error(const char *, ...) __attribute__((format(printf, 1, 2)));
102
103/* fpxdr.c */
104int Rast3d_is_xdr_null_num(const void *, int);
105int Rast3d_is_xdr_null_float(const float *);
106int Rast3d_is_xdr_null_double(const double *);
107void Rast3d_set_xdr_null_num(void *, int);
108void Rast3d_set_xdr_null_double(double *);
109void Rast3d_set_xdr_null_float(float *);
112int Rast3d_copy_to_xdr(const void *, int);
114int Rast3d_copy_from_xdr(int, void *);
115
116/* gradient.c */
120
121/* history.c */
122int Rast3d_write_history(const char *, struct History *);
123int Rast3d_read_history(const char *, const char *, struct History *);
124
125/* intio.c */
126int Rast3d_write_ints(int, int, const int *, int);
127int Rast3d_read_ints(int, int, int *, int);
128
129/* keys.c */
130int Rast3d_key_get_int(struct Key_Value *, const char *, int *);
131int Rast3d_key_get_double(struct Key_Value *, const char *, double *);
132int Rast3d_key_get_string(struct Key_Value *, const char *, char **);
133int Rast3d_key_get_value(struct Key_Value *, const char *, char *, char *, int,
134 int, int *);
135int Rast3d_key_set_int(struct Key_Value *, const char *, const int *);
136int Rast3d_key_set_double(struct Key_Value *, const char *, const double *);
137int Rast3d_key_set_string(struct Key_Value *, const char *, char *const *);
138int Rast3d_key_set_value(struct Key_Value *, const char *, const char *,
139 const char *, int, int, const int *);
140/* long.c */
141int Rast3d_long_encode(long *, unsigned char *, int);
142void Rast3d_long_decode(unsigned char *, long *, int, int);
143
144/* mapset.c */
145void Rast3d_make_mapset_map_directory(const char *);
146
147/* mask.c */
148int Rast3d_mask_close(void);
150int Rast3d_mask_open_old(void);
151int Rast3d_mask_reopen(int);
152int Rast3d_is_masked(RASTER3D_Map *, int, int, int);
153void Rast3d_mask_num(RASTER3D_Map *, int, int, int, void *, int);
154void Rast3d_mask_float(RASTER3D_Map *, int, int, int, float *);
155void Rast3d_mask_double(RASTER3D_Map *, int, int, int, double *);
156void Rast3d_mask_tile(RASTER3D_Map *, int, void *, int);
161const char *Rast3d_mask_file(void);
162int Rast3d_mask_map_exists(void);
163
164/* maskfn.c */
167void Rast3d_parse_vallist(char **, d_Mask **);
168
169/* misc.c */
171void Rast3d_copy_float2Double(const float *, int, double *, int, int);
172void Rast3d_copy_double2Float(const double *, int, float *, int, int);
173void Rast3d_copy_values(const void *, int, int, void *, int, int, int);
174int Rast3d_length(int);
175int Rast3d_extern_length(int);
176
177/* null.c */
178int Rast3d_is_null_value_num(const void *, int);
179void Rast3d_set_null_value(void *, int, int);
180
181/* open2.c */
182void *Rast3d_open_new_param(const char *, int, int, RASTER3D_Region *, int, int,
183 int, int, int, int);
184/* open.c */
185void *Rast3d_open_cell_old_no_header(const char *, const char *);
186void *Rast3d_open_cell_old(const char *, const char *, RASTER3D_Region *, int,
187 int);
188void *Rast3d_open_cell_new(const char *, int, int, RASTER3D_Region *);
189void *Rast3d_open_new_opt_tile_size(const char *, int, RASTER3D_Region *, int,
190 int);
191
192/* param.c */
194int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *,
195 int *, int *, int *, int *);
196void Rast3d_set_window_params(void);
197char *Rast3d_get_window_params(void);
198
199/* range.c */
200void Rast3d_range_update_from_tile(RASTER3D_Map *, const void *, int, int, int,
201 int, int, int, int, int);
202int Rast3d_read_range(const char *, const char *, struct FPRange *);
204void Rast3d_range_min_max(RASTER3D_Map *, double *, double *);
207
208/* region.c */
209void Rast3d_get_region_value(RASTER3D_Map *, double, double, double, void *,
210 int);
218int Rast3d_read_region_map(const char *, const char *, RASTER3D_Region *);
219int Rast3d_is_valid_location(RASTER3D_Region *, double, double, double);
220void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *,
221 int *, int *);
222void Rast3d_location2coord_double(RASTER3D_Region *, double, double, double,
223 double *, double *, double *);
224void Rast3d_location2coord2(RASTER3D_Region *, double, double, double, int *,
225 int *, int *);
226void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *,
227 double *, double *);
228/* resample.c */
229void Rast3d_nearest_neighbor(RASTER3D_Map *, int, int, int, void *, int);
231 int, int, void *, int));
233 void (**)(RASTER3D_Map *, int, int, int, void *,
234 int));
235void Rast3d_get_nearest_neighbor_fun_ptr(void (**)(RASTER3D_Map *, int, int,
236 int, void *, int));
237
238/* volume.c */
239void Rast3d_get_volume_a(void *, double[2][2][2][3], int, int, int, void *,
240 int);
241void Rast3d_get_volume(void *, double, double, double, double, double, double,
242 double, double, double, double, double, double, int, int,
243 int, void *, int);
244void Rast3d_get_aligned_volume(void *, double, double, double, double, double,
245 double, int, int, int, void *, int);
246void Rast3d_make_aligned_volume_file(void *, const char *, double, double,
247 double, double, double, double, int, int,
248 int);
249/* window.c */
250void Rast3d_get_value(RASTER3D_Map *, int, int, int, void *, int);
251float Rast3d_get_float(RASTER3D_Map *, int, int, int);
252double Rast3d_get_double(RASTER3D_Map *, int, int, int);
253void Rast3d_get_window_value(RASTER3D_Map *, double, double, double, void *,
254 int);
255
260
261/* windowio.c */
262void Rast3d_use_window_params(void);
263int Rast3d_read_window(RASTER3D_Region *, const char *);
264
265/* int Rast3d_writeWindow (RASTER3D_Region *, char *); */
266/* getblock.c */
267void Rast3d_get_block_nocache(RASTER3D_Map *, int, int, int, int, int, int,
268 void *, int);
269void Rast3d_get_block(RASTER3D_Map *, int, int, int, int, int, int, void *,
270 int);
271
272/* header.c */
273int Rast3d_read_header(RASTER3D_Map *, int *, int *, double *, double *,
274 double *, double *, double *, double *, int *, int *,
275 int *, double *, double *, double *, int *, int *, int *,
276 int *, int *, int *, int *, int *, int *, int *, int *,
277 char **, int *, int *);
278int Rast3d_write_header(RASTER3D_Map *, int, int, double, double, double,
279 double, double, double, int, int, int, double, double,
280 double, int, int, int, int, int, int, int, int, int,
281 int, int, char *, int, int);
283int Rast3d_cache_size_encode(int, int);
285int Rast3d_fill_header(RASTER3D_Map *, int, int, int, int, int, int, int, int,
286 int, int, int, int, int, int, int, int, double, double,
287 double, double, double, double, int, int, int, double,
288 double, double, char *, int, int);
289/* headerinfo.c */
290void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *);
291void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *);
292void Rast3d_get_nof_tiles_map(RASTER3D_Map *, int *, int *, int *);
293void Rast3d_get_region_map(RASTER3D_Map *, double *, double *, double *,
294 double *, double *, double *);
295void Rast3d_get_window_map(RASTER3D_Map *, double *, double *, double *,
296 double *, double *, double *);
297void Rast3d_get_tile_dimensions_map(RASTER3D_Map *, int *, int *, int *);
304const char *Rast3d_get_unit(RASTER3D_Map *map);
306const char *Rast3d_get_vertical_unit(RASTER3D_Map *map);
307void Rast3d_set_unit(RASTER3D_Map *map, const char *);
308void Rast3d_set_vertical_unit(RASTER3D_Map *map, const char *);
310
311/* index.c */
314
315/* retile.c */
316void Rast3d_retile(void *, const char *, int, int, int);
317
318/* rle.c */
319int Rast3d_rle_count_only(char *, int, int);
320void Rast3d_rle_encode(char *, char *, int, int);
321void Rast3d_rle_decode(char *, char *, int, int, int *, int *);
322
323/* tilealloc.c */
324void *Rast3d_alloc_tiles_type(RASTER3D_Map *, int, int);
325void *Rast3d_alloc_tiles(RASTER3D_Map *, int);
326void Rast3d_free_tiles(void *);
327
328/* tileio.c */
332float Rast3d_get_float_region(RASTER3D_Map *, int, int, int);
333double Rast3d_get_double_region(RASTER3D_Map *, int, int, int);
334void Rast3d_get_value_region(RASTER3D_Map *, int, int, int, void *, int);
335
336/* tilemath.c */
338 int *, int);
339void Rast3d_tile_index2tile(RASTER3D_Map *, int, int *, int *, int *);
340int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int);
341void Rast3d_tile_coord_origin(RASTER3D_Map *, int, int, int, int *, int *,
342 int *);
343void Rast3d_tile_index_origin(RASTER3D_Map *, int, int *, int *, int *);
344void Rast3d_coord2tile_coord(RASTER3D_Map *, int, int, int, int *, int *, int *,
345 int *, int *, int *);
346void Rast3d_coord2tile_index(RASTER3D_Map *, int, int, int, int *, int *);
347int Rast3d_coord_in_range(RASTER3D_Map *, int, int, int);
349int Rast3d_tile_in_range(RASTER3D_Map *, int, int, int);
351 int *, int *, int *, int *);
352
353/* tilenull.c */
354void Rast3d_set_null_tile_type(RASTER3D_Map *, void *, int);
355void Rast3d_set_null_tile(RASTER3D_Map *, void *);
356
357/* tileread.c */
358int Rast3d_read_tile(RASTER3D_Map *, int, void *, int);
359int Rast3d_read_tile_float(RASTER3D_Map *, int, void *);
360int Rast3d_read_tile_double(RASTER3D_Map *, int, void *);
369
370/* tilewrite.c */
371int Rast3d_write_tile(RASTER3D_Map *, int, const void *, int);
372int Rast3d_write_tile_float(RASTER3D_Map *, int, const void *);
373int Rast3d_write_tile_double(RASTER3D_Map *, int, const void *);
375int Rast3d_flush_tile_cube(RASTER3D_Map *, int, int, int, int, int, int);
376int Rast3d_flush_tiles_in_cube(RASTER3D_Map *, int, int, int, int, int, int);
377int Rast3d_put_float(RASTER3D_Map *, int, int, int, float);
378int Rast3d_put_double(RASTER3D_Map *, int, int, int, double);
379int Rast3d_put_value(RASTER3D_Map *, int, int, int, const void *, int);
380
381/* writeascii.c */
382void Rast3d_write_ascii(void *, const char *);
383
384#endif /* RASTER3DDEFS */
#define __attribute__(x)
Definition defs/glocale.h:6
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 ba...
Definition open2.c:95
void Rast3d_gradient_double(RASTER3D_Array_double *, double *, RASTER3D_Array_double *, RASTER3D_Array_double *, RASTER3D_Array_double *)
Gradient computation.
Definition gradient.c:34
int Rast3d_read_tile_double(RASTER3D_Map *, int, void *)
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, DCELL_TYPE).
Definition tileread.c:230
void Rast3d_copy_values(const void *, int, int, void *, int, int, 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....
Definition retile.c:77
int Rast3d_rewrite_header(RASTER3D_Map *map)
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,...
Definition getvalue.c:21
int Rast3d_cache_lock(RASTER3D_cache *, int)
Definition cache1.c:267
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)
int Rast3d_g3d_type2cell_type(int)
int Rast3d_cache_size_encode(int, int)
Returns a number which encodes multiplicity n of cacheCode. This value can be used to specify the siz...
int Rast3d_flush_all_tiles(RASTER3D_Map *)
Definition cache.c:283
void Rast3d_cache_lock_intern(RASTER3D_cache *, int)
Definition cache1.c:292
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....
Definition mask.c:198
void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *, int *, int *)
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z).
Definition region.c:275
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_read_colors(const char *, const char *, struct Colors *)
Reads color file for map name in mapset into the Colors structure.
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 s...
Definition writeascii.c:18
int Rast3d_mask_is_off(RASTER3D_Map *)
Returns 1 if the mask for map is turned off. Returns 0 otherwise.
Definition mask.c:366
int Rast3d_cache_flush_all(RASTER3D_cache *)
Definition cache1.c:451
int Rast3d_put_float(RASTER3D_Map *, int, int, int, float)
Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE).
Definition putvalue.c:17
void Rast3d_cache_dispose(RASTER3D_cache *)
Definition cache1.c:63
void Rast3d_set_xdr_null_num(void *, int)
Definition fpxdr.c:38
void Rast3d_nearest_neighbor(RASTER3D_Map *, int, int, int, void *, int)
The default resampling function which uses nearest neighbor resampling. This method converts the wind...
Definition resample.c:22
void Rast3d_filename(char *, const char *, const char *, const char *)
Definition filename.c:9
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 (...
Definition tilewrite.c:258
int Rast3d_write_colors(const char *, const char *, struct Colors *)
Writes the colors for map name in mapset into a color file.
void * Rast3d_cache_elt_ptr(RASTER3D_cache *, int)
Definition cache1.c:468
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....
void Rast3d_cache_set_load_fun(RASTER3D_cache *, read_fn *, void *)
int Rast3d_mask_d_select(DCELL *, d_Mask *)
Definition maskfn.c:45
void * Rast3d_realloc(void *, int)
Same as realloc (ptr, nBytes), except that in case of error Rast3d_error() is invoked.
int Rast3d_is_xdr_null_double(const double *)
Definition fpxdr.c:31
void Rast3d_free(void *)
Same as free (ptr).
int Rast3d_file_type_map(RASTER3D_Map *)
Returns the type with which tiles of map are stored on file.
Definition headerinfo.c:263
void Rast3d_rle_encode(char *, char *, int, int)
Definition rle.c:184
int Rast3d_rle_count_only(char *, int, int)
Definition rle.c:141
int Rast3d_cache_put_elt(RASTER3D_cache *, int, const void *)
Definition cache1.c:547
int Rast3d_tile_type_map(RASTER3D_Map *)
Returns the type in which tiles of map are stored in memory.
Definition headerinfo.c:150
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...
Definition headerinfo.c:48
void Rast3d_set_xdr_null_double(double *)
Definition fpxdr.c:49
void Rast3d_fatal_error_noargs(const char *) __attribute__((noreturn))
void Rast3d_compute_optimal_tile_dimension(RASTER3D_Region *, int, int *, int *, int *, int)
Compute the optimal tile size.
Definition tilemath.c:306
char * Rast3d_get_window_params(void)
Definition param.c:133
void Rast3d_autolock_on(RASTER3D_Map *)
Turns autolock mode on.
Definition tileread.c:333
RASTER3D_Region * Rast3d_window_ptr(void)
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,...
Definition getvalue.c:126
int Rast3d_flush_index(RASTER3D_Map *)
void Rast3d_cache_hash_dispose(Rast3d_cache_hash *)
Definition cachehash.c:36
void Rast3d_cache_hash_remove_name(Rast3d_cache_hash *, int)
Definition cachehash.c:76
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.
Definition getvalue.c:159
void Rast3d_region_to_cell_head(RASTER3D_Region *, struct Cell_head *)
Returns in region2d the 2d portion of region3d.
Definition region.c:45
int Rast3d_init_copy_from_xdr(RASTER3D_Map *, int)
Definition fpxdr.c:184
int Rast3d_get_cache_limit(void)
Get cache limit.
Definition defaults.c:184
void Rast3d_get_tile_dimensions_map(RASTER3D_Map *, int *, int *, int *)
Returns the tile dimensions used for map.
Definition headerinfo.c:133
int Rast3d_unlock_all(RASTER3D_Map *)
Unlocks every tile in cache of map.
Definition tileread.c:309
void Rast3d_cache_autolock_off(RASTER3D_cache *)
Definition cache1.c:361
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...
Definition tilenull.c:21
int Rast3d_read_doubles(int, int, double *, int)
Definition doubleio.c:53
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-va...
Definition mask.c:266
void Rast3d_make_mapset_map_directory(const char *)
void Rast3d_get_tile_dimension(int *, int *, int *)
get Tile Dimension
Definition defaults.c:252
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.
Definition tilemath.c:93
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 i...
int Rast3d_write_doubles(int, int, const double *, int)
Definition doubleio.c:9
int Rast3d_cache_load(RASTER3D_cache *, int)
Definition cache1.c:518
void Rast3d_get_volume_a(void *, double[2][2][2][3], int, int, int, void *, int)
Definition volume.c:44
void Rast3d_cache_reset(RASTER3D_cache *)
Definition cache1.c:31
int Rast3d_read_history(const char *, const char *, struct History *)
read raster3d History file
void Rast3d_long_decode(unsigned char *, long *, int, int)
Definition long.c:35
const char * Rast3d_get_unit(RASTER3D_Map *map)
Return the data unit definition of map.
Definition headerinfo.c:213
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.
Definition region.c:249
int Rast3d_key_set_int(struct Key_Value *, const char *, const int *)
Definition keys.c:93
int Rast3d_dispose_cache(RASTER3D_Map *)
Definition cache.c:249
void Rast3d_extract2d_region(RASTER3D_Region *, struct Cell_head *)
Returns in region2d the 2d portion of region3d.
Definition region.c:18
void * Rast3d_cache_hash_new(int)
Definition cachehash.c:50
int Rast3d_tile_index_in_range(RASTER3D_Map *, int)
Returns 1 if tileIndex is a valid index for map. Returns 0 otherwise.
Definition tilemath.c:196
void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *)
Definition headerinfo.c:26
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....
Definition tileio.c:78
const char * Rast3d_mask_file(void)
Returns the name of the 3d mask file.
Definition mask.c:378
void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *)
Returns in region the region of map.
Definition headerinfo.c:108
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.
Definition resample.c:70
const char * Rast3d_get_vertical_unit(RASTER3D_Map *map)
Return the name of the unit of map. Units are defined in gis.h.
Definition headerinfo.c:248
void * Rast3d_alloc_tiles(RASTER3D_Map *, int)
Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)).
Definition tilealloc.c:47
void Rast3d_set_standard3d_input_params(void)
Initializes a parameter structure for the subset of command line arguments which lets the user overwr...
Definition param.c:38
void Rast3d_set_null_value(void *, int, int)
Fills the vector pointed to by c with nofElts NULL-values of type.
Definition null.c:33
void Rast3d_min_unlocked(RASTER3D_Map *, int)
Sets the minimum number of unlocked tiles to minUnlocked. This function should be used in combination...
Definition tileread.c:380
int Rast3d_unlock_tile(RASTER3D_Map *, int)
Unlocks tile with tileIndex.
Definition tileread.c:284
int Rast3d_mask_map_exists(void)
Returns 1 if the 3d mask is loaded.
Definition mask.c:390
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})....
Definition resample.c:52
int Rast3d_is_null_value_num(const void *, int)
Definition null.c:12
int Rast3d_mask_open_old(void)
Definition mask.c:73
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.
Definition tilemath.c:178
int Rast3d_write_history(const char *, struct History *)
write raster3d History file
void Rast3d_autolock_off(RASTER3D_Map *)
Turns autolock mode Off.
Definition tileread.c:352
void Rast3d_free_tiles(void *)
Is equivalent to Rast3d_free (tiles);
Definition tilealloc.c:70
void Rast3d_set_null_tile(RASTER3D_Map *, void *)
Is equivalent to Rast3d_set_null_tile_type (map, tile, Rast3d_file_type_map (map)).
Definition tilenull.c:38
int Rast3d_tile_precision_map(RASTER3D_Map *)
Returns the precision used to store map.
Definition headerinfo.c:278
void Rast3d_set_tile_dimension(int, int, int)
set Tile Dimension
Definition defaults.c:227
int Rast3d_read_range(const char *, const char *, struct FPRange *)
int Rast3d__compute_cache_size(RASTER3D_Map *, int)
void Rast3d_copy_float2Double(const float *, int, double *, int, int)
void Rast3d_set_vertical_unit2(RASTER3D_Map *map, int)
set Vertical unit from integer value defined in gis.h (U_METERS, ...)
Definition headerinfo.c:182
int Rast3d_key_get_string(struct Key_Value *, const char *, char **)
Definition keys.c:48
void Rast3d_adjust_region_res(RASTER3D_Region *)
Computes an adjusts the number of cells per dimension in the region structure from the region boundar...
Definition region.c:168
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 *)
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 b...
void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *)
Returns the size of the region of map in cells.
Definition headerinfo.c:17
int Rast3d_init_index(RASTER3D_Map *, int)
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...
Definition mask.c:339
void Rast3d_mask_double(RASTER3D_Map *, int, int, int, double *)
Same as Rast3d_mask_num (x, y, z, value, DCELL_TYPE).
Definition mask.c:241
void Rast3d_set_error_fun(void(*)(const char *))
set error function
Definition defaults.c:267
void Rast3d_tile_index2tile(RASTER3D_Map *, int, int *, int *, int *)
Converts index tileIndex into tile-coordinates (xTile, yTile, zTile).
Definition tilemath.c:22
int Rast3d_cache_flush(RASTER3D_cache *, int)
Definition cache1.c:422
void Rast3d_region_from_to_cell_head(struct Cell_head *, RASTER3D_Region *)
Replaces the 2d portion of region3d with the values stored in region2d.
Definition region.c:111
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,...
Definition getblock.c:101
int Rast3d_get_vertical_unit2(RASTER3D_Map *map)
Returns the vertical unit of map as integer. Units are defined in gis.h.
Definition headerinfo.c:231
int Rast3d_tile_use_cache_map(RASTER3D_Map *)
Returns 1 if map uses cache, returns 0 otherwise.
Definition headerinfo.c:293
void Rast3d_cache_hash_reset(Rast3d_cache_hash *)
Definition cachehash.c:24
void Rast3d_print_header(RASTER3D_Map *)
Prints the header information of map.
Definition headerinfo.c:306
int Rast3d_read_region_map(const char *, const char *, RASTER3D_Region *)
Definition region.c:219
void Rast3d_set_file_type(int)
set G3d file type
Definition defaults.c:197
void Rast3d_set_unit(RASTER3D_Map *map, const char *)
Set the data unit defintiong.
Definition headerinfo.c:166
int Rast3d_key_set_string(struct Key_Value *, const char *, char *const *)
Definition keys.c:116
int Rast3d_write_tile_float(RASTER3D_Map *, int, const void *)
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, FCELL_TYPE).
Definition tilewrite.c:202
void Rast3d_get_aligned_volume(void *, double, double, double, double, double, double, int, int, int, void *, int)
Definition volume.c:180
void Rast3d_set_cache_limit(int)
Set cache limit.
Definition defaults.c:169
void Rast3d_cache_autolock_on(RASTER3D_cache *)
Definition cache1.c:354
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 curre...
int Rast3d_mask_file_exists(void)
Returns 1 if the 3d mask file exists.
Definition mask.c:63
void Rast3d_adjust_region(RASTER3D_Region *)
Computes an adjusts the resolutions in the region structure from the region boundaries and number of ...
Definition region.c:144
int Rast3d_range_load(RASTER3D_Map *)
Loads the range into the range structure of map.
void Rast3d_location2coord_double(RASTER3D_Region *, double, double, double, double *, double *, double *)
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z).
Definition region.c:305
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 FCE...
int Rast3d_get_file_type(void)
get G3d file type
Definition defaults.c:212
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....
Definition putvalue.c:89
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}).
Definition resample.c:88
void * Rast3d_open_cell_old_no_header(const char *, const char *)
int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int)
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).
Definition tilemath.c:47
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 ...
Definition getvalue.c:249
void Rast3d_cache_set_min_unlock(RASTER3D_cache *, int)
Definition cache1.c:368
int Rast3d_mask_close(void)
Definition mask.c:37
void Rast3d_skip_error(const char *)
This function ignores the error.
void Rast3d_range_update_from_tile(RASTER3D_Map *, const void *, int, int, int, int, int, int, int, int)
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-coordina...
Definition tilemath.c:70
void Rast3d_print_error(const char *)
Prints error message.
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 r...
Definition mask.c:324
void Rast3d_get_block_nocache(RASTER3D_Map *, int, int, int, int, int, int, void *, int)
Definition getblock.c:11
void Rast3d_mask_float(RASTER3D_Map *, int, int, int, float *)
Same as Rast3d_mask_num (x, y, z, value, FCELL_TYPE).
Definition mask.c:220
int Rast3d_init_fp_xdr(RASTER3D_Map *, int)
Definition fpxdr.c:65
int Rast3d_key_get_int(struct Key_Value *, const char *, int *)
Definition keys.c:7
void Rast3d_parse_vallist(char **, d_Mask **)
Definition maskfn.c:100
int Rast3d_key_set_value(struct Key_Value *, const char *, const char *, const char *, int, int, const int *)
Definition keys.c:125
int Rast3d_write_ints(int, int, const int *, int)
Definition intio.c:9
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,...
Definition getvalue.c:91
void Rast3d_make_aligned_volume_file(void *, const char *, double, double, double, double, double, double, int, int, int)
Definition volume.c:194
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...
Definition tilemath.c:124
int Rast3d_length(int)
void Rast3d_set_window_params(void)
Definition param.c:120
void Rast3d_get_volume(void *, double, double, double, double, double, double, double, double, double, double, double, double, int, int, int, void *, int)
Definition volume.c:134
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...
Definition tilealloc.c:22
void Rast3d_get_compression_mode(int *, int *)
Gets compression mode.
Definition defaults.c:125
int Rast3d_lock_tile(RASTER3D_Map *, int)
Locks tile with tileIndex in cache. If after locking fewer than the minimum number of unlocked tiles ...
Definition tileread.c:258
int Rast3d_extern_length(int)
void Rast3d_get_window_map(RASTER3D_Map *, double *, double *, double *, double *, double *, double *)
Definition headerinfo.c:85
int Rast3d_cache_remove_elt(RASTER3D_cache *, int)
Definition cache1.c:410
int Rast3d_range_init(RASTER3D_Map *)
void * Rast3d_cache_new_read(int, int, int, read_fn *, void *)
Definition cache1.c:161
int Rast3d_cache_unlock_all(RASTER3D_cache *)
Definition cache1.c:324
int Rast3d_end_cycle(RASTER3D_Map *)
Ends a cycle.
Definition tileread.c:423
DCELL Rast3d_mask_match_d_interval(DCELL, d_Interval *)
Definition maskfn.c:58
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....
int Rast3d_tile_load(RASTER3D_Map *, int)
Same functionality as Rast3d_get_tile_ptr() but does not return the pointer.
Definition tileio.c:121
void Rast3d_cache_set_remove_fun(RASTER3D_cache *, write_fn *, void *)
void Rast3d_set_vertical_unit(RASTER3D_Map *map, const char *)
set Vertical unit from string
Definition headerinfo.c:198
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 win...
Definition windowio.c:132
void Rast3d_region_copy(RASTER3D_Region *, RASTER3D_Region *)
Copies the values of regionSrc into regionDst.
Definition region.c:196
void Rast3d_cache_hash_load_name(Rast3d_cache_hash *, int, int)
Definition cachehash.c:93
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 ...
Definition open2.c:41
void int Rast3d_is_xdr_null_num(const void *, int)
Definition fpxdr.c:13
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.
Definition tilemath.c:216
int Rast3d_cache_unlock(RASTER3D_cache *, int)
Definition cache1.c:303
int Rast3d_range_write(RASTER3D_Map *)
Writes the range which is stored in the range structure of map. (This function is invoked automatical...
int Rast3d_begin_cycle(RASTER3D_Map *)
Starts a new cycle.
Definition tileread.c:401
int Rast3d_put_double(RASTER3D_Map *, int, int, int, double)
Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE).
Definition putvalue.c:51
void Rast3d_init_defaults(void)
Initializes the default values described in RASTER3D Defaults. Applications have to use this function...
Definition defaults.c:282
void Rast3d_get_region_map(RASTER3D_Map *, double *, double *, double *, double *, double *, double *)
Returns the size of the region.
Definition headerinfo.c:71
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 ...
Definition tileread.c:150
int Rast3d_copy_to_xdr(const void *, int)
Definition fpxdr.c:141
void * Rast3d_malloc(int)
Same as malloc (nBytes), except that in case of error Rast3d_error() is invoked.
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_TYP...
Definition changetype.c:21
int Rast3d_copy_from_xdr(int, void *)
Definition fpxdr.c:223
void Rast3d_use_window_params(void)
Writes window to the file specified by windowName. The name is converted by the rules defined in wind...
Definition windowio.c:263
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...
Definition tilemath.c:243
int Rast3d_key_get_double(struct Key_Value *, const char *, double *)
Definition keys.c:27
int Rast3d_cache_lock_all(RASTER3D_cache *)
Definition cache1.c:341
int Rast3d_read_tile_float(RASTER3D_Map *, int, void *)
Is equivalent to Rast3d_read_tile (map, tileIndex, tile, FCELL_TYPE).
Definition tileread.c:208
void Rast3d_error(const char *,...) __attribute__((format(printf
int Rast3d_get_cache_size(void)
get cache size
Definition defaults.c:156
int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *, int *, int *, int *, int *)
Definition param.c:53
int Rast3d_write_tile_double(RASTER3D_Map *, int, const void *)
Is equivalent to Rast3d_write_tile (map, tileIndex, tile, DCELL_TYPE).
Definition tilewrite.c:226
int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int)
Definition fpcompress.c:716
double Rast3d_get_double(RASTER3D_Map *, int, int, int)
Is equivalent to Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE); return value.
Definition getvalue.c:65
void Rast3d_set_compression_mode(int, int)
set compression mode
Definition defaults.c:93
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 ti...
Definition tilewrite.c:129
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...
void Rast3d_copy_double2Float(const double *, int, float *, int, int)
void Rast3d_fpcompress_print_binary(char *, int)
Definition fpcompress.c:16
void Rast3d_incorporate2d_region(struct Cell_head *, RASTER3D_Region *)
Replaces the 2d portion of region3d with the values stored in region2d.
Definition region.c:83
int Rast3d_read_ints(int, int, int *, int)
Definition intio.c:52
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...
Definition mask.c:135
int Rast3d_key_set_double(struct Key_Value *, const char *, const double *)
Definition keys.c:104
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...
Definition tilewrite.c:347
int Rast3d_cache_hash_name2index(Rast3d_cache_hash *, int)
Definition cachehash.c:108
int Rast3d_long_encode(long *, unsigned char *, int)
Definition long.c:5
int Rast3d_key_get_value(struct Key_Value *, const char *, char *, char *, int, int, int *)
Definition keys.c:66
void Rast3d_set_cache_size(int)
set cache size
Definition defaults.c:141
int Rast3d_is_xdr_null_float(const float *)
Definition fpxdr.c:24
int Rast3d__remove_tile(RASTER3D_Map *, int)
Definition tileio.c:133
void Rast3d_set_xdr_null_float(float *)
Definition fpxdr.c:56
void Rast3d_get_window(RASTER3D_Region *)
Stores the current default window in window.
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
void * Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *)
int Rast3d_close(RASTER3D_Map *)
Close 3D raster map files.
int Rast3d_cache_remove_all(RASTER3D_cache *)
Definition cache1.c:434
int Rast3d_init_copy_to_xdr(RASTER3D_Map *, int)
Definition fpxdr.c:102
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 R...
Definition region.c:330
int Rast3d_remove_color(const char *)
Removes the primary and/or secondary color file.
float Rast3d_get_float(RASTER3D_Map *, int, int, int)
Is equivalent to Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE); return value.
Definition getvalue.c:42
void Rast3d_rle_decode(char *, char *, int, int, int *, int *)
Definition rle.c:236
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.
Definition mask.c:172
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.
Definition tilemath.c:152
void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *, double *, double *)
Converts cell-coordinates (x, y, z) into region-coordinates (north, east, top).
Definition region.c:374
int Rast3d_cache_get_elt(RASTER3D_cache *, int, void *)
Definition cache1.c:530
void Rast3d_range_min_max(RASTER3D_Map *, double *, double *)
Returns in min and max the minimum and maximum values of the range.
void Rast3d_fpcompress_dissect_xdr_double(unsigned char *)
Definition fpcompress.c:31
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.
Definition getvalue.c:201
int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int)
Definition fpcompress.c:685
int Rast3d_init_cache(RASTER3D_Map *, int)
Definition cache.c:221
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.
int Rast3d_mask_is_on(RASTER3D_Map *)
Returns 1 if the mask for map is turned on. Returns 0 otherwise.
Definition mask.c:353
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,...
Definition tilewrite.c:302
double DCELL
Definition gis.h:635
int write_fn(int, const void *, void *)
Definition raster3d.h:254
int read_fn(int, void *, void *)
Definition raster3d.h:255
2D/3D raster map header (used also for region)
Definition gis.h:446
Definition gis.h:692
Raster history info (metadata)
Definition raster.h:172