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

OGSF library - loading point sets (lower level functions). More...

`#include <stdlib.h>`
`#include <grass/gis.h>`
`#include <grass/colors.h>`
`#include <grass/raster.h>`
`#include <grass/vector.h>`
`#include <grass/dbmi.h>`
`#include <grass/glocale.h>`
`#include <grass/ogsf.h>`
Include dependency graph for gp3.c:

Go to the source code of this file.

## Functions

geopoint * | Gp_load_sites (const char *name, int *nsites, int *has_z)
| Load to points to memory.
int | Gp_load_sites_thematic (geosite *gp, struct Colors *colors)
| Load styles for geopoints based on thematic mapping.

## Detailed Description

OGSF library - loading point sets (lower level functions).

GRASS OpenGL gsurf OGSF Library

(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.

Author
  Bill Brown USACERL, GMSL/University of Illinois (January 1994)
  Updated by Martin Landa <landa.martin gmail.com> (doxygenized in May 2008, thematic mapping in June 2011)

Definition in file gp3.c.

## Function Documentation

## Gp_load_sites()

geopoint * Gp_load_sites | ( | const char * | name,
|  | int * | nsites,
|  | int * | has_z )

Load to points to memory.

The other alternative may be to load to a tmp file.

Parameters

  | name | name of vector map to be loaded
  [out] | nsites | number of loaded points
  [out] | has_z | 2D or 3D points data loaded?

Returns
  pointer to geopoint struct (array)
  NULL on failure

Definition at line 45 of file gp3.c.

References G_debug(), G_fatal_error(), G_find_vector2(), G_free(), G_fully_qualified_name(), G_get_set_window(), G_message(), G_warning(), G_zero(), name, NULL, X, and Y.

Referenced by GP_load_site().

## Gp_load_sites_thematic()

int Gp_load_sites_thematic | ( | geosite * | gp,
|  | struct Colors * | colors )

Load styles for geopoints based on thematic mapping.

Parameters

  gp | pointer to geosite structure
  colors | pointer to Colors structure or NULL

Returns
  number of points defined by thematic mapping
  -1 on error

Definition at line 181 of file gp3.c.

References BLU_MASK, G_fatal_error(), G_find_vector2(), G_free(), G_fully_qualified_name(), G_message(), G_str_to_color(), G_warning(), G_zero(), GP_str_to_marker(), GRN_MASK, NULL, and RED_MASK.

Referenced by GP_set_style_thematic().