In the main View of HydroGIS, select the STASKAT stations theme.
Open the attributes table of this theme (Theme Table).
In Tables, go into the table properties and remove the check marks so that
only the following are selected:
BEGIN{FS=",";OFS=",";First=1;OFMT="%.8g";} { if ( First == 1 ) { First = 0; } else { lon = (substr($4,1,2)*1)+(substr($4,3,2)/60)+(substr($4,5,2)/3600) lat = -1*((substr($5,1,2)*1)+(substr($5,3,2)/60)+(substr($5,5,2)/3600)) line = $1","$7" "$8" "$2" "$3","$9" "$10","lon","lat","$6","$11; a = gsub( " *,", ",", line ); a = gsub( " ", " ", line ); print line; } } # Example of input data: # --------------------- #"Station/Gauging Point Number","Most Recent Description 1","Most Recent Description 2","Longitude","Latitude","Drainage Region","Measurements In/At 1","Measurements In/At 2","Place Name","Common Name","Province" #A1H001,GAUGING WEIR,,255114,252721,A10,UPPER EYE DINOKANA,,DINOKANA,AT PUMP STATION,NW
Use this awk file as follows (assuming that the file is named staskat.awk):
awk -f staskat.awk staskat.txt > staskat.all
Select the water quality stations
STASKAT stores the data for all stations, including quality monitoring, flow gauging and
evaporation measurements. Use the grep command to write only the water quality stations to
a file:
grep QUALITY staskat.all | sort > staskat.dat