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



NNAAMMEE
       _d_._w_h_a_t_._s_._p_g - Report database attributes associated with a
       specific point location. (GRASS-RDBMS Attribute	Interface
       Program)

SSYYNNOOPPSSIISS
       dd..wwhhaatt..ss..ppgg

       dd..wwhhaatt..ss..ppgg hheellpp

       dd..wwhhaatt..ss..ppgg   ttaabb=name  xxccooll=name  yyccooll=name  [xxppooss=value]
       [yyppooss=value] ddiissttaannccee=value [hhvv=name]

AALLTTEERRNNAATTEE
       dd..wwhhaatt..ss..ppgg --ss hheellpp

       dd..wwhhaatt..ss..ppgg [[--ss]] [ssqqll=file] ddiissttaannccee=value [hhvv=name]

DDEESSCCRRIIPPTTIIOONN
       _d_._w_h_a_t_._s_._p_g reports database attributes in  the	currently
       selected  database  which  are  associated with a specific
       point location. The current database is identified by  the
       GRASS  environment  variable  $PG_DBASE which is set using
       the _g_._s_e_l_e_c_t_._p_g GRASS-RDBMS interface tool.  The  location
       to  query  is  selected	by  the  user with the mouse. The
       radius around this point to search  is  specified  by  the
       distance  argument.  Sites  are	selected by comparing the
       values in the database columns containing X and Y  coordi-
       nate data against the coordinate data at the current mouse
       location.The columns in the table containing  the  coordi-
       nate  values  are  returned in the report.  If information
       from more than one table is required use the _-_s	flag  and
       the  alternate  command	line format (see below). The user
       can also provide the center of the search  point  and  the
       distance  around it to find sites within the circle around
       the search center non-interactively.

CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS
   PPaarraammeetteerrss::
       ttaabb==ddaattaabbaasseettaabblleennaammee
	   Table containing X, Y coordinate values

       xxccooll==ddaattaabbaasseeccoolluummnnnnaammee
	   Column containing the X coordinate (E/W) value.

       yyccooll==ddaattaabbaasseeccoolluummnnnnaammee
	   Column containing the Y coordinate (N/S) value.

       ddiissttaannccee==vvaalluuee
	   Radius distance from the  current  mouse  location  to
	   conduct database search.

	   xxppooss==vvaalluuee X coord. (E/W) of search.

	   yyppooss==vvaalluuee Y coord. (N/S) of search.

	   hhvv==nnaammee  (h)Horizontal/(v)vertical  output (default is
	   v)


AALLTTEERRNNAATTEE CCOOMMMMAANNDD LLIINNEE UUSSAAGGEE
       The alternate command line structure is selected using the
       the  _[_-_s_]  flag	on the command line. When using this flag
       the user must include the name of a text file on the  com-
       mand line as well. This file must include a complete, well
       formed SQL SELECT statement specifying the query criteria.

       The  user  must	also  specify  the name of the GRASS data
       layer containing these  category  values  on  the  command
       line.  The  following example illustrates the syntax which
       must be used in constructing a SELECT  statement  for  use
       with the _-_s flag.

       EEXXAAMMPPLLEE 11.. (single table)

       _d_._w_h_a_t_._s_._p_g _-_s _s_q_l_=_i_z_b_._s_q_l _d_i_s_t_a_n_c_e_=_1_0_0

       here _i_z_b_._s_q_l:

       SELECT * from izb where point(xcoor,ycoor)

       EEXXAAMMPPLLEE 22.. (two tables)

       _d_._w_h_a_t_._s_._p_g _-_s _s_q_l_=_i_z_b_2_._s_q_l _d_i_s_t_a_n_c_e_=_1_0_0

       here _i_z_b_2_._s_q_l:

       SELECT	 *,    huts_info.description   from   izb   where
       huts_info.num=num and point(xcoor,ycoor)

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


   PPaarraammeetteerrss::
       ssqqll==ffiilleennaammee
	   SQL statements specifying well formed selection crite-
	   ria. These criteria must include  the  database  table
	   name,  the  Xcol  and Ycol names as well as the search
	   distance. Additional criteria may  be  placed  in  the
	   "where"  clause to further subset information returned
	   from the database.



       ddiissttaannccee==vvaalluuee
	   Radius distance from the  current  mouse  location  to
	   conduct database search.



       hhvv==nnaammee (h)Horizontal/(v)vertical output (default is v)


BBUUGGSS
       None known.

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_._v_e_c_t_._p_g_,   _d_._w_h_a_t_._r_._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.what.s.pg(1)
