Laserfiche WebLink
<br />Selecting a gauge <br />from the map display <br /> <br />Selecting a gauge <br />from the tabular list <br /> <br />Data retrieval for the <br />selected gauge(s) <br /> <br />Data display <br /> <br />The process of selecting a gauge is different depending on whether the user selects <br />from the graphical map display or the tabular list. <br /> <br />If the user clicks on the graphical map display while the Query/Gauged Data dialog <br />is open, the action activates the callback FindAndAddStreamGage- <br />FrornMap ( ) . This function transforms the window coordinates ofthe user's mouse <br />click to correspond to the coordinates of the ArclInfo map containing the gauges <br />(meters in UTM projection). The function also determines a distance in this coordi- <br />nate system within which the presence of more than one gauge indicates an ambig- <br />uous mouse dick (ambiguous_distance). At the time of writing, this distance <br />is one hundredth the width of the area displayed in the map window. If a user clicks <br />on the map and more than one gauge is present within ambiguous_dis tance, <br />the mouse click is considered ambiguous. and an alternative method of selecting <br />gauges is provided to the user. <br /> <br />The coordinates of the mouse click and ambiguous_distance are passed to the <br />function FindClosestStreamgage ( ), which searches the global linked list of <br />all stream gauges accessed via the global variable s treamgage_l is t_head <br />for all gauges within ambiguous_distance. If more than one gauge is found <br />within this distance, a dialog is realized which allows the user to choose among those <br />found. If one or fewer gauges are found within this distance, the gauge closest to the <br />mouse click is selected. FindCloses tStrearngage ( ) sets the passed pointer <br />to a streamgage_cell * to the selected gauge. FindAndAddStrearnGage- <br />FrornMap () places the name of the gauge directly in the Query/Gauged Data <br />dialog. <br /> <br />If the user selects a gauge from the tabular list, the corresponding gauge is found by <br />name, rather than by location. Clicking on the list while the Query/Gauged Data <br />dialog is open, activates the callback FindAndAddStreamGageFromList (). <br />This function passes the name from the list to FindClosestStrearngage- <br />Name ( ) , which searches the global linked list of all stream gauges for the gauge <br />with the same water district, ID, and name. FindClosestStrearngage- <br />Name () modifies the pointer passed to it and returns, then F indAn- <br />dAddStreamGageFromList () places the name of this gauge in the Query/ <br />Gauged Data dialog. <br /> <br />Data is retrieved for the selected gauge by a call to one of the following DM! func- <br />tions: <br /> <br />PLOT_DATA_PACKAGE *GetRealTimeStreamflow(char*station, <br />char*frorn_tirne,char*to_tirne) , <br /> <br />PLOT_DATA_PACKAGE *GetHourlyStreamflow(char*station, <br />char*from_tirne,char*to_time), <br /> <br />PLOT_DATA_PACKAGE *GetDailyStrearnflow(char'station, <br />char* from_time , char*to_time). <br /> <br />These functions are described in the "Hydrograph Data Retrieval" section on page <br />25. <br /> <br />Gauge data can be displayed as a graph or in a table. The tabular list is simply a <br />formatted display of the data realized as Label widgets in a Scrolled Window widget. <br /> <br />18 <br />