Changeset 21
- Timestamp:
- 03/29/07 14:12:15
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Chameleon/trunk/Chameleon/TimeHandler/TimeHandler.widget.php
r13 r21 126 126 //get layers to alter 127 127 $mouse_layer = $oMap->getLayerByName('Observation MouseOvers'); 128 $is_currents_layer = $oMap->getLayerByName('in_situ_currents');129 128 130 129 if ($szOffset != 2) … … 137 136 $mouse_layer->set('minscale','10000000'); 138 137 139 //if is_current are ON when the time is changed these will make sure they don't render140 $is_currents_layer->set('minscale','10000000');141 142 138 $codar_offset = $szOffset; 143 139 } … … 148 144 $mouse_layer->set('group','Observations'); 149 145 $mouse_layer->SetMetaData('legendvis',''); 150 151 //return IS current layers to normal scale dependencies152 $is_currents_layer->set('minscale','150000');153 146 154 147 $codar_offset = $szOffset + 2; … … 199 192 $oLayer->set('connection', $new_qs_connection); 200 193 } 201 194 195 // for seacoos_test OBS layers 202 196 if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '1') 203 197 { … … 207 201 } 208 202 203 // for codar layer - dif time stamp than regular obs 209 204 if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '3') 210 205 { … … 214 209 } 215 210 216 // if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '2') 217 // { 218 // $request_time_db = date('Y-m-d H\:i', $request_time); 219 // $oLayer->setFilter('((select count(*) from current_prod where (report_time_stamp = date_trunc(\'hour\',timestamp without time zone \''.$request_time_db.'\'))) < 1)'); 220 // } 211 // for IS surface currents - codar TS 212 if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '2') 213 { 214 $cur_request_time = date('Y-m-d H\:i', $codar_request_time); 215 $oLayer->setFilter('(report_time_stamp = date_trunc(\'hour\',timestamp without time zone \''.$cur_request_time.'\')) and (surface_or_bottom = \'surface\')'); 216 } 217 218 //for ADCP currents from Xenia - codar TS 219 if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '4') 220 { 221 //timestamp format is 2006-01-19 16:00 222 $cur_request_time = date('Y-m-d H\:i', $codar_request_time); 223 //$oLayer->setFilter('m_type_id = 41 and (sensor_id IN (select row_id from sensor where type_id = 4 )) and (d_report_hour = (timestamp without time zone \''.$cur_request_time.'\')) and (d_top_of_hour = 1)'); 224 $oLayer->setFilter('m_type_id = 41 and (sensor_id IN (select row_id from sensor where type_id =\'4\')) and (m_date > (timestamp without time zone \''.$cur_request_time.'\' - interval \'30 minutes\' )) and (m_date < (timestamp without time zone \''.$cur_request_time.'\' + interval \'31 minutes\'))'); 225 } 221 226 222 227 } … … 388 393 $szResult .="<tr><td colspan=\"2\"><hr></td></tr>\n"; 389 394 $szResult .="<tr><td>QuikSCAT winds: </td><td>".$quikscat_time."</td></tr>\n"; 390 $szResult .="<tr><td>Surface Currents (CODAR): </td><td>".$codar_time."</td></tr>\n";395 $szResult .="<tr><td>Surface Currents: </td><td>".$codar_time."</td></tr>\n"; 391 396 $szResult .="<tr><td>AVHRR SST: </td><td>".$avhrr_timestamp."</td></tr>\n"; 392 397 $szResult .="<tr><td>MODIS RGB/SST: </td><td>".$modis_timestamp."</td></tr>\n";