GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72846
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gdal.c File Reference

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 dependency graph for gdal.c:

Go to the source code of this file.

Functions

void Rast_init_gdal (void)
 Initialization. More...
 
struct GDAL_linkRast_get_gdal_link (const char *name, const char *mapset)
 Get GDAL link settings for given raster map. More...
 
struct GDAL_linkRast_create_gdal_link (const char *name, RASTER_MAP_TYPE map_type)
 Create GDAL settings for given raster map. More...
 
void Rast_close_gdal_link (struct GDAL_link *gdal)
 Close existing GDAL link. More...
 
int Rast_close_gdal_write_link (struct GDAL_link *gdal)
 Close existing GDAL link and write out data. More...
 

Detailed Description

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.

Author
Glynn Clements

(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.

Author
Markus Metz

Definition in file gdal.c.

Function Documentation

void Rast_close_gdal_link ( struct GDAL_link gdal)

Close existing GDAL link.

Parameters
gdalpointer to GDAL_link to be closed

Definition at line 574 of file gdal.c.

References GDAL_link::filename, and G_free().

int Rast_close_gdal_write_link ( struct GDAL_link gdal)

Close existing GDAL link and write out data.

Parameters
gdalpointer to GDAL_link to be closed
Returns
1 on success
-1 on failure

Definition at line 591 of file gdal.c.

References _, dst, FALSE, GDAL_link::filename, G_free(), G_strcasecmp(), G_warning(), and NULL.

struct GDAL_link* Rast_get_gdal_link ( const char *  name,
const char *  mapset 
)

Get GDAL link settings for given raster map.

Parameters
namemap name
mapsetname of mapset
Returns
pointer to GDAL_link structure
NULL if link not found

Definition at line 237 of file gdal.c.

References GDAL_link::band_num, CELL_TYPE, DCELL_TYPE, FCELL_TYPE, fclose(), GDAL_link::filename, G_find_key_value(), G_find_raster2(), G_fopen_old_misc(), G_fread_key_value(), G_store(), GDAL_link::hflip, NULL, GDAL_link::null_val, Rast_init_gdal(), Rast_map_type(), Rast_set_d_null_value(), and GDAL_link::vflip.

Referenced by Rast__open_old().

void Rast_init_gdal ( void  )

Initialization.

Register all GDAL drivers.

Definition at line 214 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().