GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
constraint.c File Reference

Vector library - constraints. More...

#include <grass/Vect.h>
#include <grass/gis.h>
Include dependency graph for constraint.c:

Go to the source code of this file.

Functions

int Vect_set_constraint_region (struct Map_info *Map, double n, double s, double e, double w, double t, double b)
 Set constraint region. More...
 
int Vect_get_constraint_box (struct Map_info *Map, BOUND_BOX *Box)
 Get constraint box. More...
 
int Vect_set_constraint_type (struct Map_info *Map, int type)
 Set constraint type. More...
 
int Vect_remove_constraints (struct Map_info *Map)
 Remove constraints. More...
 

Detailed Description

Vector library - constraints.

Higher level functions for reading/writing/manipulating vectors.

These routines can affect the read_next_line funtions by restricting what they return. They are applied on a per map basis.

These do not affect the lower level direct read functions.

Normally, All 'Alive' lines will be returned unless overridden by this function. You can specified all the types you are interested in (by oring their types together). You can use this to say exclude Area type lines.

By default all DEAD lines are ignored by the read_next_line () functions This too can be overridden by including their types.

Refer to dig_defines for the line type Defines

All lines can be forced to be read by setting type = -1

(C) 2001-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
Original author CERL, probably Dave Gerdes or Mike Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
Date
2001-2008

Definition in file constraint.c.

Function Documentation

int Vect_get_constraint_box ( struct Map_info *  Map,
BOUND_BOX *  Box 
)

Get constraint box.

Parameters
Mapvector map
Boxbounding box
Returns
0 on success

Definition at line 81 of file constraint.c.

Referenced by V1_read_next_line_nat(), V1_read_next_line_ogr(), and V2_read_next_line_nat().

int Vect_remove_constraints ( struct Map_info *  Map)

Remove constraints.

Parameters
Mapvector map
Returns
0 on success

Definition at line 116 of file constraint.c.

int Vect_set_constraint_region ( struct Map_info *  Map,
double  n,
double  s,
double  e,
double  w,
double  t,
double  b 
)

Set constraint region.

Parameters
Mapvector map
n,s,e,w,t,bnorth, south, east, west, top, bottom coordinates
Returns
0 on success
-1 on error

Definition at line 52 of file constraint.c.

References b, G_projection(), n, dialogs::s, and dialogs::w.

Referenced by Gp_load_sites(), and Gv_load_vect().

int Vect_set_constraint_type ( struct Map_info *  Map,
int  type 
)

Set constraint type.

Parameters
Mapvector map
typeconstraint type
Returns
0 on success

Definition at line 101 of file constraint.c.

References dialogs::type.