wiki:WMSGuide

Version 8 (modified by bphamhuu, 11 months ago) (diff)

add the notification for missing "+" in WMS service.

WMS 1.3 Guide

This page contains a small intro on the capabilities of the WMS 1.3 service offered by Petascope.

Administration

The WMS 1.3 is self-administered by all intents and purposes, the database schema is created automatically and updates each time the Petascope servlet starts if necessary. The only input needed from the administrator is the service information which should be filled in $RMANHOME/etc/wms_service.properties before the servlet is started.

Data ingestion & removal

Layers can be easily created from existing coverages in WCS. The InsertWCSLayer request will create a layer from a coverage served by the web coverage service offered by Petascope. Example of such a request:

http://example.org/rasdaman/ows?service=WMS&version=1.3.0&request=InsertWCSLayer&wcsCoverageId=MyCoverage

This has several advantages:

  • Creating the layer is extremely simple and can be done by both humans and machines
  • The posibilities of inserting data into WCS are quite advanced (see wiki:WCSTImportGuide)
  • Data is not duplicated among the services offered by Petascope

To remove a layer use the following request:

http://example.org/rasdaman/ows?service=WMS&version=1.3.0&request=DeleteLayer&layer=MyLayerName

Style creation

Styles can be created for layers using rasql query fragments. This allows users to define several visualization options for the same dataset in a flexible way. Examples of such options would be color classification, NDVI detection etc. The following HTTP request will create a style with the name, abstract and layer provided in the KVP parameters below

http://example.org/rasdaman/ows?service=WMS&version=1.3.0&request=InsertStyle
&name=FireMarkup
&layer=dessert_area
&abstract=This style marks the areas where fires are in progress with the color red
&rasqlTransformFragment=case $Iterator when ($Iterator + 2) > 200 then {255, 0, 0} else {0, 255, 0} end

The rasqlTransformFragment contains the query fragment that can modify the normal result of the layer. The variable $Iterator will be replaced with the actual name of the rasdaman collection and the whole fragment will be integrated inside the regular GetMap? query

#NOTE: now Petascope will support "+" in WMS, WCS, WCPS without need another encoding tool.

-- Deprecated --

Beware of the plus sign encoding. Several servers including Tomcat considers a "+" symbol in an URL as an encoding for space and replaces it as such. Please properly encode your rasql before submitting the request using one of the tools online (for example http://meyerweb.com/eric/tools/dencoder/). E.g.

case $Iterator when ($Iterator + 2) > 200 then {255, 0, 0} else {0, 255, 0} end

should be:

case%20%24Iterator%20when%20(%24Iterator%20%2B%202)%20%3E%20200%20then%20%7B255%2C%200%2C%200%7D%20else%20%7B0%2C%20255%2C%200%7D%20end

Testing the WMS

You can test the service using your favorite WMS client or directly through a GetMap? request like the following:

http://example.org/rasdaman/ows?service=WMS&version=1.3.0&request=GetMap
&layers=MyLayer
&bbox=618885.0,3228195.0,690885.0,3300195.0
&crs=EPSG:32615
&width=600
&height=600
&format=image/png