GRASS GIS 8 Programmer's Manual
8.4.0dev(2023)8fd28c4126

OGSF library . More...
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/ogsf.h>
#include "rowcol.h"
Go to the source code of this file.
Macros  
#define  TFAST_PTS 800 
target number of desired points to represent entire file More...  
#define  MFAST_LNS 400 
max number of lines desired More...  
Functions  
float  gv_line_length (geoline *gln) 
Get line width. More...  
int  gln_num_points (geoline *gln) 
Get number of line vertices. More...  
int  gv_num_points (geovect *gv) 
Get number of points in vector. More...  
int  gv_decimate_lines (geovect *gv) 
Decimate line. More...  
OGSF library .
GRASS OpenGL gsurf OGSF Library
Trying some stuff to draw a quick version of a vector map, to represent it when doing interactive translations.
(C) 19992008 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 gv_quick.c.
#define MFAST_LNS 400 
max number of lines desired
Definition at line 38 of file gv_quick.c.
#define TFAST_PTS 800 
target number of desired points to represent entire file
Definition at line 33 of file gv_quick.c.
int gln_num_points  (  geoline *  gln  ) 
Get number of line vertices.
gln  line (geoline) 
Definition at line 197 of file gv_quick.c.
References g_line::next, and g_line::npts.
Referenced by gv_num_points().
int gv_decimate_lines  (  geovect *  gv  ) 
Decimate line.
strategy here: if line has more than average number of points, decimate by eliminating points, otherwise decimate by eliminating shorter lines
gv  vector (geovect) 
Definition at line 231 of file gv_quick.c.
References g_vect::fastlines, gv_num_points(), g_vect::lines, MFAST_LNS, g_vect::n_lines, g_line::next, g_line::npts, NULL, and TFAST_PTS.
float gv_line_length  (  geoline *  gln  ) 
Get line width.
gln  line (geoline) 
Definition at line 173 of file gv_quick.c.
References GS_distance(), GS_P2distance(), g_line::npts, g_line::p2, and g_line::p3.
int gv_num_points  (  geovect *  gv  ) 
Get number of points in vector.
gv  vector (geovect) 
Definition at line 216 of file gv_quick.c.
References gln_num_points(), and g_vect::lines.
Referenced by gv_decimate_lines().