Add-site-rrf

From PTAGISWiki

Jump to: navigation, search

Procedure for adding a new site to the ALRS database 3/2/06


[rday@snapper rday]$ rsh blueback
Last login: Tue Mar  1 14:00:48 from snapper.psmfc.or
bash-2.03$ su - pittag
Password:
sockeye:ptagdev > TERM_INGRES=vt100fx; export TERM_INGRES;

sockeye:ptagdev > qbf -mappend ptagis3 <table> -s

CHECK THE LEGACY DATA.

http://www.psmfc.org/pittag/Software_and_Documentation/cur_site_config.html
http://www.psmfc.org/pittag/Software_and_Documentation/hist_site_config.html

This will be a new location since there are no other activities at this
location.
Coordinates are in blueback:/home/pittag/doc/Misc Stuff/Site Coordinates.xls

Here are the tables and fields I needed to populate:

location
	loc_id:   [ 0 makes a new ID ]
	location_name: Rocky Reach Fishway
	lat_decimal: 47.533192 
	lon_decimal: -120.295583
	lat_lon_source: 
	lat_estimate: 47.458
	lon_estimate: -120.297
	est_lat_lon_source: 
	elevations_msl: 0
	y_coord: 88
	x_coord: 179
	lat_err: 0
	lon_err: 0
	est_piy: 0
	est_pix: 0
	y_err: 0
	x_err: 0
	modification_date: 3/2/06
	modification_comment: 
        userid: rday


location_in_segment
	site_id: RRF
	loc_id:  653 (from location table)
	seg_id:  59 (from river_segment table)
	site_type: DAM  (Adult fish facility, dam, fish hatchery, highway
	bridge, diversion screens, fish trap, hybrid, island, riverbed, juvenile bypass)
	site_description: Constructed environment
	locality_radius: 100
	general_locality_site: RRE
	km_in_reach: 763
	km_total: 763
	category: adult
	rkm_fixed_site_y_n: Y (A fixed location, such as a dam, bridge or trap, or
	a temporary release site in a river or stream?)
	fixed_site_y_n: Y
	marking_only_y_n: N
	entire_river_y_n: N
	release_act_suffix_y_n: N
	archaic_y_n: N

activity_location
	site_code: RRF
	site_id: RRF
	activity_category: REMOTE (remote or hands-on)
	activity_code: INTERROGATION (tagging, release, recapture)
	activity_suffix: NON (con or non continuous flow)
	contact_id: -1
	activity_loc_description: Rocky Reach Fishway
	from_km: 0
	to_km: 0
	from_date: 3/6/2006
	to_date:


After the database has been properly modified, the XML can be generated that will drive the flash map.

ssh sockeye

cd /home/ptagdev/ptagis3/source/sitexml/source

sockeye:SG:rday: > ls
CVS                 create_site_xml.pl  juvenile.xml        ryan                sit.tar
adult.xml           gps2pixel.pl        known_good          separation.xml      tagging.xml
sockeye:SG:rday: > ./create_site_xml.pl
Use of $* is deprecated at /home/pittag/bin/UTIL/HashAssemblage.pm line 359, <DEF> line 92.
connect to DB ...
 via -> dbi:Ingres:blueback::ptagis3;-uwebjsp
Creating tagging.xml...
-----------------
Creating juvenile.xml...
-----------------
Creating adult.xml...
-----------------
Creating separation.xml...
-----------------
sockeye:SG:rday: > cvs -nq up
M adult.xml
M juvenile.xml
? sit.tar
sockeye:SG:rday: > rm sit.tar
sockeye:SG:rday: > tar cvf sit.tar *xml
a adult.xml 8K
a juvenile.xml 9K
a separation.xml 2K
a tagging.xml 136K
sockeye:SG:rday: > scp sit.tar reedi:/home/rday
Enter passphrase for key '/home/rday/.ssh/id_rsa':
sit.tar              100% |****************************************************************|   157 KB    00:00
Personal tools