==========================
 OIE_SOS_TIME_RANGE_OBS.CGI
==========================

The purpose is to create a simple client which retrieves and displays a sea water temperature observation from a time range from the GoMOOS SOS server which was based on the OOSTethsys.org Perl Database Cookbook.

It makes use of 5 standard Perl Modules and runs as a CGI script under Apache2 and mod_perl.

  1. LWP::UserAgent http://search.cpan.org/~gaas/libwww-perl-5.800/lib/LWP.pm
  2. HTTP::Request::Common http://search.cpan.org/~gaas/libwww-perl-5.808/lib/HTTP/Request.pm
  3. XML::LibXML http://search.cpan.org/dist/XML-LibXML/
  4. CGI http://search.cpan.org/dist/CGI.pm/
  5. DateTime http://search.cpan.org/~drolsky/DateTime-0.40/lib/DateTime.pm

Defaults are used for the GetCapabilities URL and for the 'A01' offering and 'sea_water_temperature' observedProperty.

Each time it runs a GetCapabilities request is made to determine the start and end time for which observations are available. The start and end times are utilized to put a time filter display allowing the user to pick a time and to display the sea_water_temperature observed at that time.

Both the GetCapabilities request and the GetObservation request utilize an HTTP POST request to retrieve data from the SOS. This was done to allow the passing of a time parameter to the GetObservation request, along with the observedProperty and the offering id. While not necessary for the GetCapabilities request it too uses POST for simplicity. The HTTP::Request::Common was used since the UserAgent requires a POST object as an argument.