21 _(
"Rast3d_open_cell_old_no_header: error in Rast3d_mask_open_old"));
28 _(
"Rast3d_open_cell_old_no_header: error in Rast3d_malloc"));
40 Rast3d_error(
_(
"Rast3d_open_cell_old_no_header: error in G_open_old"));
85 int compression, useRle, useLzw, type, tileX, tileY, tileZ;
86 int rows, cols, depths, precision;
87 double ew_res, ns_res, tb_res;
88 int nofHeaderBytes, dataOffset, useXdr, hasIndex;
93 double north, south, east, west, top, bottom;
98 _(
"Rast3d_open_cell_old: error in Rast3d_open_cell_old_no_header"));
102 if (lseek(map->
data_fd, (
long)0, SEEK_SET) == -1) {
108 map, &proj, &zone, &north, &south, &east, &west, &top, &bottom,
109 &rows, &cols, &depths, &ew_res, &ns_res, &tb_res, &tileX, &tileY,
110 &tileZ, &type, &
compression, &useRle, &useLzw, &precision,
111 &dataOffset, &useXdr, &hasIndex, &unit, &vertical_unit, &version)) {
112 Rast3d_error(
_(
"Rast3d_open_cell_old: error in Rast3d_read_header"));
119 if (proj != window->
proj) {
120 Rast3d_error(
_(
"Rast3d_open_cell_old: projection does not match window "
124 if (zone != window->
zone) {
126 _(
"Rast3d_open_cell_old: zone does not match window zone"));
145 _(
"Rast3d_open_cell_old: index does not fit into long"));
149 Rast3d_error(
_(
"Rast3d_open_cell_old: error in Rast3d_malloc"));
163 nofHeaderBytes = dataOffset;
169 useLzw, type, precision, cache, hasIndex,
170 map->
useXdr, typeIntern, nofHeaderBytes, tileX,
171 tileY, tileZ, proj, zone, north, south, east, west,
172 top, bottom, rows, cols, depths, ew_res, ns_res,
173 tb_res, unit, vertical_unit, version)) {
174 Rast3d_error(
_(
"Rast3d_open_cell_old: error in Rast3d_fill_header"));
213 int nofHeaderBytes, dummy = 0,
compression, precision;
219 Rast3d_error(
_(
"Rast3d_open_cell_new: error in Rast3d_mask_open_old"));
228 Rast3d_error(
_(
"Rast3d_open_cell_new: error in Rast3d_malloc"));
243 Rast3d_error(
_(
"Rast3d_open_cell_new: could not open file"));
255 else if (precision < -1)
258 else if (precision > 52)
260 else if (precision < -1)
299 nofHeaderBytes = lseek(map->
data_fd, (
long)0, SEEK_CUR);
313 Rast3d_error(
_(
"Rast3d_open_cell_new: error in Rast3d_fill_header"));
int g3d_tile_dimension[3]
int g3d_vertical_unit_default
int G_unqualified_name(const char *, const char *, char *, char *)
Returns unqualified map name (without @ mapset)
void G_warning(const char *,...) __attribute__((format(printf
int G_open_old_misc(const char *, const char *, const char *, const char *)
open a database misc file for reading
char * G_tempfile(void)
Returns a temporary file name.
const char * G_mapset(void)
Get current mapset name.
char * G_store(const char *)
Copy string to allocated memory.
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_free(void *)
Same as free (ptr).
void Rast3d_make_mapset_map_directory(const char *)
void Rast3d_long_decode(unsigned char *, long *, int, int)
int Rast3d_mask_open_old(void)
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_mask_off(RASTER3D_Map *)
Turns off the mask for map. This is the default. Do not invoke this function after the first tile has...
RASTER3D_Region * Rast3d_window_ptr(void)
void Rast3d_adjust_region(RASTER3D_Region *)
Computes an adjusts the resolutions in the region structure from the region boundaries and number of ...
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}).
int Rast3d_write_ints(int, int, const int *, int)
int Rast3d_range_init(RASTER3D_Map *)
void Rast3d_region_copy(RASTER3D_Region *, RASTER3D_Region *)
Copies the values of regionSrc into regionDst.
void Rast3d_init_defaults(void)
Initializes the default values described in RASTER3D Defaults. Applications have to use this function...
void Rast3d_error(const char *,...) __attribute__((format(printf
int Rast3d_read_ints(int, int, int *, int)
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
void * Rast3d_malloc(int)
Same as malloc (nBytes), except that in case of error Rast3d_error() is invoked.
unsigned short compression
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 FCE...
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 b...
void * Rast3d_open_cell_old_no_header(const char *name, const char *mapset)
#define RASTER3D_DIRECTORY
#define RASTER3D_MAP_VERSION
#define RASTER3D_DEFAULT_WINDOW
#define RASTER3D_MAX_PRECISION
#define RASTER3D_NO_COMPRESSION
#define RASTER3D_TILE_SAME_AS_FILE
#define RASTER3D_CELL_ELEMENT
#define RASTER3D_WRITE_DATA
#define RASTER3D_MIN(a, b)
#define RASTER3D_READ_DATA
#define RASTER3D_HAS_INDEX
resample_fn * resampleFun