Add-site-hlx

From PTAGISWiki

Jump to: navigation, search

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


[rday@snapper ~]$ ssh pittag@blueback
pittag@blueback's password:
Last login: Tue Mar 14 09:41:09 2006 from grunt.psmfc.org
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002

 Welcome to Ingres installation TH!!

     II_SYSTEM = /usr/op_ing/ingII
     Running     II 2.6/0207 (su4.us5/06) 9109

blueback:TH:pittag: > bash
bash-2.05$ source ~rday/.bash_profile
[: too many arguments

 Welcome to Ingres installation TH!!

     II_SYSTEM = /usr/op_ing/ingII
     Running     II 2.6/0207 (su4.us5/06) 9109

blueback:TH:pittag: > TERM_INGRES=vt100fx; export TERM_INGRES
blueback:TH:pittag: > qbf -mappend ptagis3 location -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: Hemlock Dam Fish Ladder Exp.
	lat_decimal: 45.802100
	lon_decimal: -121.930166
	lat_lon_source: 
	lat_estimate: 45.802100
	lon_estimate: -121.930166
	est_lat_lon_source: 
	elevations_msl: 0
	y_coord: 178
	x_coord: 119
	lat_err: 0
	lon_err: 0
	est_piy: 0
	est_pix: 0
	y_err: 0
	x_err: 0
	modification_date: 3/17/06
	modification_comment: 
        userid: rday


location_in_segment
	site_id: HLX
	loc_id:  657 (from location table)
	seg_id:  246 (from river_segment table, if HUC is known (17070105), lookup on that)
	site_type: HYBRID  (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:
	km_in_reach: 2
	km_total: ?
	category: hybrid
	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: HLX
	site_id: HLX
	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: Hemlock Dam Fish Ladder Exp.
	from_km: 0
	to_km: 0
	from_date: 7/12/2004
	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