Salta el contingut

Create WMS Service (Raster)

One of the other options offered by the Geoportal administrator is to create WMS services from rasters.

In the administrator, this aspect is managed in the raster layer manager.

Screenshot

  • Layers: refers to loading or editing raster layers.
  • Masks: mask to clip a layer. It consists of loading a file with the shape of the municipality or geospatial shape desired to clip the layer according to interest.
  • Services: create services. We can add as many layers as needed to each service.

Create Raster Layers

Add Layer

To add a raster layer, click on Add and it will redirect you to the following window.

Screenshot

  • Name: name of the layer.

  • Title: name that will be displayed in the Geoportal.

  • Group: group to which it belongs.

  • Projection: EPSG code projection of the image file.

  • Extent: read-only. After loading the layer, it shows the area it occupies on the territory.

  • Named mask: to choose a mask or upload a new one (see how to create masks in the next section of this document).

  • Mask file: mask file to be uploaded (see how to create masks in the next section of this document).

  • Image: path of the image file on the server or the folder containing the images. The image must have been previously uploaded to the server folder correctly using FileZilla or similar. Ask your provider for the default path to upload images and create WMS.

Multiple images

We can generate a WMS layer with multiple images by indicating the folder path that contains all the images on the server. The folder is expressed with a slash / at the end.

Modify Layer

To modify the layer and its characteristics described above, just click on Modify and it will redirect you to the list of all the existing layers, where you can enter each one to modify the aspects mentioned earlier. You also have the possibility to select and delete them, or perform searches by names.

Screenshot

Create Masks

Add Mask

To add a new mask, click on Add and it redirects to the following window:

Screenshot

  • Name: name of the mask.

  • Projection: EPSG code, same as raster layers for matching.

  • Mask: to select a mask file and load it. A mask file is a ZIP file that contains the three main files of the Shapefile format (.shp, .dbf, and .shx) with geometry type Polygon.

Mask Information

The geometries of the SHP file used as a mask must be of the polygon type. Geometries multipatch or * geometrycollection do not work. If we have a MultiPatch* geometry, we can use QGIS to transform it into a polygon.

It supports polygons with holes correctly.

Modify Mask

To modify an existing mask, click on Mask or Modify, and make the relevant modifications.

Create WMS Services from a Raster

Add Raster Service

To add a raster service, raster layers must have been created as explained in the previous section. To add it, click on Add, and it will direct you to the following window, which has 4 tabs to fill in:

In each service, you must indicate the layers you want to publish in the Layer Service options group.

Information

In the first tab, fill in the basic information. For more information about the fields, see: Information, layer properties

If you need to add a new category: Add new category

While all fields are the same for all layers, there is a specific option for this type of data, which is the option to add new raster layers. If they are already created, simply choose from the drop-down; if not, clicking on the + icon will redirect you to the previous sections to create raster layers.

Screenshot

Options

Screenshot

  • Projection: projection of the raster service with EPSG code.
  • Supported SRS: indicate all the EPSG codes that we want the service we are creating to support, separated by commas.
  • Name: name of the WMS raster service.
  • Options: options when loading the WMS on the Geoportal map. These options depend on the Geoportal’s map client library, usually Leaflet; check the available options at: WMS Options

Design

To define a legend in the layer information panel: Legend Information

Metadata

Metadata editing: Metadata Information

Modify Raster Service

To modify already created services, click on Services or Modify, and the following window will appear. You can search for services by name, filter them, select them to delete them, or click on them to modify them according to the characteristics explained above.

Screenshot

Service URL

Once the service is created, you can get the URL directly from the list of services: Home › Raster Layer Manager › Services

Screenshot

Service Test

You can check that the service is running correctly from the “view map” option, once you are in the service editing form.

Screenshot