Sneak peek at xWCPS 2.0

05/05/2016

xWCPS2.0 is a novel query language that builds on xWCPS and utilizes two existing standard languages: xPath and Web Coverage Processing Service (WCPS). By combining those two, it is delivering a rich set of features that revolutionizesthe way scientific data can be located and processed, by enabling combined search, filtering and processing on both metadata and OGC coverages' payload. In brief, queries expressed in xWCPS are able to utilize coverage metadata - commonly expressed in XML -by incorporating support for xPath expressions in any of the three main clauses of the WCPS syntax: for, where and return. 

Expressiveness and coherence are key features of the language, now in its 2nd revision, allowing experts dealing with multidimensional array data to easily adopt and take advantage of its offerings. 

The following examples showcase some of the features of xWCPS 2.0 in its current form.

Example 1

Retrieve all coverages from the planetserver service with solar_longitude greater than ‘86.0122’ and band combination of BD1435,BD1500_2 and BD1900_2 for ICE detection.

Query:

for data in /server[@endpoint='http://access.planetserver.eu:8080/rasdaman/ows']/coverage  

where describeCoverage(data)//gml:cat_solar_longitude[text()>86.0122]  

return encode( 

{

  red:(int)(255 / (1 - (1.395 / ((1 - ((data.band_61 - data.band_57)/(data.band_72 - data.band_57))) * 1.370 + ((data.band_61 - data.band_57)/(data.band_72 - data.band_57)) * 1.470))));  

  green: (int)(255 / (1 - (1.525 / ((1 - ((data.band_80 - data.band_57)/(data.band_124 - data.band_57))) * 1.367 + ((data.band_80 - data.band_57)/(data.band_124 - data.band_57)) * 1.808))));  

  blue: (int)(255/ (0.5 * (1 - (1.930 / ((1 - ((data.band_142 - data.band_130)/(data.band_163 - data.band_130))) * 1.850 + ((data.band_142 - data.band_130)/(data.band_163 - data.band_130)) * 2.067))) * 0.5 * (1 - (1.985 / ((1 - ((data.band_151 - data.band_130)/(data.band_163 - data.band_130))) * 1.850 + ((data.band_151 - data.band_130)/(data.band_163 - data.band_130)) * 2.067)))));  

  alpha: (data.band_100 != 65535) * 255  

}, "png", "nodata=null")

 

Results 

The query returns 3 coverages in png format

 xWCPS sample query results

 

Example 2

List all available coverages of all services with solar_longtitude greater than ’86.0122’ and return the 'solar_longtitude' valuewrapped by an XMLelement named <p>

 

Query:

 

for data in //coverage  

return <p> describeCoverage(data)//gml:cat_solar_longitude[text()>86.0122] </p>

 

Results 

The query returns 3 results as can be seen in the following table.

 

<results>  

<p>

<cat_solar_longitudexmlns="http://www.opengis.net/gml/3.2"xmlns:swe="http://www.opengis.net/swe/2.0"xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0"xmlns:crs="http://www.opengis.net/wcs/service-extension/crs/1.0"xmlns:wcs="http://www.opengis.net/wcs/2.0"xmlns:gml="http://www.opengis.net/gml/3.2"xmlns:ows="http://www.opengis.net/ows/2.0"xmlns:xlink="http://www.w3.org/1999/xlink"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">148.6740</cat_solar_longitude>

</p>  

<p> 

 </p>  

<p>  

</p>  

</results>