.
Open Geospatial Consortium (OGC) este o organizatie internațională, având ca membri mai mult de 300 de organizații comerciale, guvernamentale, non-profit și de cercetare din întreaga lume. Membrii săi dezvoltă și implementează standarde și servicii pentru conținut geospațial, de prelucrare și de schimb a datelor GIS.
Descriind un model de date de bază pentru entitățile geografice, un număr tot mai mare de specificații sunt dezvoltate de OGC, pentru a servi nevoilor specifice pentru tehnologii geospațiale și de localizare interoperabile, inclusiv GIS. Informații suplimentare pot fi găsite la http://www.opengeospatial.org/.
Important OGC specifications supported by QGIS are:
GML — Limbaj cu Marcaje Geografice
OGC services are increasingly being used to exchange geospatial data between different GIS implementations and data stores. QGIS can deal with the above specifications as a client, being SFS (through support of the PostgreSQL / PostGIS data provider, see section Straturi PostGIS).
QGIS currently can act as a WMS client that understands WMS 1.1, 1.1.1 and 1.3 servers. In particular, it has been tested against publicly accessible servers such as DEMIS.
A WMS server acts upon requests by the client (e.g., QGIS) for a raster map with a given extent, set of layers, symbolization style, and transparency. The WMS server then consults its local data sources, rasterizes the map, and sends it back to the client in a raster format. For QGIS, this format would typically be JPEG or PNG.
WMS is generically a REST (Representational State Transfer) service rather than a full-blown Web service. As such, you can actually take the URLs generated by QGIS and use them in a web browser to retrieve the same images that QGIS uses internally. This can be useful for troubleshooting, as there are several brands of WMS server on the market and they all have their own interpretation of the WMS standard.
Straturile WMS pot fi adăugate pur și simplu, atât timp cât: știți URL-ul de acces la serverul WMS, ați stabilit o conexiune validă la acel server, iar serverul înțelege ptotocolul HTTP, ca mecanism de transport al datelor.
QGIS can also act as a WMTS client. WMTS is an OGC standard for distributing tile sets of geospatial data. This is a faster and more efficient way of distributing data than WMS because with WMTS, the tile sets are pre-generated, and the client only requests the transmission of the tiles, not their production. A WMS request typically involves both the generation and transmission of the data. A well-known example of a non-OGC standard for viewing tiled geospatial data is Google Maps.
Pentru a afișa datele la o varietate de scări, apropiate de ceea ce și-ar putea dori utilizatorul, seturile de plăcuțe WMTS sunt produse la mai multe niveluri de scări diferite, și sunt puse la dispoziția clientului GIS pentru a le apela.
Această diagramă ilustrează conceptul seturilor de plăcuțe:
Figure WMTS 1:
The two types of WMTS interfaces that QGIS supports are via Key-Value-Pairs (KVP) and RESTful. These two interfaces are different, and you need to specify them to QGIS differently.
1) In order to access a WMTS KVP service, a QGIS user must open the WMS/WMTS interface and add the following string to the URL of the WMTS tile service:
"?SERVICE=WMTS&REQUEST=GetCapabilities"
Un exemplu al acestui tip de adresă este
http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?\
service=WMTS&request=GetCapabilities
Pentru testare, stratul topo2 din acest WMTS funcționează bine. Adăugarea acestui șir indică faptul că se va utiliza un serviciu web WMTS în locul unui serviciu WMS.
Serviciul RESTful WMTS are o formă diferită de adresă URL, simplă. Formatul recomandat de OGC este:
{WMTSBaseURL}/1.0.0/WMTSCapabilities.xml
This format helps you to recognize that it is a RESTful address. A RESTful WMTS is accessed in QGIS by simply adding its address in the WMS setup in the URL field of the form. An example of this type of address for the case of an Austrian basemap is http://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml.
Note
You can still find some old services called WMS-C. These services are quite similar to WMTS (i.e., same purpose but working a little bit differently). You can manage them the same as you do WMTS services. Just add ?tiled=true at the end of the url. See http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification for more information about this specification.
Când citiți WMTS, vă puteți gândi adesea și la WMS-C.
The first time you use the WMS feature in QGIS, there are no servers defined.
Begin by clicking the Add WMS layer button on the toolbar, or selecting Layer ‣ Add WMS Layer....
Va apărea dialogul de Adăugare Strat(uri) de la un Server. Puteți adăuga demonstrativ unele servere, făcând clic pe butonul **[Adaugă servere implicite]**. În acest fel, adăugați două servere WMS demo pentru a le utiliza: serverele WMS ale DM Solutions Group și LizardTech. Pentru a defini un nou server WMS, în fila :guilabel:`Straturilor selectați butonul [Nou]. Apoi introduceți parametrii de conectare la serverul WMS dorit, așa cum se arată în table_OGC_1:
Tabelul OGC 1: Parametri de conectare WMS
If you need to set up a proxy server to be able to receive WMS services from the internet, you can add your proxy server in the options. Choose Settings ‣ Options and click on the Network & Proxy tab. There, you can add your proxy settings and enable them by setting Use proxy for web access. Make sure that you select the correct proxy type from the Proxy type drop-down menu.
Once the new WMS server connection has been created, it will be preserved for future QGIS sessions.
Tip
Despre URL-urile Server-ului WMS
Be sure, when entering the WMS server URL, that you have the base URL only. For example, you shouldn’t have fragments such as request=GetCapabilities or version=1.0.0 in your URL.
Once you have successfully filled in your parameters, you can use the [Connect] button to retrieve the capabilities of the selected server. This includes the image encoding, layers, layer styles and projections. Since this is a network operation, the speed of the response depends on the quality of your network connection to the WMS server. While downloading data from the WMS server, the download progress is visualized in the lower left of the WMS dialog.
Ecranul dvs. ar trebui să arate un pic ca în figure_OGR_1, care arată răspunsul oferit de serverul WMS al Portalului Solurilor Europene.
Figure OGR 1:
Codificare Imagine
The Image encoding section lists the formats that are supported by both the client and server. Choose one depending on your image accuracy requirements.
Tip
Codificare Imagine
Veți descoperi că, de obicei, un server WMS vă oferă posibilitatea de a alege codificarea imaginii sub formă de JPEG sau PNG. JPEG este un format de compresie cu pierderi, în timp ce PNG reproduce fidel datele raster originale.
Use JPEG if you expect the WMS data to be photographic in nature and/or you don’t mind some loss in picture quality. This trade-off typically reduces by five times the data transfer requirement compared with PNG.
Utilizați PNG dacă doriți reprezentări precise ale datelor originale, și nu vă deranjează cerințele crescute de transfer de date.
Opțiuni
The Options area of the dialog provides a text field where you can add a Layer name for the WMS layer. This name will appear in the legend after loading the layer.
Below the layer name, you can define Tile size if you want to set tile sizes (e.g., 256x256) to split up the WMS request into multiple requests.
Limitarea entităților pentru GetFeatureInfo definește ce entități de pe server vor fi interogate.
If you select a WMS from the list, a field with the default projection provided by the mapserver appears. If the [Change...] button is active, you can click on it and change the default projection of the WMS to another CRS provided by the WMS server.
Finally you can activate Use contextual WMS-Legend if the WMS Server supports this feature. Then only the relevant legend for your current map view extent will be shown and thus will not include legend items for things you can’t see in the current map.
Ordinea straturilor
The Layer Order tab lists the selected layers available from the current connected WMS server. You may notice that some layers are expandable; this means that the layer can be displayed in a choice of image styles.
You can select several layers at once, but only one image style per layer. When several layers are selected, they will be combined at the WMS server and transmitted to QGIS in one go.
Tip
Ordinea straturilor WMS
WMS layers rendered by a server are overlaid in the order listed in the Layers section, from top to bottom of the list. If you want to change the overlay order, you can use the Layer Order tab.
Transparenţă
In this version of QGIS, the Global transparency setting from the Layer Properties is hard coded to be always on, where available.
Tip
Transparenţa stratului WMS
Disponibilitatea transparenței pentru imaginile WMS depinde de codificarea folosită pentru imagini: formatele PNG și GIF acceptă transparența, în timp ce pentru JPEG acest lucru nu este posibil.
Sistemul de Coordonate de Referință
A coordinate reference system (CRS) is the OGC terminology for a QGIS projection.
Fiecare strat WMS poate fi prezentat în mai multe CRS-uri, în funcție de capacitatea serverului WMS.
To choose a CRS, select [Change...] and a dialog similar to Figure Projection 3 in Lucrul cu Proiecții will appear. The main difference with the WMS version of the dialog is that only those CRSs supported by the WMS server will be shown.
Within QGIS, you can search for WMS servers. Figure_OGC_2 shows the Server Search tab with the Add Layer(s) from a Server dialog.
Figure OGR 2:
As you can see, it is possible to enter a search string in the text field and hit the [Search] button. After a short while, the search result will be populated into the list below the text field. Browse the result list and inspect your search results within the table. To visualize the results, select a table entry, press the [Add selected row to WMS list] button and change back to the Layers tab. QGIS has automatically updated your server list, and the selected search result is already enabled in the list of saved WMS servers in the Layers tab. You only need to request the list of layers by clicking the [Connect] button. This option is quite handy when you want to search maps by specific keywords.
Practic, această opțiune este un front-end pentru API-ul de la http://geopole.org.
Atunci când se utilizează servicii WMTS (Cached WMS), cum ar fi
http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?\
service=WMTS&request=GetCapabilities
you are able to browse through the Tilesets tab given by the server. Additional information like tile size, formats and supported CRS are listed in this table. In combination with this feature, you can use the tile scale slider by selecting Settings ‣ Panels (KDE and Windows) or View ‣ Panels (Gnome and MacOSX), then choosing Tile scale. This gives you the available scales from the tile server with a nice slider docked in.
Once you have added a WMS server, and if any layer from a WMS server is queryable, you can then use the Identify tool to select a pixel on the map canvas. A query is made to the WMS server for each selection made. The results of the query are returned in plain text. The formatting of this text is dependent on the particular WMS server used.
Selecția Formatului
If multiple output formats are supported by the server, a combo box with supported formats is automatically added to the identify results dialog and the selected format may be stored in the project for the layer.
Suport pentru formatul GML
The Identify tool supports WMS server response (GetFeatureInfo) in GML format (it is called Feature in the QGIS GUI in this context). If “Feature” format is supported by the server and selected, results of the Identify tool are vector features, as from a regular vector layer. When a single feature is selected in the tree, it is highlighted in the map and it can be copied to the clipboard and pasted to another vector layer. See the example setup of the UMN Mapserver below to support GetFeatureInfo in GML format.
# in layer METADATA add which fields should be included and define geometry (example):
"gml_include_items" "all"
"ows_geometries" "mygeom"
"ows_mygeom_type" "polygon"
# Then there are two possibilities/formats available, see a) and b):
# a) basic (output is generated by Mapserver and does not contain XSD)
# in WEB METADATA define formats (example):
"wms_getfeatureinfo_formatlist" "application/vnd.ogc.gml,text/html"
# b) using OGR (output is generated by OGR, it is send as multipart and contains XSD)
# in MAP define OUTPUTFORMAT (example):
OUTPUTFORMAT
NAME "OGRGML"
MIMETYPE "ogr/gml"
DRIVER "OGR/GML"
FORMATOPTION "FORM=multipart"
END
# in WEB METADATA define formats (example):
"wms_getfeatureinfo_formatlist" "OGRGML,text/html"
Vizualizarea Proprietăţilor
După ce ați adăugat un server WMS, îi puteți vizualiza proprietățile printr-un clic-dreapta pe el, în legendă, și prin selectarea Proprietăților.
Fila Metadatelor
The tab Metadata displays a wealth of information about the WMS server, generally collected from the capabilities statement returned from that server. Many definitions can be gleaned by reading the WMS standards (see OPEN-GEOSPATIAL-CONSORTIUM in Literatură și Referințe Web), but here are a few handy definitions:
Proprietăţile serverului
Versiunea WMS — Versiunea WMS acceptată de server.
Proprietăţile stratului
Selectat — Indiferent dacă acest strat a fost sau nu selectat, atunci când serverul său a fost adăugat în acest proiect.
Poate Identifica — Dacă acest strat va returna un rezultat, sau nu, atunci când este folosit instrumentul Identificare asupra lui.
Numărare în Cascadă — Serverele WMS pot acționa ca un proxy pentru alte servere WMS, pentru a obține datele raster ale unui strat. Această intrare arată de câte ori este transmisă cererea pentru acest strat către alte servere WMS, pentru obținerea unui rezultat.
Disponibil în CRS — Proiecțiile în care poate fi randat acest strat de către serverul WMS. Acestea sunt prezentate în format nativ WMS.
Disponibil în stil — Stilurile de imagine în care poate fi randat acest strat de către serverul WMS.
The QGIS WMS data provider is able to display a legend graphic in the table of contents’ layer list and in the map composer. The WMS legend will be shown only if the WMS server has GetLegendGraphic capability and the layer has getCapability url specified, so you additionally have to select a styling for the layer.
If a legendGraphic is available, it is shown below the layer. It is little and you have to click on it to open it in real dimension (due to QgsLegendInterface architectural limitation). Clicking on the layer’s legend will open a frame with the legend at full resolution.
In the print composer, the legend will be integrated at it’s original (dowloaded) dimension. Resolution of the legend graphic can be set in the item properties under Legend -> WMS LegendGraphic to match your printing requirements
The legend will display contextual information based on your current scale. The WMS legend will be shown only if the WMS server has GetLegendGraphic capability and the layer has getCapability url specified, so you have to select a styling.
Not all possible WMS client functionality had been included in this version of QGIS. Some of the more noteworthy exceptions follow.
Editarea Setărilor Stratului WMS
Once you’ve completed the Add WMS layer procedure, there is no way to change the settings. A work-around is to delete the layer completely and start again.
Cerințele de autentificare ale Serverelor WMS
Currently, publicly accessible and secured WMS services are supported. The secured WMS servers can be accessed by public authentication. You can add the (optional) credentials when you add a WMS server. See section Selectarea serverelor WMS/WMTS for details.
Tip
Accesarea straturilor OGC securizate
If you need to access secured layers with secured methods other than basic authentication, you can use InteProxy as a transparent proxy, which does support several authentication methods. More information can be found in the InteProxy manual at http://inteproxy.wald.intevation.org.
Tip
QGIS WMS Mapserver
Since Version 1.7.0, QGIS has its own implementation of a WMS 1.3.0 Mapserver. Read more about this in chapter QGIS as OGC Data Server.
Un Serviciu de Acoperire Web (WCS) oferă acces la datele raster, în forme care sunt utile pentru randarea pe partea clientului, ca date de intrare în modelele științifice, precum și pentru alți clienți. WCS poate fi comparat cu WFS și WMS. La fel ca și instanțele serviciilor WMS și WFS, un WCS permite clienților să aleagă porțiuni din informațiile serverelor, bazate pe constrângeri spațiale și pe alte criterii de interogare.
QGIS has a native WCS provider and supports both version 1.0 and 1.1 (which are significantly different), but currently it prefers 1.0, because 1.1 has many issues (i.e., each server implements it in a different way with various particularities).
The native WCS provider handles all network requests and uses all standard QGIS network settings (especially proxy). It is also possible to select cache mode (‘always cache’, ‘prefer cache’, ‘prefer network’, ‘always network’), and the provider also supports selection of time position, if temporal domain is offered by the server.
In QGIS, a WFS layer behaves pretty much like any other vector layer. You can identify and select features, and view the attribute table. Since QGIS 1.6, editing WFS-T is also supported.
În general, adăugarea unui strat WFS este foarte similară cu procedura utilizată pentru WMS. Diferența este că nu există servere standard definite, așa că trebuie să-l adăugăm pe al nostru.
Încărcarea unui strat WFS
Ca exemplu, vom folosi serverul WFS de la DM Solutions pentru a afișa un strat. URL-ul este: http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap
Clic pe instrumentul Add WFS Layer din bara de instrumente a Straturilor. Va apărea dialogul Add WFS Layer from a Server.
Clic pe [Nou].
Introduceți ‘DM Solutions’ ca nume.
Introduceți URL-ul (a se vedea mai sus).
Clic pe [OK].
Clic pe [Conectare].
Așteptați ca lista de straturi să fie populată.
Selectați stratul Parks din listă.
Clic pe [Apply] pentru a adăuga stratul la hartă.
Rețineți că orice setări proxy stabilite în preferințe sunt, de asemenea, recunoscute.
Figure OGR 3:
You’ll notice the download progress is visualized in the lower left of the QGIS main window. Once the layer is loaded, you can identify and select a province or two and view the attribute table.
Numai WFS 1.0.0 este acceptat. În acest moment, nu au existat multe teste asupra versiunilor WFS implementate în alte servere. Dacă întâmpinați probleme cu oricare alt server WFS, vă rugam să nu ezitați să contactați echipa de dezvoltare. Vă rugăm să consultați secțiunea Asistență și Ajutor pentru mai multe informații despre listele de discuții.
Tip
Găsirea Serverelor WFS
You can find additional WFS servers by using Google or your favorite search engine. There are a number of lists with public URLs, some of them maintained and some not.