adj_cellhd.c File Reference

#include <grass/gis.h>
#include <grass/glocale.h>

Include dependency graph for adj_cellhd.c:

Go to the source code of this file.

Functions

char * G_adjust_Cell_head (struct Cell_head *cellhd, int row_flag, int col_flag)
 adjust cell header
char * G_adjust_Cell_head3 (struct Cell_head *cellhd, int row_flag, int col_flag, int depth_flag)
 adjust cell header


Function Documentation

char* G_adjust_Cell_head ( struct Cell_head *  cellhd,
int  row_flag,
int  col_flag 
)

adjust cell header

This function fills in missing parts of the input cell header (or region). It also makes projection-specific adjustments. The cellhd structure must have its north, south, east, west, and proj fields set.

If row_flag is true, then the north-south resolution is computed from the number of rows in the cellhd structure. Otherwise the number of rows is computed from the north-south resolution in the structure, similarly for col_flag and the number of columns and the east-west resolution.

3D values are not adjusted.

This routine returns NULL if execution occurs without error, otherwise it returns an error message.

Parameters:
cellhd 
row_flag 
col_flag 
Returns:
char *

Definition at line 64 of file adj_cellhd.c.

References G_debug(), G_warning(), and NULL.

Referenced by G__read_Cell_head_array(), G_align_window(), and G_set_window().

char* G_adjust_Cell_head3 ( struct Cell_head *  cellhd,
int  row_flag,
int  col_flag,
int  depth_flag 
)

adjust cell header

This function fills in missing parts of the input cell header (or region). It also makes projection-specific adjustments. The cellhd structure must have its north, south, east, west, and proj fields set.

If row_flag is true, then the north-south resolution is computed from the number of rows in the cellhd structure. Otherwise the number of rows is computed from the north-south resolution in the structure, similarly for col_flag and the number of columns and the east-west resolution.

If depth_flag is true, top-bottom resolution is calculated from depths. If depth_flag are false, number of depths is calculated from top-bottom resolution.

This routine returns NULL if execution occurs without error, otherwise it returns an error message.

Parameters:
cellhd 
row_flag 
col_flag 
Returns:
char *

Definition at line 203 of file adj_cellhd.c.

References G_debug(), G_warning(), and NULL.


Generated on Sun Apr 6 17:32:14 2008 for GRASS by  doxygen 1.5.5