GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
OGSF library - loading and manipulating vector sets (higher level functions) More...
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/ogsf.h>
#include "gsget.h"
Go to the source code of this file.
Functions | |
int | GV_vect_exists (int id) |
Check if vector set exists. More... | |
int | GV_new_vector (void) |
Register new vector set. More... | |
int | GV_num_vects (void) |
Get number of available vector sets. More... | |
int * | GV_get_vect_list (int *numvects) |
Get list of vector sets. More... | |
int | GV_delete_vector (int id) |
Delete vector set from list. More... | |
int | GV_load_vector (int id, const char *filename) |
Load vector set. More... | |
int | GV_get_vectname (int id, char **filename) |
Get vector map name. More... | |
int | GV_set_style (int id, int mem, int color, int width, int use_z) |
Set vector style. More... | |
int | GV_get_style (int id, int *mem, int *color, int *width, int *use_z) |
Get vector style. More... | |
int | GV_set_style_thematic (int id, int layer, const char *color, const char *width, struct Colors *color_rules) |
Set vector set style for thematic mapping. More... | |
int | GV_unset_style_thematic (int id) |
Make style for thematic mapping inactive. More... | |
void | GV_set_trans (int id, float xtrans, float ytrans, float ztrans) |
Set trans ? More... | |
int | GV_get_trans (int id, float *xtrans, float *ytrans, float *ztrans) |
Get trans ? More... | |
int | GV_select_surf (int hv, int hs) |
Select surface identified by hs to have vector identified by hv draped over it. More... | |
int | GV_unselect_surf (int hv, int hs) |
Unselect surface. More... | |
int | GV_surf_is_selected (int hv, int hs) |
Check if surface is selected. More... | |
void | GV_draw_vect (int vid) |
Draw vector set. More... | |
void | GV_alldraw_vect (void) |
Draw all loaded vector sets. More... | |
void | GV_draw_fastvect (int vid) |
Draw vector set (fast mode) More... | |
void | GV_alldraw_fastvect (void) |
Draw all loaded vector sets (fast mode) More... | |
int | GV_Set_ClientData (int id, void *clientd) |
Set client data. More... | |
void * | GV_Get_ClientData (int id) |
Get client data. More... | |
OGSF library - loading and manipulating vector sets (higher level functions)
(C) 1999-2008, 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.
Definition in file gv2.c.
void GV_alldraw_fastvect | ( | void | ) |
void GV_alldraw_vect | ( | void | ) |
Draw all loaded vector sets.
Definition at line 506 of file gv2.c.
Referenced by Nviz_draw_all_vect().
int GV_delete_vector | ( | int | id | ) |
Delete vector set from list.
id | vector set id |
Definition at line 128 of file gv2.c.
References G_debug(), gv_delete_vect(), and GV_vect_exists().
void GV_draw_fastvect | ( | int | vid | ) |
Draw vector set (fast mode)
vid | vector set id |
Definition at line 524 of file gv2.c.
References g_vect::drape_surf_id, gs_get_surf(), gv_get_vect(), gvd_vect(), and g_vect::n_surfs.
void GV_draw_vect | ( | int | vid | ) |
Draw vector set.
vid | vector set id |
Definition at line 482 of file gv2.c.
References g_vect::drape_surf_id, gs_get_surf(), gv_get_vect(), gvd_vect(), and g_vect::n_surfs.
void* GV_Get_ClientData | ( | int | id | ) |
Get client data.
id | vector set id |
Definition at line 590 of file gv2.c.
References g_vect::clientdata, gv_get_vect(), and NULL.
int GV_get_style | ( | int | id, |
int * | mem, | ||
int * | color, | ||
int * | width, | ||
int * | use_z | ||
) |
int GV_get_trans | ( | int | id, |
float * | xtrans, | ||
float * | ytrans, | ||
float * | ztrans | ||
) |
Get trans ?
id | vector set id | |
[out] | xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 366 of file gv2.c.
References gv_get_vect(), g_vect::x_trans, g_vect::y_trans, and g_vect::z_trans.
int* GV_get_vect_list | ( | int * | numvects | ) |
int GV_get_vectname | ( | int | id, |
char ** | filename | ||
) |
int GV_load_vector | ( | int | id, |
const char * | filename | ||
) |
Load vector set.
Check to see if handle already loaded, if so - free before loading new for now, always load to memory
id | vector set id |
filename | filename |
int GV_new_vector | ( | void | ) |
int GV_num_vects | ( | void | ) |
Get number of available vector sets.
Definition at line 83 of file gv2.c.
References gv_num_vects().
int GV_select_surf | ( | int | hv, |
int | hs | ||
) |
Select surface identified by hs to have vector identified by hv draped over it.
hv | vector set id |
hs | surface id |
Definition at line 393 of file gv2.c.
References g_vect::drape_surf_id, GS_surf_exists(), gv_get_vect(), GV_surf_is_selected(), and g_vect::n_surfs.
int GV_Set_ClientData | ( | int | id, |
void * | clientd | ||
) |
Set client data.
id | vector set id |
clientd | pointer to client data |
Definition at line 568 of file gv2.c.
References g_vect::clientdata, and gv_get_vect().
int GV_set_style | ( | int | id, |
int | mem, | ||
int | color, | ||
int | width, | ||
int | use_z | ||
) |
int GV_set_style_thematic | ( | int | id, |
int | layer, | ||
const char * | color, | ||
const char * | width, | ||
struct Colors * | color_rules | ||
) |
Set vector set style for thematic mapping.
Updates also style for each geoline.
id | vector set id |
layer | layer number for thematic mapping |
color | color column name |
width | width column name |
colors | pointer to Colors structure or NULL |
void GV_set_trans | ( | int | id, |
float | xtrans, | ||
float | ytrans, | ||
float | ztrans | ||
) |
Set trans ?
id | vector set id |
xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 343 of file gv2.c.
References G_debug(), gv_get_vect(), g_vect::x_trans, g_vect::y_trans, and g_vect::z_trans.
int GV_surf_is_selected | ( | int | hv, |
int | hs | ||
) |
Check if surface is selected.
hv | vector set id |
hs | surface id |
Definition at line 459 of file gv2.c.
References g_vect::drape_surf_id, gv_get_vect(), and g_vect::n_surfs.
Referenced by GV_select_surf(), and GV_unselect_surf().
int GV_unselect_surf | ( | int | hv, |
int | hs | ||
) |
Unselect surface.
hv | vector set id |
hs | surface id |
Definition at line 422 of file gv2.c.
References g_vect::drape_surf_id, gv_get_vect(), GV_surf_is_selected(), and g_vect::n_surfs.
int GV_unset_style_thematic | ( | int | id | ) |
Make style for thematic mapping inactive.
id | vector set id |
Definition at line 320 of file gv2.c.
References g_vect_style_thematic::active, G_debug(), gv_get_vect(), NULL, and g_vect::tstyle.
int GV_vect_exists | ( | int | id | ) |
Check if vector set exists.
id | vector set id |
Definition at line 35 of file gv2.c.
References G_debug(), gv_get_vect(), and NULL.
Referenced by GV_delete_vector().