GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-847944e18e
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <grass/raster3d.h>
#include <grass/glocale.h>
#include "raster3d_intern.h"
Go to the source code of this file.
Macros | |
#define | RASTER3D_HEADER_TILEX "TileDimensionX" |
#define | RASTER3D_HEADER_TILEY "TileDimensionY" |
#define | RASTER3D_HEADER_TILEZ "TileDimensionZ" |
#define | RASTER3D_HEADER_TYPE "CellType" |
#define | RASTER3D_HEADER_COMPRESSION "useCompression" |
#define | RASTER3D_HEADER_USERLE "useRle" |
#define | RASTER3D_HEADER_USELZW "useLzw" |
#define | RASTER3D_HEADER_PRECISION "Precision" |
#define | RASTER3D_HEADER_DATA_OFFSET "nofHeaderBytes" |
#define | RASTER3D_HEADER_USEXDR "useXdr" |
#define | RASTER3D_HEADER_HASINDEX "hasIndex" |
#define | RASTER3D_HEADER_UNIT "Units" |
#define | RASTER3D_HEADER_VERTICAL_UNIT "VerticalUnits" |
#define | RASTER3D_HEADER_VERSION "Version" |
#define | RLE_STATUS_BYTES 2 |
#define | XDR_MISUSE_BYTES 10 |
Functions | |
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) |
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) |
int | Rast3d_rewrite_header (RASTER3D_Map *map) |
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. More... | |
int | Rast3d__compute_cache_size (RASTER3D_Map *map, int cacheCode) |
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) |
Variables | |
void * | tmpCompress |
int | tmpCompressLength |
void * | xdr |
int | xdrLength |
#define RASTER3D_HEADER_COMPRESSION "useCompression" |
Definition at line 22 of file raster3d/header.c.
#define RASTER3D_HEADER_DATA_OFFSET "nofHeaderBytes" |
Definition at line 26 of file raster3d/header.c.
#define RASTER3D_HEADER_HASINDEX "hasIndex" |
Definition at line 28 of file raster3d/header.c.
#define RASTER3D_HEADER_PRECISION "Precision" |
Definition at line 25 of file raster3d/header.c.
#define RASTER3D_HEADER_TILEX "TileDimensionX" |
Definition at line 18 of file raster3d/header.c.
#define RASTER3D_HEADER_TILEY "TileDimensionY" |
Definition at line 19 of file raster3d/header.c.
#define RASTER3D_HEADER_TILEZ "TileDimensionZ" |
Definition at line 20 of file raster3d/header.c.
#define RASTER3D_HEADER_TYPE "CellType" |
Definition at line 21 of file raster3d/header.c.
#define RASTER3D_HEADER_UNIT "Units" |
Definition at line 29 of file raster3d/header.c.
#define RASTER3D_HEADER_USELZW "useLzw" |
Definition at line 24 of file raster3d/header.c.
#define RASTER3D_HEADER_USERLE "useRle" |
Definition at line 23 of file raster3d/header.c.
#define RASTER3D_HEADER_USEXDR "useXdr" |
Definition at line 27 of file raster3d/header.c.
#define RASTER3D_HEADER_VERSION "Version" |
Definition at line 31 of file raster3d/header.c.
#define RASTER3D_HEADER_VERTICAL_UNIT "VerticalUnits" |
Definition at line 30 of file raster3d/header.c.
#define RLE_STATUS_BYTES 2 |
#define XDR_MISUSE_BYTES 10 |
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_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_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_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_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_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().
void* tmpCompress |
Definition at line 11 of file raster3d/header.c.
int tmpCompressLength |
Definition at line 12 of file raster3d/header.c.
void* xdr |
Definition at line 13 of file raster3d/header.c.
Referenced by Rast3d_init_fp_xdr().
int xdrLength |
Definition at line 14 of file raster3d/header.c.
Referenced by Rast3d_init_fp_xdr().