Ejemplo n.º 1
0
 $procedure = array('procedure', 'xlink:href');
 $myProcedure = getOffering($output, $procedure);
 // get procedure as one array
 $myProcedure = getCleanProc($myProcedure);
 //$myProcHtml = getHTMLProc($myProcedure, $procedure);
 //print_r($myProcedure);
 // d. observedProperty
 $observedProperty = array('observedProperty', 'xlink:href');
 $myObservedProperty = getOffering($output, $observedProperty);
 $myObservedProperty = CleanOffering($myObservedProperty, $observedProperty);
 $myObservedProperty = getOnlyOffering($myObservedProperty);
 //$myHTMLobsProp = getHTMLProc($myObservedProperty, $observedProperty);
 //echo "</br></br>";
 // e. featureOfInterest
 $featureOfInterest = array('featureOfInterest', 'xlink:href');
 $myFeatureOfInterest = getOffering($output, $featureOfInterest);
 $myFeatureOfInterest = CleanOffering($myFeatureOfInterest, $featureOfInterest);
 $myFeatureOfInterest = getOnlyFOI($myFeatureOfInterest);
 //$myFOIhtml = getHTMLProc($myFeatureOfInterest, $featureOfInterest);
 //print_r($myFOIhtml);
 //*****************
 // Note: Careful Hardcoaded Section
 $mySplitObsProp = SplitObsProp($myObservedProperty);
 // 2 dimensional array
 $mySplitObsProp = realignSensors($mySplitObsProp);
 // realign the array elements returns 2D array
 $rawObsProp = $mySplitObsProp[0];
 $realObsProp = $mySplitObsProp[1];
 // select procedure
 // select observed property
 //
Ejemplo n.º 2
0
    $myCapURL = GetCapURL($_POST['userurl'], $CapString);
    session_start();
    $_SESSION['rawURL'] = $_POST['userurl'];
    $_SESSION['myCapURL'] = $myCapURL;
    //to store URL as an session variable
    //1. GetCapabilities
    $getCstring = '';
    //
    echo "<h2> The Details of Sensors in SOS </h2>";
    // use post_data function to post xml string and catch response
    $output = post_data($myCapURL, $getCstring);
    if ($output) {
        //print_r($output);
        // c. procedure
        $procedure = array('procedure', 'xlink:href');
        $myProcedure = getOffering($output, $procedure);
        // get procedure as one array
        $myProcedure = getCleanProc($myProcedure);
        //$myProcHtml = getHTMLProc($myProcedure, $procedure);
        echo "<p> Select Procedure </p>";
        //print_r($myProcedure);
        echo "<form method='post' action='" . $phpSelf . "'>\n\t\t\t<select name='descsensor' >";
        for ($i = 0; $i < sizeof($myProcedure); $i++) {
            echo "<option value='" . $myProcedure[$i] . "' >" . $myProcedure[$i] . "</option>";
        }
        echo "</select>\n\t\t\t<input type='submit' value='Describe Sensor'/>\n\t\t\t</form>";
    } else {
        echo $error;
    }
}
echo "</div>";