﻿{"id":8787,"date":"2019-05-22T01:09:04","date_gmt":"2019-05-21T23:09:04","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=8787"},"modified":"2019-05-22T06:02:17","modified_gmt":"2019-05-22T04:02:17","slug":"understanding-the-wms-and-wfs-geoservices-part-2","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/","title":{"rendered":"Understanding the WMS and WFS geoservices (Part 2)"},"content":{"rendered":"\n<p><strong>GetCapabilities<\/strong> <\/p>\n\n\n\n<p>The GetCapabilities operation is a request to a WFS server for a list of\noperations and services, or capabilities, supported by that server. When you\nestablish a connection with QGis, for example, on a WFS server, QGis sends this\nrequest to be able to manage the connection and offer you the uploading of the\ndifferent available layers. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The request takes the following form: <\/p>\n\n\n\n<p><strong><em>localhost: 8080 \/ geoserver \/ wfs?<\/em><\/strong> <br> <strong><em>wfs &amp; service =<\/em><\/strong> <br> <strong><em>&amp; version = 1.1.0<\/em><\/strong> <br> <strong><em>request = GetCapabilities<\/em><\/strong>  <\/p>\n\n\n\n<p>The answer to GetCapabilities is a long XML document. \u00a0 <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"551\" data-attachment-id=\"8788\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/221-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/221.png?fit=525%2C551&amp;ssl=1\" data-orig-size=\"525,551\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"221\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/221.png?fit=525%2C551&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/221.png?resize=525%2C551&#038;ssl=1\" alt=\"\" class=\"wp-image-8788\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/221.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/221.png?resize=286%2C300&amp;ssl=1 286w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/figure>\n\n\n\n<p>A GetCapabilities document has five main elements: <\/p>\n\n\n\n<p><strong>ServiceIdentification<\/strong> contains basic information about\nthe request header, such as the title and type of service. The ServiceType\nindicates which versions of WFS are supported. <br>\n<strong>ServiceProvider<\/strong> Provides contact information for the company that\npublishes the WFS service, including phone, website, and email. <br>\n<strong>OperationsMetadata<\/strong> Describes the operations supported by the WFS server\nand the parameters of each operation. A WFS server can be configured so as not\nresponding to the operations listed above. <br>\n<strong>FeatureTypeList<\/strong> layers are listed in the namespace form: featuretype.\nThe default <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/qgis-projections-crs\/\">projection<\/a> is also shown, with the footprint box for the data in\nthe projection indicated. <br>\n<strong>Filter_Capabilities A<\/strong> list of filters, or expressions, that are\navailable to query, for example, spatial operators (such as Equals, Keys) and\ncomparison operators (such as lessthan, greaterthan). The filters themselves\nare not included in the GetCapabilities document. <\/p>\n\n\n\n<p><br>\n<strong>DescribeFeatureType<\/strong> <\/p>\n\n\n\n<p>DescribeFeatureType requests information on a particular layer before\nrequesting the actual data. Specifically, the operation will request a list of\nfeatures and attributes for the given layer, or list the types of available features.\n<\/p>\n\n\n\n<p>The request takes the following form: <\/p>\n\n\n\n<p>l <strong><em>ocalhost: 8080 \/ geoserver \/ wfs?<\/em><\/strong> <br> <strong><em>wfs &amp; service =<\/em><\/strong> <br> <strong><em>&amp; version = 2.0.0<\/em><\/strong> <br> <strong><em>request = &amp; DescribeFeatureType<\/em><\/strong> <br> <strong><em>typeNames = topp: tasmania_roads &amp;<\/em><\/strong> <br> <strong><em>outputFormat = text \/ javascript<\/em><\/strong>  <\/p>\n\n\n\n<p>The answer will be of the following type:  <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"391\" data-attachment-id=\"8789\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/222-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?fit=811%2C495&amp;ssl=1\" data-orig-size=\"811,495\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"222\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?fit=640%2C391&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?resize=640%2C391&#038;ssl=1\" alt=\"\" class=\"wp-image-8789\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?w=811&amp;ssl=1 811w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?resize=300%2C183&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/222.png?resize=768%2C469&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>In this example the answer indicates that the tasmanbialayer_roads has\ntwo attributes: <strong>the_geom<\/strong> of polyline type and <strong>TYPE<\/strong> of string type.\n<\/p>\n\n\n\n<p><br>\n<strong>GetFeature<\/strong> <\/p>\n\n\n\n<p>The GetFeature operation returns a selection of entities from the data\nsource. <\/p>\n\n\n\n<p>The request takes the following form: <\/p>\n\n\n\n<p><strong><em>localhost: 8080 \/ geoserver \/ wfs?<\/em><\/strong> <br>\n<strong><em>wfs &amp; service =<\/em><\/strong> <br>\n<strong><em>&amp; version = 2.0.0<\/em><\/strong> <br>\n<strong><em>request = &amp; GetFeature<\/em><\/strong> <br>\n<strong><em>typeNames = topp: tasmania_roads &amp;<\/em><\/strong> <br>\n<strong><em>FEATUREID = tasmania_roads.1 &amp;<\/em><\/strong> <br>\n<strong><em>outputFormat = text \/ javascript<\/em><\/strong> <\/p>\n\n\n\n<p>This request asks for an entity of the <strong>tasmania_roads<\/strong> layer\nhaving as identifier <strong><em>tasmania_roads.1<\/em><\/strong> \n\nThe answer is: &nbsp;\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"160\" data-attachment-id=\"8790\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/223-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/223.png?fit=525%2C160&amp;ssl=1\" data-orig-size=\"525,160\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"223\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/223.png?fit=525%2C160&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/223.png?resize=525%2C160&#038;ssl=1\" alt=\"\" class=\"wp-image-8790\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/223.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/223.png?resize=300%2C91&amp;ssl=1 300w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/figure>\n\n\n\n<p>We observe the values \u200b\u200bof the coordinates of the polyline and the value\nof TYPE for this entity: <strong><em>alley<\/em><\/strong> . <\/p>\n\n\n\n<p><strong>The WMS protocol<\/strong> <\/p>\n\n\n\n<p>The Web Map Service Interface (WMS) provides a simple HTTP interface for\nrequesting geo-recorded map images from one or more geospatial databases\ndistributed. A WMS request defines the geographic layer (s) and the area of\n\u200b\u200binterest to be processed. The response to the request is one or more\ngeo-recorded map images (returned as JPEG, PNG, etc.) that can be displayed in\na browser application. The interface also allows you to specify whether the\nreturned images should be transparent so that multiple server layers can be\ncombined or not. <\/p>\n\n\n\n<p>A typical GETMAP query is of the following form: <\/p>\n\n\n\n<p><strong><em>localhost: 8080 \/ geoserver \/ topp \/ wms?<\/em><\/strong> <br>\n<strong><em>service = WMS &amp;<\/em><\/strong> <br>\n<strong><em>&amp; version = 1.1.0<\/em><\/strong> <br>\n<strong><em>request = GetMap &amp;<\/em><\/strong> <br>\n<strong><em>layers = topp: tasmania_roads &amp;<\/em><\/strong> <br>\n<strong><em>bbox = 145.19754% 2C-43.423512% 40.852802 2C148.27298000000002% 2C-&amp;<\/em><\/strong>\n<br>\n<strong><em>width = 768 &amp;<\/em><\/strong> <br>\n<strong><em>height = 641 &amp;<\/em><\/strong> <br>\n<strong><em>srs = EPSG: 4326 &amp;<\/em><\/strong> <br>\n<strong><em>format = image \/ png<\/em><\/strong> <\/p>\n\n\n\n<p>The <strong>layers<\/strong> parameter indicates which layer you want, the <strong>bbox<\/strong>\nparameter indicates the desired geographic site and the parameter <strong>srs<\/strong> whose\ncoordinate system is requested. <\/p>\n\n\n\n<p>The <strong>width<\/strong> and <strong>height<\/strong> parameters indicate the exact pixel size\nof the returned image from this query, while the <strong>format<\/strong> indicates the\ndesired image format. \n\nThis information is essential because the output\nof the request will be an image that will be loaded directly into a map window:\n\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"271\" data-attachment-id=\"8791\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/224-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/224.png?fit=525%2C271&amp;ssl=1\" data-orig-size=\"525,271\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"224\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/224.png?fit=525%2C271&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/224.png?resize=525%2C271&#038;ssl=1\" alt=\"\" class=\"wp-image-8791\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/224.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/224.png?resize=300%2C155&amp;ssl=1 300w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/figure>\n\n\n\n<p>The size of the image will be the size of the map window and, therefore,\nthis image is superimposed on the other information of the window, the corners\nof the image must correspond exactly with the current coordinates of the\nwindow. \n\nIn order to make a comparison with the WFS\nprotocol, here is the output of the query requesting the set of entities of the\nsame layer (tasmania_roads): &nbsp;\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"253\" data-attachment-id=\"8792\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/understanding-the-wms-and-wfs-geoservices-part-2\/225-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/225.png?fit=525%2C253&amp;ssl=1\" data-orig-size=\"525,253\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"225\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/225.png?fit=525%2C253&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/225.png?resize=525%2C253&#038;ssl=1\" alt=\"\" class=\"wp-image-8792\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/225.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/225.png?resize=300%2C145&amp;ssl=1 300w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/figure>\n\n\n\n<p>Both results are based on the same data layer of the server, but while\nthe image is directly usable in a browser, the data will have to be processed\nby computer code to be displayed. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>GetCapabilities The GetCapabilities operation is a request to a WFS server for a list of operations and services, or capabilities, supported by that server. When you establish a connection with QGis, for example, on a WFS&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1260],"tags":[],"class_list":["post-8787","post","type-post","status-publish","format-standard","hentry","category-non-classe-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-2hJ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=8787"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8787\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=8787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=8787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=8787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}