7.6. WFS, WMS, TMS layers

NextGIS Web allows to add data from external sources using standard protocols: WFS, WMS, TMS.

Also, you can make a layer based on a PostGIS database.

7.6.1. WFS

WFS allows to get data published on third-party GIS servers (arcgis, geoserver etc), apply custom styles to them and add them to Web Maps.

First you need to create a WFS connection.

7.6.1.1. WFS connection

Click Create resource button and select WFS connection.

../../_images/ngweb_create_wfs_conn_en.png

Pic. 7.46. Selecting “WFS connection” resource type

Next you can enter a custom name that will be displayed in the resource list.

../../_images/wfs_connection_name_en.png

Pic. 7.47. Name for WFS connection

Also you can add Description and metadata.

On the “WFS connection” tab enter the parameters that will be used to connect to the WFS server providing the data:

  • URL

  • Username

  • Password

  • WFS version

../../_images/wfs_connection_set_en.png

Pic. 7.48. WFS connection settings

If the version you selected is not supported, you’ll get an error message after clicking Create:

../../_images/wfs_connection_error_en.png

Pic. 7.49. Error message for incorrect WFS version

Next you can create WFS layer resource.

7.6.1.2. WFS Layer

WFS Layer is added using an existing WFS connection. Select the resource type in the Create resource menu.

../../_images/ngweb_create_wfs_layer_en.png

Pic. 7.50. Selecting “WFS layer” resource type

In the opened window in the “WFS layer” tab select the WFS connection you created. Next select the layer and the geometry field. SRID will be added automatically.

../../_images/wfs_layer_settings_en.png

Pic. 7.51. WFS layer settings

On the “Resource” tab you can set a custom name for the resource. Also you can add Description and metadata.

To add a WFS layer to a Web Map, you need to create a style for it. You can create a default QGIS style or a custom QGIS or Mapserver style using “Create resource” menu.

../../_images/wfs_layer_result_en.png

Pic. 7.52. Two ways to add a style to WFS layer

7.6.2. WMS

Note

Currently supported WMS versions are 1.1.1 and 1.3.0.

NextGIS Web is a WMS client. To connect a WMS layer you need to know its address.

WMS server should be able to serve it using a coordinate system EPSG:3857.

The code must be 3857, not 900913.

You can check if this coordinate system is available for a particular layer by making a GetCapabilites request to a server and examining the response.

7.6.2.1. WMS Connection

To add a WMS layer you need to create a resource called WMS connection. You may create a single connection for many layers. Click Create resource button and select WMS connection (see Pic. 7.53.).

../../_images/ngweb_create_wms_conn_en.png

Pic. 7.53. Selecting “WMS connection” resource type

Create resource dialog for WMS connection is presented on Pic. 7.54.. Enter the name of the resource that will be displayed in the administrator interface. Not to be confused with layer name in a database. “Keyname” field is optional.

../../_images/create_wms_connection_name_en.png

Pic. 7.54. Name for WMS connection

Also you can add Description and metadata.

Here enter the following WMS server connection parameters:

  • URL

  • Username

  • Password

  • Version of WMS protocol

  • Capabilities (manages GetCapabilities queries to the WMS Server)

URL field needs to be filled, others are used when necessary.

../../_images/create_wms_connection_url_en.png

Pic. 7.55. WMS connection tab of Create resource dialog

After setting up all necessery parameters, click Create.

7.6.2.2. WMS layer

Now you can add WMS layers. Open the resource group where you want to create the layer. Click Create resource button and select WMS layer (see Pic. 7.56.).

../../_images/ngweb_create_wms_layer_en.png

Pic. 7.56. Selecting “WMS layer” resource type

Enter display name that will be visible in administrator interface and in the map layer tree.

../../_images/create_wms_layer_name_en.png

Pic. 7.57. WMS layer name

Tile cache settings are described in details in this section.

Switch to the “WMS layer” tab, which is presented on admin_layers_create_wms_layer_parameters and perform the following steps:

  1. Select the WMS connection that was created earlier.

  2. Select the appropriate MIME-type from the dropdown list.

  3. Select the required layers from the list by clicking the underlined names. You can select several layers.

../../_images/create_wms_layer_parameters_en.png

Pic. 7.58. WMS layer parameters tab

../../_images/create_wms_layer_select_res_en.png

Pic. 7.59. Selecting WMS connection

In the last tab you can add vendor parameters. These are special query settings for additional functions. They vary depending on the WMS provider.

../../_images/create_wms_layer_vendorparam_en.png

Pic. 7.60. Vendor parameters of the WMS layer

Also you can add Description and metadata.

After setting up all necessery parameters, click Create.

Warning

Identification requests to external WMS layers from Web Maps are not supported yet.

7.6.3. TMS

To add data from external sources using TMS protocol, first create TMS connection.

Note

Data uploaded to NextGIS Web, can also be added to external application via TMS.

7.6.3.1. TMS connection

To add a TMS layer, you first need to create a TMS connection. Click on Create resource button and select TMS connection (see TMS_connection_create_en).

../../_images/ngweb_create_tms_conn_en.png

Pic. 7.61. Selecting TMS Connection resource type

Enter the connection name that will be displayed in the administrator interface (see TMS_connection_name_en).

../../_images/TMS_connection_name_en_3.png

Pic. 7.62. TMS Connection Resource Name

Also you can add Description and metadata.

On the TMS connection tab you need to select the way to connect to the TMS server - custom or via NextGIS GeoServices (see TMS_connection_type_en).

../../_images/TMS_connection_type_en_3.png

Pic. 7.63. Configuring TMS Connection

In the case of a custom connection method, the user must specify the URL template, API key parameters if needed and the tile scheme used. For NextGIS GeoServices, only a custom API key is specified. After filling in all fields click Create to complete the process of creating a TMS Connection resource.

7.6.3.2. TMS layer

TMS layer resource is created using previously created TMS Connection. Click on Create resource button and select TMS layer (see TMS_layer_create_en).

../../_images/ngweb_create_tms_layer_en.png

Pic. 7.64. Selecting TMS layer resource type

Enter the name that will be displayed in the administrator interface (see TMS_layer_name_en).

../../_images/TMS_layer_name_en_3.png

Pic. 7.65. TMS layer name

Caching provides faster rendering of Web Map layers. Tile cache settings are described in details in this section.

The main display settings are on the TMS layer tab (см. TMS_layer_settings_en):

  • TMS connection - select a TMS connection resource that was created earlier;

  • The range of zoom levels for data display;

  • The extent in degrees;

  • Tile size in pixels.

../../_images/TMS_layer_settings_en_3.png

Pic. 7.66. TMS layer settings

After creating a TMS layer, the user can add it to the Web Map to display. No style is needed.