Loading...
Searching...
No Matches
rd_cellhd.c File Reference

GIS Library - Read cell header or window. More...

`#include <string.h>`
`#include <grass/gis.h>`
`#include <grass/glocale.h>`
`#include "gis_local_proto.h"`
Include dependency graph for rd_cellhd.c:

Go to the source code of this file.

## Macros

#define | F_PROJ 1
#define | F_ZONE 2
#define | F_NORTH 3
#define | F_SOUTH 4
#define | F_EAST 5
#define | F_WEST 6
#define | F_EWRES 7
#define | F_NSRES 8
#define | F_FORMAT 9
#define | F_COMP 10
#define | F_COLS 11
#define | F_ROWS 12
#define | F_EWRES3 13
#define | F_NSRES3 14
#define | F_COLS3 15
#define | F_ROWS3 16
#define | F_TOP 17
#define | F_BOTTOM 18
#define | F_TBRES 19
#define | F_DEPTHS 20
#define | SET(x)
#define | TEST(x)

## Functions

void | G__read_Cell_head (FILE *fd, struct Cell_head *cellhd)
| Read cell header (for internal use only).
void | G__read_Cell_head_array (char **array, struct Cell_head *cellhd)
| Read window from NULL terminated array of strings (for internal use only).

## Detailed Description

GIS Library - Read cell header or window.

(C) 1999-2011 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
  USACERL and others

Definition in file rd_cellhd.c.

## Macro Definition Documentation

## F_BOTTOM

#define F_BOTTOM 18

Definition at line 43 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_COLS

#define F_COLS 11

Definition at line 35 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_COLS3

#define F_COLS3 15

Definition at line 40 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_COMP

#define F_COMP 10

Definition at line 34 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_DEPTHS

#define F_DEPTHS 20

Definition at line 45 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_EAST

#define F_EAST 5

Definition at line 29 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_EWRES

#define F_EWRES 7

Definition at line 31 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_EWRES3

#define F_EWRES3 13

Definition at line 38 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_FORMAT

#define F_FORMAT 9

Definition at line 33 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_NORTH

#define F_NORTH 3

Definition at line 27 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_NSRES

#define F_NSRES 8

Definition at line 32 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_NSRES3

#define F_NSRES3 14

Definition at line 39 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_PROJ

#define F_PROJ 1

Definition at line 25 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_ROWS

#define F_ROWS 12

Definition at line 36 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_ROWS3

#define F_ROWS3 16

Definition at line 41 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_SOUTH

#define F_SOUTH 4

Definition at line 28 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_TBRES

#define F_TBRES 19

Definition at line 44 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_TOP

#define F_TOP 17

Definition at line 42 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_WEST

#define F_WEST 6

Definition at line 30 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## F_ZONE

#define F_ZONE 2

Definition at line 26 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## SET

#define SET | ( |  | x | ) |

Value:
flags |= (1 << x)
x
#define x

Definition at line 47 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## TEST

#define TEST | ( |  | x | ) |

Value:
(flags & (1 << x))

Definition at line 48 of file rd_cellhd.c.

Referenced by G__read_Cell_head_array().

## Function Documentation

## G__read_Cell_head()

void G__read_Cell_head | ( | FILE * | fd,
|  | struct Cell_head * | cellhd )

Read cell header (for internal use only).

Parameters

  | fd | file descriptor
  [out] | cellhd | pointer to Cell_head structure

Definition at line 56 of file rd_cellhd.c.

References count, G__read_Cell_head_array(), G_debug(), G_free(), G_getl(), and G_store().

Referenced by G_get_element_window().

## G__read_Cell_head_array()

void G__read_Cell_head_array | ( | char ** | array,
|  | struct Cell_head * | cellhd )

Read window from NULL terminated array of strings (for internal use only).

Parameters

  | array | array of strings
  [out] | cellhd | pointer to Cell_head structure

Definition at line 96 of file rd_cellhd.c.

References F_BOTTOM, F_COLS, F_COLS3, F_COMP, F_DEPTHS, F_EAST, F_EWRES, F_EWRES3, F_FORMAT, F_NORTH, F_NSRES, F_NSRES3, F_PROJ, F_ROWS, F_ROWS3, F_SOUTH, F_TBRES, F_TOP, F_WEST, F_ZONE, G_adjust_Cell_head(), G_debug(), G_fatal_error(), G_scan_easting(), G_scan_northing(), G_scan_resolution(), SET, and TEST.

Referenced by G__read_Cell_head(), and G_get_window().