25static int Next_site = 0;
39 G_debug(4,
"GP_site_exists(%d)",
id);
45 for (i = 0; i < Next_site && !
found; i++) {
46 if (Site_ID[i] ==
id) {
112 for (i = 0; i < Next_site; i++) {
134 G_debug(4,
"GP_delete_site(%d)",
id);
139 for (i = 0; i < Next_site && !
found; i++) {
140 if (Site_ID[i] ==
id) {
142 for (
j = i;
j < Next_site;
j++) {
143 Site_ID[
j] = Site_ID[
j + 1];
175 G_debug(3,
"GP_load_site(id=%d, name=%s)",
id, filename);
211 G_debug(4,
"GP_get_sitename(%d)",
id);
234int GP_get_style(
int id,
int *color,
int *width,
float *size,
int *symbol)
238 G_debug(4,
"GP_get_style(%d)",
id);
244 *color =
gp->style->color;
245 *width =
gp->style->width;
246 *symbol =
gp->style->symbol;
247 *size =
gp->style->size;
280 G_debug(4,
"GP_set_style(id=%d, color=%d, width=%d, size=%f, symbol=%d)",
281 id, color, width, size, symbol);
287 gp->style->color = color;
288 gp->style->symbol = symbol;
289 gp->style->size = size;
290 gp->style->width = width;
312 const char *width,
const char *size,
318 "GP_set_style_thematic(id=%d, layer=%d, color=%s, width=%s, "
319 "size=%s, symbol=%s)",
320 id, layer, color, width, size, symbol);
330 gp->tstyle->active = 1;
331 gp->tstyle->layer = layer;
333 gp->tstyle->color_column =
G_store(color);
335 gp->tstyle->symbol_column =
G_store(symbol);
339 gp->tstyle->width_column =
G_store(width);
358 G_debug(4,
"GP_unset_style_thematic(): id=%d",
id);
365 gp->tstyle->active = 0;
386 G_debug(3,
"GP_set_zmode(%d,%d)",
id, use_z);
420 G_debug(4,
"GP_get_zmode(%d)",
id);
499 gp->drape_surf_id[
gp->n_surfs] =
hs;
530 for (i = 0; i <
gp->n_surfs; i++) {
531 if (
gp->drape_surf_id[i] ==
hs) {
532 for (
j = i;
j <
gp->n_surfs - 1;
j++) {
533 gp->drape_surf_id[
j] =
gp->drape_surf_id[
j + 1];
564 for (i = 0; i <
gp->n_surfs; i++) {
565 if (
hs ==
gp->drape_surf_id[i]) {
591 if (
gp->use_z &&
gp->has_z) {
595 for (i = 0; i <
gp->n_surfs; i++) {
600 G_debug(5,
"Drawing site %d on Surf %d",
id,
601 gp->drape_surf_id[i]);
617 for (
id = 0;
id < Next_site;
id++) {
661 return (
gp->clientdata);
690 if (
strcmp(str,
"x") == 0)
692 else if (
strcmp(str,
"box") == 0)
694 else if (
strcmp(str,
"sphere") == 0)
696 else if (
strcmp(str,
"cube") == 0)
698 else if (
strcmp(str,
"diamond") == 0)
700 else if (
strcmp(str,
"dec_tree") == 0)
702 else if (
strcmp(str,
"con_tree") == 0)
704 else if (
strcmp(str,
"aster") == 0)
706 else if (
strcmp(str,
"gyro") == 0)
708 else if (
strcmp(str,
"histogram") == 0)
711 G_warning(
_(
"Unknown icon marker, using \"sphere\""));
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void G_warning(const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
int GS_get_region(float *, float *, float *, float *)
Get 2D region extent.
int gpd_3dsite(geosite *, float, float, int)
Draw 3D point set.
geosurf * gs_get_surf(int)
Get geosurf struct.
int gp_set_defaults(geosite *)
Set default value for geosite struct.
geopoint * Gp_load_sites(const char *, int *, int *)
Load to points to memory.
void gp_free_sitemem(geosite *)
Free geosite (lower level)
geosite * gp_get_new_site(void)
Create new geosite instance and add it to list.
int gpd_2dsite(geosite *, geosurf *, int)
Draw 2D point set.
int gp_num_sites(void)
Get number of loaded point sets.
void gp_delete_site(int)
Delete point set and remove from list.
geosite * gp_get_site(int)
Get geosite struct.
int Gp_load_sites_thematic(geosite *, struct Colors *)
Load styles for geopoints based on thematic mapping.
int GP_select_surf(int hp, int hs)
Select surface for given point set.
int GP_delete_site(int id)
Delete registered point set.
int GP_new_site(void)
Create new point set.
void GP_get_trans(int id, float *xtrans, float *ytrans, float *ztrans)
Get transformation params.
int GP_get_zmode(int id, int *use_z)
Get z-mode.
int GP_get_sitename(int id, char **filename)
Get point set filename.
int GP_set_zmode(int id, int use_z)
Set z mode for point set.
int GP_load_site(int id, const char *filename)
Load point set from file.
void GP_set_trans(int id, float xtrans, float ytrans, float ztrans)
Set transformation params.
int GP_Set_ClientData(int id, void *clientd)
Set client data.
int GP_site_exists(int id)
Check if point set exists.
int GP_str_to_marker(const char *str)
Determine point marker symbol for string.
int GP_get_style(int id, int *color, int *width, float *size, int *symbol)
Get point set style.
int GP_surf_is_selected(int hp, int hs)
Check if surface is selected.
int * GP_get_site_list(int *numsites)
Get list of point sets.
int GP_num_sites(void)
Get number of loaded point sets.
void GP_draw_site(int id)
Draw point set.
void * GP_Get_ClientData(int id)
Get client data.
void GP_alldraw_site(void)
Draw all available point sets.
int GP_unselect_surf(int hp, int hs)
Unselect surface.
int GP_set_style_thematic(int id, int layer, const char *color, const char *width, const char *size, const char *symbol, struct Colors *color_rules)
Set point set style for thematic mapping.
int GP_set_style(int id, int color, int width, float size, int symbol)
Set point style.
int GP_unset_style_thematic(int id)
Make style for thematic mapping inactive.
OGSF header file (structures)
Struct for vector map (thematic mapping)