aodn / aodn-portal

AODN Open Geospatial Portal
https://portal.aodn.org.au/
GNU General Public License v3.0
21 stars 13 forks source link

Missing 'copyright' parameter in getFeatureInfo response #179

Closed pmbohm closed 11 years ago

pmbohm commented 11 years ago

What used to happen on nwms.emii.org.au: the response included the value at click point plus text linking to data etc screenshot from 2013-05-22 13 25 15

What happens now on ncwms.aodn.org.au: the copyright content is missing screenshot from 2013-05-22 13 29 14

jkburges commented 11 years ago

works for me, closing.

jkburges commented 11 years ago

Sorry, didn't read the bug report properly.

tojofo commented 11 years ago

This looks like it's a configuration issue with the new ncwms server that will likely be fixed with the deployment of the new configuration

Compare the response from the old server

<?xml version="1.0" encoding="UTF-8"?>
<FeatureInfoResponse>
    <longitude>115.00488286836936</longitude>
    <latitude>-19.227050732227486</latitude>
    <iIndex>119</iIndex>
    <jIndex>1218</jIndex>
    <gridCentreLon>114.95074462890625</gridCentreLon>
    <gridCentreLat>-19.242290496826172</gridCentreLat>
    <FeatureInfo>
        <time>2011-03-08T09:00:00Z</time>
        <value>-0.17713012</value>
    </FeatureInfo>
    <copyright><![CDATA[<div class='featurewhite'>   <h4 class='getfeatureTitle'>The 'Ribbon' Model Output</h4>    <p>Numerical modelling of the global ocean currently requires models specifically deigned for the task at hand. These models contain the computational physics and software engineering necessary to resolve the global ocean's dominant large scale physics without compromising run times. While these models may be eddy resolving in the ocean basins, on coastal margins their accuracy deteriorates due to their inability to resolve the dominant scales of motion. It is in these coastal zones that accurate numerical prediction is often required to address numerous coastal issues. In the past global models have been unsuitable for high resolution limited area modelling of coastal domains, however, recently there has been a convergence of global and regional models to the extent that some global models (e.g. MOM4p1) are capable of accurately representing limited area coastal domains. This is largely due to the inclusion of adequate turbulence closure and open boundary algorithms required to characterise coastal processes.   <br />For more information see the metadata links</p>    <p>Contact:    <a href='mailto:Simon.Allen@csiro.au'>Simon.Allen@csiro.au</a>   <br /></p>    <!--a title='http://imosmest.emii.org.au/geonetwork/srv/en/metadata.show?uuid=9dfc847d-ce3b-436a-a15f-02b678829eed' class='h3' rel='external' target='_blank' href='http://imosmest.emii.org.au/geonetwork/srv/en/metadata.show?uuid=9dfc847d-ce3b-436a-a15f-02b678829eed'> Link to the IMOS metadata record</a-->   <br />    <a title='' class='h3' rel='external' target='_blank'   href='http://ramadda.aodn.org.au/repository/entry/show/AODN+RAMADDA+Data+Repository/Data/RAMADDA+Public+Files/RIBBON?entryid=cba3f2f3-a1f9-4867-962b-c3edbba0ce71'>    Data Info on ramadda</a>   <br /> <a title='' class='h3' rel='external' target='_blank'   href='http://ramadda.aodn.org.au/repository/entry/show/AODN+RAMADDA+Data+Repository/Data/RAMADDA+Public+Files/RIBBON/rib_cf_nrt_tmp.nc?entryid=51638cc4-92dd-4dd4-a634-7bcb8e908e5a'>    Data download on ramadda</a>   <br />        <h4 class='getfeatureTitle'>Disclaimer</h4>  <p> The CSIRO Model results presented on this website are based on pilot computer simulations ('Simulation Products') and are created using the CSIRO Environmental Modelling Suite. The base hydrodynamic model is the Sparse Hydrodynamic Ocean Code (SHOC). Details of the modelling suite can be found at <a title='http://www.emg.cmar.csiro.au/www/en/emg/software/EMS.html.' target='_blank' href='http://www.emg.cmar.csiro.au/www/en/emg/software/EMS.html.'>http://www.emg.cmar.csiro.au/www/en/emg/software/EMS.html</a> The code is freely available, custodianship of the code base is maintained through CSIRO.    The data user is advised that these model results, dependent on region, are at varying degrees of validation/calibration, and data users are cautioned that model results are presented solely for illustrative purposes. The CSIRO Environmental Modelling Group should be consulted with respect to their appropriate use. <p>  To the extent that the law permits, the Simulation Products are presented 'as is'. CSIRO excludes all terms, conditions and warranties implied by custom, the general law or statute. CSIRO does not warrant that the use of the Simulation Products will not infringe any third party's IP rights.   If the Simulation Products are used for the creation of derived products, attribution of the base data is required.  CSIRO does not  accept any liability whatsoever for any errors in these Simulation Products or for any errors that may result from using them. In using the Simulation Products or any derived products the user accepts all risk for and agrees to indemnify and keep indemnified, CSIRO against any and all liabilities, expenses, losses, damages and costs (including legal costs on a full indemnity basis and whether incurred or awarded against a party) that CSIRO may sustain or incur as a result (whether indirectly or directly) of any use of the Simulation Products or derived products. The user agrees that CSIRO will not be liable to the user or any third party for any indirect or consequential damage suffered by the user in any way arising from the use of the Simulation Products or derived products. </a> </div>]]></copyright>    
</FeatureInfoResponse>

With the response from the new server, i.e. no <copyright> element

<?xml version="1.0" encoding="UTF-8"?>
<FeatureInfoResponse>
    <longitude>115.24658170184254</longitude>
    <latitude>-32.190918007109005</latitude>
    <iIndex>49</iIndex>
    <jIndex>57</jIndex>
    <gridCentreLon>115.23185854098361</gridCentreLon>
    <gridCentreLat>-32.207194010989014</gridCentreLat>
    <FeatureInfo>
        <time>2013-06-04T19:30:00.000Z</time>
        <value>-0.13398</value>
    </FeatureInfo>
</FeatureInfoResponse>
danfruehauf commented 11 years ago

Upgrading to ncWMS + styles looks alright. Got a response looking like:

<?xml version="1.0" encoding="UTF-8"?>
<FeatureInfoResponse>
    <longitude>135.703124572</longitude>
    <latitude>-35.81091316293104</latitude>
    <iIndex>62</iIndex>
    <jIndex>27</jIndex>
    <gridCentreLon>135.72168292079206</gridCentreLon>
    <gridCentreLat>-35.796804830136985</gridCentreLat>
    <FeatureInfo>
        <time>2012-06-12T10:30:00Z</time>
        <value>0.43290392</value>
    </FeatureInfo>
    <copyright><![CDATA[<hr />  <h3>Ocean current map (Quality Controlled) - 1 hour average gridded product</h3> Data product available as <b>NetCDF files per hour</b> on OPeNDAP: <br /> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/gridded_1h-avg-current-map_non-QC/SAG/catalog.html' target='_blank' class='h3'>Non QC </a> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/gridded_1h-avg-current-map_QC/SAG/catalog.html' target='_blank' class='h3'>QC </a> <br /> <br /> Data product available as <b>monthly aggregated NetCDF files</b> on OPeNDAP: <br /> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/monthly_gridded_1h-avg-current-map_non-QC/SAG/catalog.html' target='_blank' class='h3'>Non QC </a> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/monthly_gridded_1h-avg-current-map_QC/SAG/catalog.html' target='_blank' class='h3'>QC </a> <hr /> <p>The South Australian Gulf site is composed of two radar stations: </p>  <ul>    <li><b>Cape Spencer</b> Radial data on OPeNDAP: <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/radial/CSP/catalog.html' target='_blank' class='h3'>Non QC </a> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/radial_quality_controlled/CSP/catalog.html' target='_blank' class='h3'>QC </a> </li>  <li><b>Cape Wiles</b> Radial data on OPeNDAP: <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/radial/CWI/catalog.html' target='_blank' class='h3'>Non QC </a> <a rel='external' href='http://opendap-qcif.arcs.org.au/thredds/catalog/IMOS/ACORN/radial_quality_controlled/CWI/catalog.html' target='_blank' class='h3'>QC </a> </li>   </ul>    <br />   <br />  ]]></copyright>
</FeatureInfoResponse>
danfruehauf commented 11 years ago

My bad, request was taken from ncwms.emii.org.au, not the new ncWMS server...

danfruehauf commented 11 years ago

Pretty simple what happened. The copyright is there and everything is good.

However with the new version the copyright is now in the GetMetadata request and not in the GetFeatureInfo request. Hence we should update our code in portal to support that...

danfruehauf commented 11 years ago

Copyright is also HTML encoded in ncWMS. Preserving behaviour as it was and I'll submit a pull request soon.

danfruehauf commented 11 years ago

This pull request now preserves the original behaviour.

Note to self: copyright was returned all the time also in GetMetadata. Tested with older versions of ncWMS (ncwms.emii.org.au).

So now this pull request will preserve the old behaviour but will also support new ncWMS servers.

dnahodil commented 11 years ago

Can this issue be closed, @danfruehauf?

danfruehauf commented 11 years ago

@dnahodil If @tojofo merged it and it's working as it should, then yes.

dnahodil commented 11 years ago

Sweet