Exemplo n.º 1
0
        }
        echo "</select>\n\t\t\t<input type='submit' value='Describe Sensor'/>\n\t\t\t</form>";
    } else {
        echo $error;
    }
}
echo "</div>";
//
if (isset($_POST['descsensor'])) {
    // 2. DescribeSensor
    echo "<h2> The Details of Sensors in SOS </h2>";
    $procedure = $_POST['descsensor'];
    //echo $procedure."<br/>";
    // sample request
    //$dSensorURL = "http://localhost/istsos/service_name?service=SOS&request=describeSensor&procedure=hum_bs_1&responseFormat=text/xml;subtype='sensorML/1.0.0'&version=1.0.0";
    $dSensorURL = GetDescribeSenURL2($DescribeSenStr, $procedure, $RespFormat);
    session_start();
    $dSensorURL = $_SESSION['rawURL'] . $dSensorURL;
    $dSensorstring = "";
    //echo "URL Used / Accessed: ".$dSensorURL."</br>";
    $dSoutput = post_data($dSensorURL, $dSensorstring);
    //print_r($dSoutput);
    // a. Quantity
    $Quantity = array('Quantity', 'definition');
    $myQuantity = parse_describeSense($dSoutput, $Quantity);
    $myCleanQuantity = cleanQuantity($myQuantity);
    //print_r($myCleanQuantity);
    // b. co-ordinates
    $reference = array('Point', 'srsName', 'gml:id');
    $myCoOrd = getCoOrdinates($dSoutput, $reference);
    //echo "</br></br>";
 function ActualStEdTime($StoreRawURL, $DescribeSenStr, $myProcedure, $RespFormat)
 {
     $ArrayOfTime = array();
     for ($i = 0; $i < sizeof($myProcedure); $i++) {
         $dSensorURL = GetDescribeSenURL2($DescribeSenStr, $myProcedure[$i], $RespFormat);
         $dSensorURL = $StoreRawURL . $dSensorURL;
         $dSensorstring = "";
         //
         //echo "URL Used / Accessed: ".$dSensorURL."</br>";
         $dSoutput = post_data($dSensorURL, $dSensorstring);
         //print_r($dSoutput);
         // c. Sensing time Interval
         $reference = 'interval';
         $myInterval = getInterval($dSoutput, $reference);
         //echo "</br></br>";
         //print_r($myInterval);
         $SampleTbegin = $myInterval[0]['interval']['begin'];
         $SampleTend = $myInterval[0]['interval']['end'];
         $ArrayOfTime[$i][0] = $SampleTbegin;
         $ArrayOfTime[$i][1] = $SampleTend;
     }
     return $ArrayOfTime;
 }