Thredds与WMS的threddsConfig.xml文件问题

时间:2014-03-10 11:48:45

标签: thredds

我已经安装了Thredds的4.3版本(在tomcat 7上)并且它正常工作,除了WMS。

如果我使用了较旧的threddsConfig.xml文件(除了取消注释WMS之外几乎都是默认文件,它可以工作,我看到了Godiva链接。

如果我下载最新的threddsConfig.xml并取消注释WMS功能,则不会出现Godiva链接。

这是我修改的默认XML文件:

<?xml version="1.0" encoding="UTF-8"?>
<threddsConfig>

  <!-- all options are commented out in standard install - meaning use default values -->
  <!-- see http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/ThreddsConfigXMLFile.html -->
  <serverInformation>
    <name>Initial TDS Installation</name>
    <logoUrl>/thredds/threddsIcon.gif</logoUrl>
    <logoAltText>Initial TDS Installation</logoAltText>

    <abstract>Scientific Data</abstract>
    <keywords>meteorology, atmosphere, climate, ocean, earth science</keywords>

    <contact>
      <name>Support</name>
      <organization>My Group</organization>
      <email>support@my.group</email>
      <!--phone></phone-->
    </contact>
    <hostInstitution>
      <name>My Group</name>
      <webSite>http://www.my.site/</webSite>
      <logoUrl>myGroup.gif</logoUrl>
      <logoAltText>My Group</logoAltText>
    </hostInstitution>
  </serverInformation>

  <!--
  The <catalogRoot> element:
  For catalogs you don't want visible from the /thredds/catalog.xml chain
  of catalogs, you can use catalogRoot elements. Each catalog root config
  catalog is crawled and used in configuring the TDS.

  <catalogRoot>myExtraCatalog.xml</catalogRoot>
  <catalogRoot>myOtherExtraCatalog.xml</catalogRoot>
  -->

  <!--
   * Setup for generated HTML pages.
   *
   * NOTE: URLs may be absolute or relative, relative URLs must be relative
   * to the webapp URL, i.e., http://server:port/thredds/.
    -->
  <htmlSetup>
    <!--
     * CSS documents used in generated HTML pages.
     * The CSS document given in the "catalogCssUrl" element is used for all pages
     * that are HTML catalog views. The CSS document given in the "standardCssUrl"
     * element is used in all other generated HTML pages.
     * -->
    <standardCssUrl>tds.css</standardCssUrl>
    <catalogCssUrl>tdsCat.css</catalogCssUrl>
    <openDapCssUrl>tdsDap.css</openDapCssUrl>

  </htmlSetup>

  <!--
   The <CatalogServices> element:
   - Services on local TDS served catalogs are always on.
   - Services on remote catalogs are set with the allowRemote element
   below. They are off by default (recommended).
   -->
  <CatalogServices>
    <allowRemote>false</allowRemote>
  </CatalogServices>

  <!--
  Configuring the CDM (netcdf-java library)
  see http://www.unidata.ucar.edu/software/netcdf-java/reference/RuntimeLoading.html

  <nj22Config>
    <ioServiceProvider class="edu.univ.ny.stuff.FooFiles"/>
    <coordSysBuilder convention="foo" class="test.Foo"/>
    <coordTransBuilder name="atmos_ln_sigma_coordinates" type="vertical" class="my.stuff.atmosSigmaLog"/>
    <typedDatasetFactory datatype="Point" class="gov.noaa.obscure.file.Flabulate"/>
  </nj22Config>
  -->

  <!--
  CDM uses the DiskCache directory to store temporary files, like uncompressed files.
  <DiskCache>
    <alwaysUse>false</alwaysUse>
    <scour>1 hour</scour>
    <maxSize>1 Gb</maxSize>
  </DiskCache>
  -->

  <!--
  Caching open NetcdfFile objects.
  default is to allow 50 - 100 open files, cleanup every 11 minutes
  <NetcdfFileCache>
    <minFiles>50</minFiles>
    <maxFiles>100</maxFiles>
    <scour>11 min</scour>
  </NetcdfFileCache>
  -->

  <!--
  The <HTTPFileCache> element:
  allow 10 - 20 open datasets, cleanup every 17 minutes
  used by HTTP Range requests.
  <HTTPFileCache>
    <minFiles>10</minFiles>
    <maxFiles>20</maxFiles>
    <scour>17 min</scour>
  </HTTPFileCache>
  -->

  <!--
  GRIB index caching
  <GribIndex>
    <alwaysUse>false</alwaysUse>
    <dir>/tomcat_home/content/thredds/cache/grib/</dir>
    <policy>oneDirectory</policy>
    <scour>0 hours</scour>
    <maxAge>90 days</maxAge>
  </GribIndex>
  -->

  <!--
  Persist joinNew aggregations to named directory. scour every 24 hours, delete stuff older than 90 days
  <AggregationCache>
    <scour>24 hours</scour>
    <maxAge>90 days</maxAge>
  </AggregationCache>
  -->

  <!--
  How to choose the template dataset for an aggregation. latest, random, or penultimate
  <Aggregation>
    <typicalDataset>penultimate</typicalDataset>
  </Aggregation>
  -->

  <!--
  The Netcdf Subset Service is off by default.
  <NetcdfSubsetService>
    <allow>false</allow>
    <scour>10 min</scour>
    <maxAge>-1 min</maxAge>
  </NetcdfSubsetService>
  -->

  <!--
  <Opendap>
    <ascLimit>50</ascLimit>
    <binLimit>500</binLimit>
    <serverVersion>opendap/3.7</serverVersion>
  </Opendap>
    -->

  <!--
  The WCS Service is off by default.
  Also, off by default (and encouraged) is operating on a remote dataset.
  <WCS>
    <allow>false</allow>
    <allowRemote>false</allowRemote>
    <scour>15 min</scour>
    <maxAge>30 min</maxAge>
  </WCS>
  -->

  <WMS>
    <allow>false</allow>
    <allowRemote>false</allowRemote>
    <scour>15 min</scour>
    <maxAge>30 min</maxAge>
  </WMS>

  <!--
  <NCISO>
    <ncmlAllow>false</ncmlAllow>
    <uddcAllow>false</uddcAllow>
    <isoAllow>false</isoAllow>
  </NCISO>
  -->

  <!-- CatalogGen service is off by default.
  <CatalogGen>
    <allow>false</allow>
  </CatalogGen>
   -->

  <!-- DLwriter service is off by default.
       As is support for operating on remote catalogs.
  <DLwriter>
    <allow>false</allow>
    <allowRemote>false</allowRemote>
  </DLwriter>
   -->

  <!-- DqcService is off by default.
  <DqcService>
    <allow>false</allow>
  </DqcService>
   -->

  <!--
   Link to a Viewer application on the HTML page:
   <Viewer>my.package.MyViewer</Viewer>
   -->

   <!--
   Add a DataSource - essentially an IOSP with access to Servlet request parameters
   <datasetSource>my.package.DatsetSourceImpl</datasetSource>
   -->

  <!--
  Modify Logging parameters. Normally use log4j.xml
  <Logging>
    <DatePattern></DatePattern>
    <MaxFile`enter code here`Size></MaxFileSize>
    <MaxFiles></MaxFiles>
  </Logging>
  -->

</threddsConfig>

由于

1 个答案:

答案 0 :(得分:2)

为了让Godiva2链接显示在THREDDS数据服务器的观众下,你必须做两件事:

  1. threddsConfig.xml中启用WMS。确保取消注释<WMS>块,并将<allow>设置为true

     
     <WMS>
        <allow>true</allow>
        <allowRemote>false</allowRemote>
        <scour>15 min</scour>
        <maxAge>30 min</maxAge>
      </WMS>
    
  2. 确保WMS包含在thredds目录中的服务列表中,以用于要启用WMS的数据集:

    <service name="allServices" serviceType="Compound" base="">
      <service name="ncdods" serviceType="OPENDAP" base="/thredds/dodsC/"/>
      <service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/grid/"/>
      <service name="wms" serviceType="WMS" base="/thredds/wms/"/>
      <service name="iso" serviceType="ISO" base="/thredds/iso/" />
      <service name="ncml" serviceType="NCML" base="/thredds/ncml/" />
      <service name="uddc" serviceType="UDDC" base="/thredds/uddc/" />
    </service>