Personal tools
You are here: Home Downloads SOS 1.0 Perl Cookbook (ASCII and RDBMS) How to Upgrade From Previous PERL Versions

How to Upgrade From Previous PERL Versions

Instructions on how to upgrade from previous Perl SOS Version 0.0.31 versions to SOS 1.0

Upgrading from a previous installation of a PERL OOSTethsy SOS Version 0.0.31 is simple. All that is required is to overwrite the oostethsy_sos.cgi and the the three template files with the newer SOS 1.0 versions.  Do NOT overwrite your existing sos_config.xml file. 

Replace:

  1. oostethys_sos.cgi
  2. sosGetCapabilities.xml
  3. sosDescribeSensor.xml
  4. sosGetObservation.xml
There is also a new Perl Library required which you must ensure is part of your Perl installation:  XML::LibXML::XPathContext.
See the Perl Module Installation Tips page.

There are 2 significant changes that must be made:

1.  Your existing sos_config.xml file must be edited to add a new element for each <Observation> element.  You must add a new element <uom>  for that observation's units of measurement.  E.g.
<Observation>
   <observedProperty>
sea_water_temperature</observedProperty>
   <uom>
celcius</uom>
...
</Observation>

This must be done for each <Observation> in the sos_config.xml file.   The <uom> can be placed anywhere within the begin and end <Observation> elements.  The uom can be anything.  E.g. <uom>c</uom>  <uom>mps</uom>  <uom>kph</uom>,  etc.

2. Your ASCII files with your observation data will need to be modified as we now require the addition of a local platform or sensor name as the first element of the ASCII text files.

As an example, if currently your text file looks like:
2008-11-09T10:00:00Z,45.2345,-72.9834,3,31.38
you will need to add the locaPlatformName to the beginning of the record:
A01,2008-11-09T10:00:00Z,45.2345,-72.9834,3,31.38

Your existing sos_config.xml, which has your SOS configuration information, should remain the same.

If you have modified the RDBMS GoMOOS reference implementation you will need to modify the oostethys_sos.cgi script to make it work with the example DBI code to access your database and return both Metadata about your sensors and the correct observation data.  Search in  the file for sections marked with the Perl comments:  #### LOCAL EDIT and #### END LOCAL EDIT for the sections which must be edited.   There are extensive comments in the Perl code describing the changes which must be made.  Note: the Perl DBI.pm module is required.

Detailed instructions are here. (Coming soon)



Document Actions