NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

Changeset 21

Show
Ignore:
Timestamp:
03/29/07 14:12:15
Author:
jcleary
Message:

Production version on Maury

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Chameleon/trunk/Chameleon/TimeHandler/TimeHandler.widget.php

    r13 r21  
    126126            //get layers to alter 
    127127            $mouse_layer = $oMap->getLayerByName('Observation MouseOvers'); 
    128             $is_currents_layer = $oMap->getLayerByName('in_situ_currents'); 
    129128             
    130129            if ($szOffset != 2) 
     
    137136            $mouse_layer->set('minscale','10000000'); 
    138137             
    139             //if is_current are ON when the time is changed these will make sure they don't render 
    140             $is_currents_layer->set('minscale','10000000'); 
    141              
    142138            $codar_offset = $szOffset; 
    143139            } 
     
    148144            $mouse_layer->set('group','Observations'); 
    149145            $mouse_layer->SetMetaData('legendvis',''); 
    150              
    151             //return IS current layers to normal scale dependencies 
    152             $is_currents_layer->set('minscale','150000'); 
    153146             
    154147            $codar_offset = $szOffset + 2; 
     
    199192                    $oLayer->set('connection', $new_qs_connection); 
    200193                } 
    201                  
     194                 
     195                // for seacoos_test OBS layers 
    202196                if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '1') 
    203197                { 
     
    207201                } 
    208202                 
     203                // for codar layer - dif time stamp than regular obs 
    209204                if ($oLayer->connectiontype == MS_POSTGIS && $db_processing == '3') 
    210205                { 
     
    214209                } 
    215210                 
    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                } 
    221226                                 
    222227            } 
     
    388393            $szResult .="<tr><td colspan=\"2\"><hr></td></tr>\n"; 
    389394            $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"; 
    391396            $szResult .="<tr><td>AVHRR SST: </td><td>".$avhrr_timestamp."</td></tr>\n"; 
    392397            $szResult .="<tr><td>MODIS RGB/SST: </td><td>".$modis_timestamp."</td></tr>\n";