d.vect.pg(1)	       Grass User's Manual	     d.vect.pg(1)



NNAAMMEE
       _d_._v_e_c_t_._p_g - Display select vectors from an existing vector
       map. (GRASS-RDBMS Interface Display Program)

SSYYNNOOPPSSIISS
       dd..vveecctt..ppgg

       dd..vveecctt..ppgg hheellpp

       dd..vveecctt..ppgg [[--ff]]  kkeeyy=_n_a_m_e  ttaabb=_n_a_m_e  [wwhheerree=_n_a_m_e]  mmaapp=_n_a_m_e
       [ccoolloorr=_n_a_m_e]

AALLTTEERRNNAATTEE
       dd..vveecctt..ppgg --ss hheellpp

       dd..vveecctt..ppgg --ss ssqqll_=_f_i_l_e_n_a_m_e mmaapp_=_n_a_m_e [ccoolloorr_=_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _d_._v_e_c_t_._p_g  displays select vectors from an existing vector
       map based on the unique values in a database column.  Each
       row  returned by a user constructed database query will be
       associated with a vector  feature  which  is  subsequently
       drawn  on  the  graphics  display in the active frame. The
       user can control the color of the vector draw by  specify-
       ing a color on the command line.

CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS
   FFllaagg::
       --ff  Fill polygons selected on the query criteria


   PPaarraammeetteerrss::
       kkeeyy==ddaattaabbaasseeccoolluummnnnnaammee
	   Column  in  table  "tab"  of  the  currently  selected
	   database containing values corresponding to the vector
	   maps  category values. Table is designated on the com-
	   mand line by tab=tablename and vector is designated on
	   the command line by map=mapname.

       ttaabb==ddaattaabbaasseettaabblleennaammee
	   Table  in the currently selected database containing a
	   column which has values corresponding to vector  cate-
	   gory values in the map designated by map=map.

       wwhheerree==SSQQLLwwhheerreeccllaauussee
	   SQL	"where" clause which specifies the query criteria
	   to be used in subsetting the database. The field names
	   specified  in  the where option must indicate the col-
	   umn(s) to be used, the operators to	be  used  in  the
	   evaluation and the values which the data in the column
	   will be evaluated against.

       If the database column used as the selection criteria is a
       character  field  then the associated value must be placed
       in quotes. To determine the  data  types  associated  with
       columns	in the currently selected database use the _g_._c_o_l_-
       _u_m_n_._p_g command with the _-_v flag.

       Queries which are more complex are best implemented  using
       the _-_s flag and a prepared SQL file.

       mmaapp==mmaapp
	   Name  of  an  existing vector map with category values
	   which correspond to values in a  specified  column  in
	   the currently selected database.

       ccoolloorr==nnaammee
	   Color  to draw vectors in Colors: red, orange, yellow,
	   green, blue, indigo,  violet,  magenta,  brown,  gray,
	   white, black


AALLTTEERRNNAATTEE CCOOMMMMAANNDD LLIINNEE UUSSAAGGEE
       The  alternate  command line usage is provided to simplify
       the process of retrieving information from more	than  one
       table  in  the query criteria.  The alternate command line
       structure is selected using the the _[_-_s_] flag on the  com-
       mand  line. When using this flag the user must include the
       name of a text file on the command line as well. This file
       must  include a complete, well formed SQL SELECT statement
       specifying the query criteria  to  retrieve  values  which
       correspond to category values in a GRASS data layer.

   FFllaagg::
       --ss  SQL select statements are input from a prepared file

       --ff  Fill polygons selected on the query criteria


   PPaarraammeetteerrss::
       ssqqll==ffiilleennaammee
	   SQL statements specifying well formed selection crite-
	   ria.

       mmaapp==nnaammee
	   Name of an existing vector map

       ccoolloorr==nnaammee
	   Color to draw vectors in Colors: red, orange,  yellow,
	   green,  blue,  indigo,  violet,  magenta, brown, gray,
	   white, black



       EEXXAAMMPPLLEE::

       11.. _d_._v_e_c_t_._p_g _-_f _k_e_y_=_r_e_c___i_d  _m_a_p_=_k_u_r_u_m_a___i_d  _t_a_b_=_i_n_f_o___k_u_r_u_m_a
       _w_h_e_r_e_=_'_t_y_p_e___i_d _>_3_2 _a_n_d _t_y_p_e___i_d _< _3_8_'  _c_o_l_o_r_=_r_e_d



       RReessuulltt::	only  polygons	with type in 33-37 range would be
       displayed in red color..

       22.. _d_._v_e_c_t_._p_g _-_f _-_s _s_q_l_=_o_a_k_._s_q_l _m_a_p_=_k_u_r_u_m_a___i_d

       oak.sql is:

       _s_e_l_e_c_t _r_e_c___i_d _f_r_o_m _i_n_f_o___k_u_r_u_m_a  _w_h_e_r_e  _t_y_p_e___i_d  _>  _3_2  _a_n_d
       _t_y_p_e___i_d _<_3_8_;

       RReessuulltt:: this would be the same as in the first example.

BBUUGGSS
       none

NNOOTTEE
       This program requires the Postgres database software.

SSEEEE AALLSSOO
       _g_._s_e_l_e_c_t_._p_g_, _g_._s_t_a_t_s_._p_g_, _g_._t_a_b_l_e_._p_g_, _d_._r_a_s_t_._p_g_, _d_._s_i_t_e_._p_g_,
       _d_._w_h_a_t_._r_._p_g_,   _d_._w_h_a_t_._s_._p_g_,   _d_._w_h_a_t_._v_._p_g_,   _r_._r_e_c_l_a_s_s_._p_g_,
       _r_._r_e_s_c_a_l_e_._p_g_, _v_._r_e_c_l_a_s_s_._p_g

AAUUTTHHOORR
       Original  Informix  SQL-tools: James A. Farley, Wang Song,
       and W. Fredrick Limp University of Arkansas, CAST

       Postgres  modifications:  Janne	 Soimasuo,   Faculty   of
       Forestry, University of Joensuu, Finland.

       Updated to GRASS 5 by Alex Shevlakov (sixote@yahoo.com)



GRASS 5.0					     d.vect.pg(1)
