GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <grass/gis.h>
#include <grass/site.h>
#include <grass/dbmi.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
#define | DQUOTE '"' |
#define | SPACE ' ' |
#define | BSLASH 92 |
#define | PIPE '|' |
#define | ispipe(c) (c==PIPE) |
#define | isnull(c) (c=='\0') |
#define | isquote(c) (c==DQUOTE) |
#define | isbslash(c) (c==BSLASH) |
#define | FOUND_ALL(s, n, dim, c, d) |
Functions | |
int | G_site_get (struct Map_info *Map, Site *s) |
int | G_site_put (struct Map_info *Map, const Site *s) |
int | G_site_describe (struct Map_info *Map, int *dims, int *cat, int *strs, int *dbls) |
int | G_site_put_head (struct Map_info *Map, Site_head *head) |
int | G_site_get_head (struct Map_info *Map, Site_head *head) |
char * | G_find_sites (char *name, const char *mapset) |
char * | G_find_sites2 (const char *name, const char *mapset) |
char * | G_ask_sites_new (const char *prompt, char *name) |
char * | G_ask_sites_old (const char *prompt, char *name) |
char * | G_ask_sites_any (const char *prompt, char *name) |
char * | G_ask_sites_in_mapset (const char *prompt, char *name) |
struct Map_info * | G_sites_open_old (const char *name, const char *mapset) |
struct Map_info * | G_sites_open_new (const char *name) |
void | G_sites_close (struct Map_info *Map) |
struct Map_info * | G_fopen_sites_old (const char *name, const char *mapset) |
struct Map_info * | G_fopen_sites_new (const char *name) |
int | G_get_site (struct Map_info *fd, double *east, double *north, char **desc) |
int | G_put_site (struct Map_info *fd, double east, double north, const char *desc) |
void | G_site_free_struct (Site *s) |
Site * | G_site_new_struct (RASTER_MAP_TYPE cattype, int n_dim, int n_s_att, int n_d_att) |
int | G_oldsite_get (FILE *fptr, Site *s) |
int | G__oldsite_get (FILE *ptr, Site *s, int fmt) |
int | G_oldsite_describe (FILE *ptr, int *dims, int *cat, int *strs, int *dbls) |
int | G_site_in_region (const Site *site, const struct Cell_head *region) |
int | G_site_c_cmp (const void *a, const void *b) |
int | G_site_d_cmp (const void *a, const void *b) |
int | G_oldsite_s_cmp (const void *a, const void *b) |
FILE * | G_oldsites_open_old (const char *name, const char *mapset) |
FILE * | G_oldsites_open_new (const char *name) |
char * | G_site_format (const Site *s, const char *fs, int id) |
SITE_ATT * | G_sites_get_atts (struct Map_info *Map, int *cat) |
int | G_sites_get_fields (struct Map_info *Map, char ***cnames, int **ctypes, int **ndx) |
void | G_sites_free_fields (int ncols, char **cnames, int *ctypes, int *ndx) |
#define DQUOTE '"' |
Definition at line 27 of file sites.c.
Referenced by G__oldsite_get().
#define FOUND_ALL | ( | s, | |
n, | |||
dim, | |||
c, | |||
d | |||
) |
Definition at line 638 of file sites.c.
Referenced by G__oldsite_get().
#define isnull | ( | c | ) | (c=='\0') |
Definition at line 33 of file sites.c.
Referenced by G__oldsite_get(), and G_oldsite_describe().
#define ispipe | ( | c | ) | (c==PIPE) |
Definition at line 32 of file sites.c.
Referenced by G_oldsite_describe().
#define PIPE '|' |
Definition at line 30 of file sites.c.
Referenced by G__oldsite_get(), and G_oldsite_describe().
#define SPACE ' ' |
Definition at line 28 of file sites.c.
Referenced by G_site_format().
Definition at line 650 of file sites.c.
References buf, DQUOTE, err, errno, FOUND_ALL, G_index(), G_scan_easting(), G_scan_northing(), G_strncpy(), isnull, n, NULL, and PIPE.
Referenced by G_oldsite_get().
char* G_ask_sites_any | ( | const char * | prompt, |
char * | name | ||
) |
Definition at line 321 of file sites.c.
References G_ask_any().
char* G_ask_sites_in_mapset | ( | const char * | prompt, |
char * | name | ||
) |
Definition at line 327 of file sites.c.
References G_ask_in_mapset().
char* G_ask_sites_new | ( | const char * | prompt, |
char * | name | ||
) |
Definition at line 309 of file sites.c.
References G_ask_new().
char* G_ask_sites_old | ( | const char * | prompt, |
char * | name | ||
) |
Definition at line 315 of file sites.c.
References G_ask_old().
char* G_find_sites | ( | char * | name, |
const char * | mapset | ||
) |
Definition at line 297 of file sites.c.
References G_find_vector().
char* G_find_sites2 | ( | const char * | name, |
const char * | mapset | ||
) |
Definition at line 303 of file sites.c.
References G_find_vector2().
struct Map_info* G_fopen_sites_new | ( | const char * | name | ) |
Definition at line 527 of file sites.c.
References G_sites_open_new().
struct Map_info* G_fopen_sites_old | ( | const char * | name, |
const char * | mapset | ||
) |
Definition at line 521 of file sites.c.
References G_sites_open_old().
int G_get_site | ( | struct Map_info * | fd, |
double * | east, | ||
double * | north, | ||
char ** | desc | ||
) |
Definition at line 533 of file sites.c.
References G_fatal_error().
int G_oldsite_get | ( | FILE * | fptr, |
Site * | s | ||
) |
Definition at line 643 of file sites.c.
References G__oldsite_get(), and G_projection().
FILE* G_oldsites_open_new | ( | const char * | name | ) |
Definition at line 1089 of file sites.c.
References G_fopen_new().
FILE* G_oldsites_open_old | ( | const char * | name, |
const char * | mapset | ||
) |
Definition at line 1084 of file sites.c.
References G_fopen_old().
int G_put_site | ( | struct Map_info * | fd, |
double | east, | ||
double | north, | ||
const char * | desc | ||
) |
Definition at line 542 of file sites.c.
References G_fatal_error().
int G_site_c_cmp | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 155 of file sites.c.
References G_debug(), and Vect_is_3d().
char* G_site_format | ( | const Site * | s, |
const char * | fs, | ||
int | id | ||
) |
Definition at line 1101 of file sites.c.
References buf, dialogs::fs, G_format_easting(), G_format_northing(), G_index(), G_projection(), G_strcat(), G_strcpy(), NULL, SPACE, and sprintf().
int G_site_get | ( | struct Map_info * | Map, |
Site * | s | ||
) |
Definition at line 55 of file sites.c.
References cat, for(), G_debug(), G_strncpy(), G_warning(), NULL, dialogs::type, Vect_cat_get(), Vect_is_3d(), Vect_new_cats_struct(), Vect_new_line_struct(), and Vect_read_next_line().
int G_site_get_head | ( | struct Map_info * | Map, |
Site_head * | head | ||
) |
Definition at line 228 of file sites.c.
References datetime_error_msg(), G_fatal_error(), G_scan_timestamp(), G_warning(), NULL, Vect_get_comment(), and Vect_get_name().
int G_site_in_region | ( | const Site * | site, |
const struct Cell_head * | region | ||
) |
Definition at line 940 of file sites.c.
References G_adjust_easting().
Definition at line 568 of file sites.c.
References G_fatal_error(), G_free(), NULL, and dialogs::s.
int G_site_put | ( | struct Map_info * | Map, |
const Site * | s | ||
) |
Definition at line 117 of file sites.c.
References G_debug(), G_fatal_error(), NULL, Vect_append_point(), Vect_cat_set(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_reset_cats(), Vect_reset_line(), and Vect_write_line().
int G_site_put_head | ( | struct Map_info * | Map, |
Site_head * | head | ||
) |
Definition at line 180 of file sites.c.
References buf, G_fatal_error(), G_format_timestamp(), G_scan_timestamp(), G_store(), G_warning(), NULL, Vect_set_date(), and Vect_set_map_name().
void G_sites_close | ( | struct Map_info * | Map | ) |
Definition at line 492 of file sites.c.
References free(), G_free(), Vect_build(), and Vect_close().
SITE_ATT* G_sites_get_atts | ( | struct Map_info * | Map, |
int * | cat | ||
) |
Definition at line 1218 of file sites.c.
References db_append_string(), db_close_database_shutdown_driver(), db_get_column_name(), db_get_column_sqltype(), db_get_cursor_table(), db_get_num_rows(), db_get_table_column(), db_get_table_number_of_columns(), db_init_string(), db_open_select_cursor(), db_set_string(), db_sqltype_to_Ctype(), db_start_driver_open_database(), driver, G_debug(), G_fatal_error(), malloc(), render::name, NULL, and Vect_get_field().
struct Map_info* G_sites_open_new | ( | const char * | name | ) |
Definition at line 473 of file sites.c.
References G_debug(), G_message(), G_warning(), render::Map, and Vect_open_new().
Referenced by G_fopen_sites_new().
struct Map_info* G_sites_open_old | ( | const char * | name, |
const char * | mapset | ||
) |
Definition at line 333 of file sites.c.
References db_append_string(), db_close_database_shutdown_driver(), db_fetch(), db_get_column_name(), db_get_column_sqltype(), db_get_column_value(), db_get_cursor_table(), db_get_num_rows(), db_get_string(), db_get_table_column(), db_get_table_number_of_columns(), db_get_value_double(), db_get_value_int(), db_get_value_string(), db_init_string(), db_open_select_cursor(), db_set_string(), db_sqltype_to_Ctype(), db_start_driver_open_database(), driver, G_debug(), G_fatal_error(), G_message(), G_store(), malloc(), render::Map, NULL, value, Vect_get_field(), Vect_open_old(), and Vect_set_open_level().
Referenced by G_fopen_sites_old().