5. Configuring external service layers in Union VMS application

To integrate external WMS layers in the UnionUVMS application you will need to directly connect to the spatial database shipped with UnionVMS and:

1. Insert a new row in the “service_layer” table. Let’s assume you wish to integrate an external layer from the GEBCO Web Map Service. You would need to do the following configuration:

Attribute NameExample ValueAdditional Note

id

 

Automically generated

name

Elevation grid

The name of the layer as it will be displayed in the application. Mandatory.

layer_desc

GEBCO 2014 elevation grid

The layer description as it will be displayed in the application. Not mandatory.

provider_format_id

2

In the current release only WMS is supported. The value 2 indicates the application that this layer is a WMS. Mandatory

service_url

http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv

You must provide the external URL from where the services are being made available

geo_name

GEBCO_LATEST_2

The name of the layer as specified in the map server. Mandatory.

srs_code

 

The EPSG code of the layer. Not mandatory.

short_copyright

Some short notice

The short copyright notice as it will be displayed in the application. Not mandatory.

long_copyright

Some big notice

The Long copyright notice as it will be displayed in the application. Not mandatory.

is_internal

N

Either Y or N. Mandatory. External layers should always be configured with N.

style_geom

 

The name of the style as it is stored in your map server. This style should only display geometries. Not mandatory.

style_label

 

The name of the style as it is stored in your map server. This style should only display labels. Not mandatory.

style_label_geom

 

The name of the style as it is stored in your map server. This style should display geometries and labels. Not mandatory.

subtype

additional

Newly added layers should always be classified as additional, background or others. If additional, it will be possible to add the layer in UnionVMS as additional cartography. If background, it will be possible to add the layer in UnionVMS as a background. If others, it will be possible to add the layer in UniomVMS both as background and additional cartography.Mandatory.


2. Insert a new row in the “area_location_types” table in the spatial db. For the current example, the necessary configurations would be like the following:

Attribute NameExample ValueAdditional Note

id

 

Automically generated

service_layer_id

The id that was generated in the service_layer table

The id of the layer as displayed after completing the configurations of the previous step (1). Mandatory.

type_name

GEBCOGRID2014

The desired type name for the layer. Mandatory and should not be equal to any other type name already existent. No spaces or special characters should be used.

area_type_desc

Some description

Generic description. Not mandatory

area_db_table

NA

Should always be NA for external layers. Mandatory.

is_system_wide

N

Should always be N for external layers. Mandatory.

is_location

N

Should always be N for external layers. Mandatory.


3. Finally, you will need to connect to the USM database and manually insert a new row in the “dataset_t”  table. For the current example, the necessary configurations would be like the following:

Attribute NameExample ValueAdditional Note

dataset_id

 

Automically generated.

name

GEBCOGRID2014

The exact same name layer as configured in type_name of the previous step (2). Mandatory.

layer_desc

GEBCO 2014 elevation grid

The layer description as it will be displayed in the application. Not mandatory.

description

Some description

A description that will be shown in the frontend USM application. Mandatory

category

service layer

Should always be service layer. Mandatory.

discriminator

SPATIAL_SERVICE_LAYER

Should always be SPATIAL_SERVICE_LAYER. Mandatory.

application_id

12

The same id as the one displayed for other records that are service_layer. Mandatory.

created_by

USM2

Should always be USM2. Mandatory.

created_on

2016-06-23 14:34:02.47099

A date in the format: YYYY-MM-DD HH:MM:SS.SSSS. Mandatory.

4. Login in the Union VMS application as a User Administrator and associate the new service layer (which should be displayed in datasets) to each scope you wish to.