|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
Raster Library - Utilization of GDAL library. More...
#include <stdlib.h>#include <string.h>#include <unistd.h>#include <grass/config.h>#include <grass/gis.h>#include <grass/raster.h>#include <grass/gprojects.h>#include <grass/glocale.h>#include "R.h"#include <gdal.h>
Go to the source code of this file.
Functions | |
| void | Rast_init_gdal (void) |
| Initialization. | |
| struct GDAL_link * | Rast_get_gdal_link (const char *name, const char *mapset) |
| Get GDAL link settings for given raster map. | |
| struct GDAL_link * | Rast_create_gdal_link (const char *name, RASTER_MAP_TYPE map_type) |
| Create GDAL settings for given raster map. | |
| void | Rast_close_gdal_link (struct GDAL_link *gdal) |
| Close existing GDAL link. | |
| int | Rast_close_gdal_write_link (struct GDAL_link *gdal) |
| Close existing GDAL link and write out data. | |
| CPLErr | Rast_gdal_raster_IO (GDALRasterBandH band, GDALRWFlag rw_flag, int x_off, int y_off, int x_size, int y_size, void *buffer, int buf_x_size, int buf_y_size, GDALDataType buf_type, int pixel_size, int line_size) |
| Input/output function for GDAL links. | |
Raster Library - Utilization of GDAL library.
(C) 2010 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file gdal.c.
Close existing GDAL link.
| gdal | pointer to GDAL_link to be closed |
Definition at line 380 of file gdal.c.
References GDAL_link::data, GDAL_link::filename, and G_free().
Close existing GDAL link and write out data.
| gdal | pointer to GDAL_link to be closed |
Definition at line 395 of file gdal.c.
References _, GDAL_link::data, FALSE, GDAL_link::filename, G_free(), G_strcasecmp(), G_warning(), NULL, and st.
| struct GDAL_link * Rast_create_gdal_link | ( | const char * | name, |
| RASTER_MAP_TYPE | map_type | ||
| ) |
Create GDAL settings for given raster map.
| name | map name |
| map_type | map type (CELL, FCELL, DCELL) |
Definition at line 227 of file gdal.c.
References _, GDAL_link::band, GDAL_link::band_num, CELL_TYPE, GDAL_link::data, DCELL_TYPE, FCELL_TYPE, GDAL_link::filename, G_calloc, G_create_key_value(), G_fatal_error(), G_fopen_new_misc(), G_free_key_value(), G_fwrite_key_value(), G_get_projepsg(), G_get_projinfo(), G_get_projunits(), G_initialize_done(), G_is_initialized(), G_message(), G_set_key_value(), G_store(), G_warning(), GPATH_MAX, GPJ_grass_to_wkt2(), GDAL_link::hflip, name, R__::nbytes, NULL, GDAL_link::null_val, Rast__init_window(), Rast_init_gdal(), Rast_set_d_null_value(), st, GDAL_link::type, GDAL_link::vflip, and R__::wr_window.
| CPLErr Rast_gdal_raster_IO | ( | GDALRasterBandH | band, |
| GDALRWFlag | rw_flag, | ||
| int | x_off, | ||
| int | y_off, | ||
| int | x_size, | ||
| int | y_size, | ||
| void * | buffer, | ||
| int | buf_x_size, | ||
| int | buf_y_size, | ||
| GDALDataType | buf_type, | ||
| int | pixel_size, | ||
| int | line_size | ||
| ) |
Get GDAL link settings for given raster map.
| name | map name |
| mapset | name of mapset |
Definition at line 53 of file gdal.c.
References GDAL_link::band, GDAL_link::band_num, CELL_TYPE, GDAL_link::data, DCELL_TYPE, FCELL_TYPE, GDAL_link::filename, G_calloc, G_find_key_value(), G_find_raster2(), G_fopen_old_misc(), G_fread_key_value(), G_store(), G_strcasecmp(), GDAL_link::hflip, name, NULL, GDAL_link::null_val, Rast_init_gdal(), Rast_map_type(), Rast_set_d_null_value(), GDAL_link::type, and GDAL_link::vflip.
Referenced by Rast__open_old().
Initialization.
Register all GDAL drivers.
Definition at line 33 of file gdal.c.
References G_initialize_done(), and G_is_initialized().
Referenced by Rast_create_gdal_link(), Rast_get_gdal_link(), and Rast_init_all().