Asset Publisher

TMS services management


 

TMS services management

TMS, Tile Map Service, is a protocol for accessing maps based on the division of maps into tiles.

In general terms, a TMS service is a data source that provides map images in raster format divided into small tiles. These tiles are downloaded and displayed separately to form the complete map.

CartoDruid is a very useful tool for creating cartographic projects that incorporate different layers of information, including raster layers that consult TMS services. Its configuration is simple and can be done manually or through the user interface provided by the application. When using TMS services in CartoDruid, it is important to take into account that each service has its own specifications and parameters, such as image format, scale, zoom level, etc. Therefore, it is necessary to know well the service you want to use and configure it properly in CartoDruid in order to be able to display the maps correctly.

You will be able to build a catalogue of services that you will use to add Raster layers to your project.

Index

 

TMS Catalogue

 

To access the TMS catalogue of our project, we will carry out the following actions:

  1. We expand the table of contents (TOC) of the application by clicking on the CartoDruid icon and click on the add layer button in the lower left corner of the TOC.
  2. Select the option "Raster Layer".
  3. Select the option "TMS Layer".

The actions we can perform on the TMS catalogue will be:

  1. Create a New Group that we will use to group different services.
  2. Create a New TMS Service.
  3. Actions specific to each service:
    • Load: Will add a raster layer to your project with the data resulting from the request to the TMS service.

    • Edit: Will open a dialog where you can modify the parameters of the TMS request.

       
    • Delete: Will remove the TMS service from our catalogue.

       
       
    • Move to: Move the TMS service to another group in the catalogue.

       

TMS Group

Clicking on the icon will open the following dialogue:

Enter the name of the new group and click OK to return to the "WMS Catalogue" screen with the new group created.

New TMS Service

 

Clicking on the icon
will open the following dialogue:

Enter the parameters of the TMS request: name, description, path to the on-line service, ... Click on accept to return to the "TMS Catalogue" screen with the new service added to the Default group. From the Move to... option of the service we will move it to the group to which the service will belong.

The URL of the link: http://example.com/{z}/{x}/{y}.png.

  • The x and y values are the coordinates of the mosaic
  • Z is the zoom level

To invert the axis use {-y}. Indicates that the tiles are numbered from top to bottom, instead of the usual bottom to top direction. This may be necessary in some cases where a software library is used that requires the tiles to be numbered in this way in order to function correctly.

 

Manual configuration TMS Catalogue

 

For each project we have configured in CartoDruid, there will be a file tmsRepository.«id_proyecto».json in the folder cartodroid/config/. This file stores the TMS catalogue defined and configured for the project.

By default with the installation of CartoDruid a tmsRepository.json file is included without content to work with the basic project.

If you have a list of TMS that you want to use in your project, you can configure it by hand by modifying this file.

An example of this file:

[
  {
    "group": "Default",
    "type": "TMS",
    "url": "https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",
    "name": "CARTO",
    "description": "Descrp",
    "rangeMin": "0",
    "rangeMax": "21",
    "invertAxisOrientation": "N"
  },
  {
    "group": "Group_1",
    "type": "TMS",
    "url": "http://www.google.cn/maps/tv?lyrs=s@189&gl=cn&x={x}&y={y}&z{z}.png",
    "name": "Google Sat",
    "description": "Desc Google Sat",
    "rangeMin": "0",
    "rangeMax": "21",
    "invertAxisOrientation": "N"
  },
  {
    "group": "Group_2",
    "type": "TMS",
    "url": "http://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png",
    "name": "Opnvkarte",
    "description": "Opnvkarte",
    "rangeMin": "0",
    "rangeMax": "21",
    "invertAxisOrientation": "N"
  }
]
  • group: Name of the group to which the service belongs.
  • type: Type or version: TMS.
  • url: Route to the online service.
  • name: Name of the layer to be displayed in the TOC (table of contents).
  • description: Description of the layer to be displayed in the TOC.
  • rangeMin: Minimum zoom level at which the layer will be visible.
  • rangeMax: Maximum zoom level at which the layer will be visible.
  • invertAxisOrientation: Indicates whether the y-axis will be inverted.