{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## 04-How to develop and test Web Coverage (Processing) Service queries?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "<< 03-WCPS extension           05-WCS clients >>" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "WCS queries, WCPS queries in particular, can get quite long and complex, as the the examples in the [previous tutorial](./03-WCPS_extension.ipynb) had shown. We will introduce two tools that assist in developing and verifying WC(P)S queries: \n", "- [WCS endpoint with petascope client](#wcs_endpoint)\n", "- [Develop queries with POSTMAN (chrome extension)](#postman)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### WCS endpoint with petascope client (rasdaman)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Rasdaman](www.rasdaman.org) provides its own client, called petascope, to its Web Coverage Service server. This allows for easy access to the service, with almost no prior WC(P)S knowledge. The petascope client is a well-arranged web-interface that results from a conversion of the XML documents returned by the WCS requests. \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Petascope - GetCapabilities and DescribeCoverage" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The WCS service endpoint brings a user directly to the translated GetCapabilities document (1). A user gets information about what data can accessed (2) via the WCS as well as additional information to the nature of the service and its provider. \n", "\n", "The different requests can be accessed via various tabs on the top of the interface. More detailed information about one specified dataset is delivered at the DescribeCoverage tab (3). the interface also provides the XML-document returned from the WCS server. \n", "\n", "Note: The time axis in rasdaman is called ansi. The current standard time format shown in petascope is based on the Ansi Date standard, which defines 1 January 1601 as day 1. This means that the format given in (3) is interpreted as number of days since 1 January 1601. We are aware that the Ansi standard is not very human-readable. Soon the date format will be shown in both formats, Ansi and ISO date format. \n", "Gladly, the WCS requests allow the input for ISO standard date formats. To have a better idea what time periods data cover, see [06-What data is available?](./06-Data.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
Petascope's landing web-interface is the translation of the Capabilities-document returned by a OGC WCS GetCapabilities request.
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Petascope - GetCoverage" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Petascope further allows for executing the GetCoverage request in an interactive way (1), with almost no prior knowledge of the WCS query setup required. Trimming and slicing operations can be specified (2) besides further scaling or interpolation operations. The practial thing, particularly for people learning the WCS requests, the resulting query is shown at the end of the interface (3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
Petascope allows for interactive trimming or slicing operations on the data (2) without an expert knowledge of the WCS requests. The resulting WCS query is provided at the end (3).
\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Petascope - ProcessCoverages" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Petascope also offers a console to dynamically execute ProcessCoverages requests (1). The result is then returned in the console (2). The console is also able to return an image requested, if the format encoding of the query is set to \"png\" for example. For the console returning an image, the expression image>> has to be added before the query. \n", "\n", "One example:\n", "> image>>for c in (temp2m) return encode (c[ansi(\"2010-02-07T00:00\")] - 273.15, \"png\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
Petascope offers an interactive console for Web Coverage Processing Service requests.
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Develop queries with the help of POSTMAN" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Postman](http://www.getpostman.com) is an extension for the Chrome webbrowser. Postman is a practical tools that helps you to construct, run and test queries for your API workflow. Postman helps to develop your query step-by-step by breaking down the query in its different parts (1) (2). You can start with the general service endpoint and gradually add additional keys + values for your request. Postman returns the result directly in the console. \n", "\n", "It is a very handy way to develop and test your queries, especially WCPS queries, that can get long and confusing.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
Postman is a Chrome extension for developing, running and testing API's. Postman allows to gradually setup the wcs query (1)(2) and test the result immediately (3).
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should now know some tools that may assist you to develop WC(P)S queries. The [next tutorial](./05-WCS_clients.ipynb) will show multiple examples how WC(P)S requests can actually be integrated into common data processing workflows." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "© 2017 ECMWF\n", "\n", "This software is licensed under the terms of the Apache Licence Version 2.0 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor\n", "does it submit to any jurisdiction." ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.8" } }, "nbformat": 4, "nbformat_minor": 0 }