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

OGSF library -. More...

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <grass/gis.h>`
`#include <grass/ogsf.h>`
`#include "rowcol.h"`
Include dependency graph for gv_quick.c:

Go to the source code of this file.

## Macros

#define | TFAST_PTS 800
| target number of desired points to represent entire file
#define | MFAST_LNS 400
| max number of lines desired

## Functions

float | gv_line_length (geoline *gln)
| Get line width.
int | gln_num_points (geoline *gln)
| Get number of line vertices.
int | gv_num_points (geovect *gv)
| Get number of points in vector.
int | gv_decimate_lines (geovect *gv)
| Decimate line.

## Detailed Description

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) 1999-2008 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 (December 1993)
  Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gv_quick.c.

## Macro Definition Documentation

## MFAST_LNS

#define MFAST_LNS 400

max number of lines desired

Definition at line 38 of file gv_quick.c.

Referenced by gv_decimate_lines().

## TFAST_PTS

#define TFAST_PTS 800

target number of desired points to represent entire file

Definition at line 33 of file gv_quick.c.

Referenced by gv_decimate_lines().

## Function Documentation

## gln_num_points()

int gln_num_points | ( | geoline * | gln | ) |

Get number of line vertices.

Parameters

  gln | line (geoline)

Returns
  number of vertices

Definition at line 197 of file gv_quick.c.

Referenced by gv_decimate_lines(), and gv_num_points().

## gv_decimate_lines()

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

Parameters

  gv | vector (geovect)

Returns

Definition at line 231 of file gv_quick.c.

References G_debug(), gln_num_points(), gv_line_length(), gv_num_points(), MFAST_LNS, NULL, and TFAST_PTS.

Referenced by gvd_vect().

## gv_line_length()

float gv_line_length | ( | geoline * | gln | ) |

Get line width.

Parameters

  gln | line (geoline)

Returns
  line width

Definition at line 173 of file gv_quick.c.

References GS_distance(), and GS_P2distance().

Referenced by gv_decimate_lines().

## gv_num_points()

int gv_num_points | ( | geovect * | gv | ) |

Get number of points in vector.

Parameters

  gv | vector (geovect)

Returns
  number of points

Definition at line 216 of file gv_quick.c.

References gln_num_points().

Referenced by gv_decimate_lines().