wiki:WmsImportTools

WMS import utilities (deprecated)

Description

Some first utilities to publish WMS layers with Petascope are available now [current documentation refers to commit d249b9a "WMS exception messages; additions and minor fixes on WMS utilities and servlet."].

These can be found in <rasdaman>/applications/rasgeo/wms-import/utilities/ in the source tree and get installed into the bin directory:

$ init_wms.sh <layerName> <collName> <crs> [--lat-first] [-l <pyramidLevels>] [-h <host>] [-p <port>]

To set up the metadata in the database and initialize the (empty) pyramid collections.

$ fill_pyramid.sh <collName> [--tasplit]

To populate/update the content of the previously initialized smaller-scale pyramid collections.

$ drop_wms.sh <layerName> [--keep-pyramids]  [--del-service]

To unpublish the WMS layer and, if not explicitly specified, drop the collections of the pyramid from rasdaman. With --del-service the WMS metadata get totally reset and the service is removed (use inis_wms.sh to add a new one).

Whenever the service is deleted via drop_wms.sh then re-created via init_wms.sh, or either when a layer is deleted then re-filled, it is possible to reload the service without restarting Petascope by sending the following HTTP request:

http://<host>:<port>]/petascope/wms?request=ReloadCapabilities&service=wms&version=1.0.0

The option --lat-first needs to be used when the axes defined in the assigned CRS do not follow the easting/northing order of the collections in rasdaman. It is set automatically for the widely used WGS84 CRS (EPSG:4326).

Toy Example

Here is an example: publishing mean_summer_airtemp collection as australia_wms WMS layer with a 4-layer pyramid over it for zoom-out optimizations.

Petascope is then automatically updated (a ReloadCapabilities request is sent by init_wms.sh).

  # Publish the WMS layer
  # NB specifying service host and port is highly suggested for compatibility with client Software.
  # PS After a first WMS layer initialization, these args are not considered and the previously created WMS service is used.
  $ init_wms.sh    # see usage
  $ init_wms.sh australia_wms mean_summer_airtemp EPSG:4326 -l '2:4:8:16' -h <hostname> -p <port>
  $ fill_pyramid.sh mean_summer_airtemp [--tasplit] # in case of error, just retry

Once the layer is published, one could test the service by manually sending WMS requests to the servlet, e.g.:

   http://<host>:<port>/petascope/wms
    ?request=GetCapabilities
    &service=wms
    &version=1.1.0
   http://<host>:<port>/petascope/wms
    ?service=WMS
    &request=GetMap
    &version=1.1.0
    &format=image/png
    &width=900
    &height=900
    &srs=EPSG:4326
    &layers=australia_wms
    &styles=standard
    &bbox=110,-40,120.8,-29.2
    &bgcolor=0xFF0000

Otherwise you could untar the attachment and open WmsPetascope.html on the browser to try out a simple OpenLayers application. It is preferred to run rasdaman with N>1 servers running, performances can change considerably to serve the N tile-requests of a WMS client.

Eventually, to unpublish the WMS layer and drop the pyramid:

  $ drop_wms.sh australia_wms 

To remove the layer, drop the pyramids and clear all the WMS metadata in the database:

  $ drop_wms.sh australia_wms --del-service
Last modified 15 months ago Last modified on Dec 18, 2015 2:40:32 PM

Attachments (1)

Download all attachments as: .zip