Welcome to our Web Service tutorial page!

This tutorial aims to give a short introduction in how to programmaticaly request maps of environmental and sequence sampling site.

We offer programmatic access to our Genes Mapserver using the Web Map Service (WMS) 1.1.1 specification of the Geospatial Consortium.

Introduction

The WMS standard defines nothing else but how to create an HTTP request and what to expect as response. A first simple example might already demonstrates the possible uses. The following example URL:

http://www.megx.net/wms/gms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=satellite_mod&SRS=EPSG%3A4326&&BBOX=-15,30,50.9603,80&FORMAT=image%2Fpng&TRANSPARENT=true&width=300&height=200&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage

Gives the following image in PNG format:

The base URL for all WMS requests is:

http://www.megx.net/wms/gms?

Followed by the WMS compliant query string containing data to be passed to Genes Mapserver. The query string contains name/value pairs separated by ampersands, with names and values in each pair being separated by equal signs, for example

SERVICE=WMS&VERSION=1.1.1
.

The WMS specification gives detailed information of which query string parameters can be used. The table below describes the minimum set of parameters needed to retrieve maps from the Genes Mapserver.
name example value description
SERVICE WMS Says it is a WMS request
VERSION 1.1.1 Compliant to WMS specification version 1.1.1 (1.1.0) can also be used
LAYERS satellite_mod Which layers to draw onto the map
BBOX=-15,30,50.9603,80 value The spatial extend of the map. In this example in decimal degree values.
FORMAT image%2Fpng The format of the picture to be returned
TRANSPARENT true Transparency of the picture
REQUEST GetMap A map to be requested
SRS EPSG%3A4326 The spatial reference system. In this example WGS 84.
width 300 Width of image to be returned.
height 200 Width of image to be returned.
The Genes Mapserver gives access to many different layer, which can be combined in any way within the
LAYERS
parameter.

Base Layers

Base layers give some enhancements to the map, such as showing lake or ocean limits.
Layer Name
bathymetry
satellite
satellite_mod
undersea_arc
undersea_point
lakes
boundaries
limitsoceans
coordinates

They can be combined. Note that the order in the LAYERS paramters determines the stack of layers. From left to rigth, draws the map lyers from bottom to top. In examples might demonstrate this behaviour:

http://www.megx.net/wms/gms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=satellite_mod,limitsoceans,undersea_arc,undersea_point&SRS=EPSG%3A4326&&BBOX=-15,30,50.9603,80&FORMAT=image%2Fpng&TRANSPARENT=true&width=300&height=200&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage

Gives the following image in PNG format:

Environmental Layers

Environmetal Layer Name Description
woa05_temperature Temperature
woa05_nitrate Nitrate
woa05_phosphate Phosphate
woa05_salinity Salinity
woa05_silicate Silicate
woa05_oxygen_dissolved Dissolved Oxygen
woa05_oxygen_saturation Oxygen Saturation
woa05_oxygen_utilization Oxygen Utilization

Theses layers can only be used if additional query string parameters for depth and time period are given.

The parameter name for the time period is: SEASON. Which has valid values between 0-16, where 0=annual, 1-12 = month, and 13-16 = 1st to 4th quarter of a year.

The parameter name for ocean water depth is DEPTH. Values can be given for standard depth of 0, 10, 20, 30, 50, 75, 700, 125, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1750, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500

http://www.megx.net/wms/gms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=satellite_mod,woa05_temperature,limitsoceans,undersea_arc,undersea_point&DEPTH=100&SEASON=0&&SRS=EPSG%3A4326&&BBOX=-15,30,50.9603,80&FORMAT=image%2Fpng&TRANSPARENT=true&width=300&height=200&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage

Gives the following image in PNG format:

Environmental Stability Layers

The environemtal stability layers follow the naming schema of the above environmental layer with "_stability" as suffix. The avilable layers are: woa05_temperature_stability, woa05_nitrate_stability, woa05_phosphate_stability, woa05_salinity_stability, woa05_silicate_stability, woa05_oxygen_dissolved_stability, woa05_oxygen_saturation_stability, and woa05_oxygen_utilization_stability. In addition to the stability layers DEPTH (as defined) must be given.
http://www.megx.net/wms/gms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=satellite_mod,woa05_temperature_stability,limitsoceans&DEPTH=100&&SRS=EPSG%3A4326&&BBOX=-15,30,50.9603,80&FORMAT=image%2Fpng&TRANSPARENT=true&width=300&height=200&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage

Gives the following image in PNG format:

Sampling Sites

The sampling site layer name is

samplingsites

In order to chose wether genomes, metagenome, marine phage, or rRNA sequences sampling sites should be shown the following additional query string parameters are needed:

name value
GENOMES genome
METAGENOMES metagenome
PHAGES phage
RRNAS rRNA
The values function as a flag or switch to show the sampling sites of the corresponding sample types. I.e. the parameter anem can always be given, and only if the value is supplied the corresponding sampling site will be shown. Therefore
RRNAS=&GENOMES=genome&PHAGES=phage&METAGENOMES=metagenome
Shows genomes, metagenomes, and marine phages. Whereas,
RRNAS=rRNA&GENOMES=genome&PHAGES=phage&METAGENOMES=metagenome

Shows all sampling sites. this all taken together, one can generate a map showing the temperature stability at sea surface and rRNA sampling sites:

http://www.megx.net/wms/gms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=satellite_mod,woa05_temperature_stability,samplingsites&RRNAS=rRNA&GENOMES=&PHAGES=&METAGENOMES=&DEPTH=0&SRS=EPSG%3A4326&&BBOX=-15,30,50.9603,80&FORMAT=image%2Fpng&TRANSPARENT=true&width=300&height=200&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage

Gives the following image in PNG format:

Summary

The ability to retrieve maps and emebed them in own web pages or programs was demonstrated using the Genes Mapserver web service interface. This interface are URLs according to the WMS specification 1.1.1 to create HTTP requests. For further question, please contact us.