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.
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. |
LAYERSparameter.
| 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:
| 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:
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:
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 |
RRNAS=&GENOMES=genome&PHAGES=phage&METAGENOMES=metagenomeShows 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: