GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dregion.c File Reference
#include <stdio.h>
#include <grass/gis.h>
#include <grass/G3d.h>
#include "G3d_intern.h"
Include dependency graph for g3dregion.c:

Go to the source code of this file.

Functions

void G3d_extract2dRegion (G3D_Region *region3d, struct Cell_head *region2d)
 Returns in region2d the 2d portion of region3d. More...
 
void G3d_regionToCellHead (G3D_Region *region3d, struct Cell_head *region2d)
 Returns in region2d the 2d portion of region3d. More...
 
void G3d_incorporate2dRegion (struct Cell_head *region2d, G3D_Region *region3d)
 Replaces the 2d portion of region3d with the values stored in region2d. More...
 
void G3d_regionFromToCellHead (struct Cell_head *region2d, G3D_Region *region3d)
 Replaces the 2d portion of region3d with the values stored in region2d. More...
 
void G3d_adjustRegion (G3D_Region *region)
 Computes an adjusts the resolutions in the region structure from the region boundaries and number of cells per dimension. More...
 
void G3d_adjustRegionRes (G3D_Region *region)
 Computes an adjusts the number of cells per dimension in the region structure from the region boundaries and resolutions. More...
 
void G3d_regionCopy (G3D_Region *regionDest, G3D_Region *regionSrc)
 Copies the values of regionSrc into regionDst. (The unfortunate order of parameters was chosen in order to conform to the order used in G_copy ()). More...
 
void G3d_getRegionValue (G3D_Map *map, double north, double east, double top, void *value, int type)
 Returns in value the value of the map which corresponds to region coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type. More...
 
int G3d_readRegionMap (const char *name, const char *mapset, G3D_Region *region)
 

Function Documentation

void G3d_adjustRegion ( G3D_Region *  region)

Computes an adjusts the resolutions in the region structure from the region boundaries and number of cells per dimension.

Parameters
region
Returns
void

Definition at line 149 of file g3dregion.c.

References err, G3d_fatalError(), G3d_regionFromToCellHead(), G3d_regionToCellHead(), G_adjust_Cell_head3(), G_fatal_error(), and NULL.

Referenced by G3d_fillHeader(), G3d_openCellNew(), G3d_openCellOld(), G3d_setWindow(), and G3d_setWindowMap().

void G3d_adjustRegionRes ( G3D_Region *  region)

Computes an adjusts the number of cells per dimension in the region structure from the region boundaries and resolutions.

Parameters
region
Returns
void

Definition at line 178 of file g3dregion.c.

References err, G3d_fatalError(), G3d_regionFromToCellHead(), G3d_regionToCellHead(), G_adjust_Cell_head3(), G_fatal_error(), and NULL.

void G3d_extract2dRegion ( G3D_Region *  region3d,
struct Cell_head *  region2d 
)

Returns in region2d the 2d portion of region3d.

Parameters
region3d
region2d
Returns
void

Definition at line 19 of file g3dregion.c.

void G3d_getRegionValue ( G3D_Map *  map,
double  north,
double  east,
double  top,
void *  value,
int  type 
)

Returns in value the value of the map which corresponds to region coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type.

Parameters
map
north
east
top
value
type
Returns
void

Definition at line 239 of file g3dregion.c.

References G3d_setNullValue().

void G3d_incorporate2dRegion ( struct Cell_head *  region2d,
G3D_Region *  region3d 
)

Replaces the 2d portion of region3d with the values stored in region2d.

Parameters
region2d
region3d
Returns
void

Definition at line 86 of file g3dregion.c.

int G3d_readRegionMap ( const char *  name,
const char *  mapset,
G3D_Region *  region 
)
void G3d_regionCopy ( G3D_Region *  regionDest,
G3D_Region *  regionSrc 
)

Copies the values of regionSrc into regionDst. (The unfortunate order of parameters was chosen in order to conform to the order used in G_copy ()).

Parameters
regionDest
regionSrc
Returns
void

Definition at line 213 of file g3dregion.c.

References G_copy().

Referenced by G3d_getRegionStructMap(), G3d_getWindow(), G3d_getWindowStructMap(), G3d_openCellNew(), G3d_openCellOld(), G3d_setWindow(), and G3d_setWindowMap().

void G3d_regionFromToCellHead ( struct Cell_head *  region2d,
G3D_Region *  region3d 
)

Replaces the 2d portion of region3d with the values stored in region2d.

Parameters
region2d
region3d
Returns
void

Definition at line 115 of file g3dregion.c.

Referenced by G3d_adjustRegion(), and G3d_adjustRegionRes().

void G3d_regionToCellHead ( G3D_Region *  region3d,
struct Cell_head *  region2d 
)

Returns in region2d the 2d portion of region3d.

Parameters
region3d
region2d
Returns
void

Definition at line 46 of file g3dregion.c.

Referenced by G3d_adjustRegion(), G3d_adjustRegionRes(), and N_init_geom_data_3d().