Happy #MapInfoMonday,
We have earlier touched
upon Spectrum Spatial in the #MapInfoMonday article series. Today we will look at how you can publish a named map as a WMTS Service through Spectrum Spatial Manager and how you can access this WMTS Service in MapInfo Pro.
In
an earlier article, we looked at taking advantage of the Ordnance Survey WMTS Service in MapInfo Pro. Today, we will look at how you can distribute your own data internally to your users by using Spectrum Spatial as a WMTS Server. In that article, you can also read more about the WMTS specification.
Named Map in Spectrum Spatial
A Named Map in Spectrum Spatial can be compared to a workspace in MapInfo Pro with a single map window. The Named Map holds references to tables, specifies the layers and their configurations.
You can create Named Maps in a number of ways. Coming from MapInfo Pro, the easiest method probably is to use the Map Uploader tool to publish an existing map window from MapInfo Pro to Spectrum Spatial. This will create a Named Map in the repository that you can view via Spectrum Spatial Manager (from now on referred to as Spatial Manager). Before uploading the Named Map to Spectrum Spatial, you need to ensure that Spectrum Spatial has access to the tables used as the Map Uploader only creates the Named Map. It doesn't upload the tables.
In Spatial Manager, you can view the details of a Named Map, and also preview the map itself. In this example, we are using the
Precisely StreetPro dataset. This holds a lot of details as you zoom into the map. You can use any base map you want to be served through the WMTS Service.
Creating a Named Tile
Once you have your Named Map resource in Spatial Manager, you are ready to create a new resource that is needed in your WMTS Layer, a Named Tile.
From the
Create dropdown in the Repository view in Spatial Manager, select
Tile.
From the
Create Tile page, you can configure the Tile you want to publish. A couple of the important steps are:
- Select the Reference Ressource: This is typically the Named Map, that you want to publish via your WMTS Service.
- Coordinate System: Here you can select the coordinate system that your WMTS Service will be using. The most common is Popular Visualization (EPSG:3857) but you can also select a commonly used coordinate system for your local area or country.
- New Tile Name: This is the name of the Tile you are creating. You will need this name when configuring your WMTS Layer later on.
If you select
Custom Bounds, you will be able to enter the bounds for your tile. Alternatively, the tile will be using the bounds of the coordinate system.
If you click the
Advanced Settings, you will be able to modify the lifetime of the cached tiles, the
Tile Levels, and a couple of more advanced settings. Typically, you can keep these settings as they are.
Click
Create in the top right corner to create the new Tile.
Create WMTS Layer
The next step is to create the new WMTS Layer. Click on the
Services tab in the menu at the top.
You should also take a look at the other configurations of your WMTS Service if this is the first WMTS Layer you are creating.
On the
Settings tab, you can access the settings for the WMTS Service. The Service Settings provides you with the Service URL that the WMTS clients need to use in order to access the WMTS Service. You can here also control the
Cache Settings. If you apply a cache that is recommended, you also need to specify the location for the cached tiles.
Please note that the tiles will be cached as they are served to clients. The tiles will not be pre-generated unless you do this explicitly. This can be done using a tool supplied with Spectrum Spatial. You can read more about
these Utilities in the Spectrum Spatial documentation.
From the
Service Info tab, you can enter details about your WMTS Service such as a
Title, an
Abstract, and
Contact Information. These details will be embedded in the Capabilities document that is sent to the WMTS clients.
From the
Capabilities tab, you can see the configuration that is sent to the WMTS clients when accessing the WMTS Service.
Using the WMTS Service in MapInfo Pro
As we now have created the necessary resources and services on our Spectrum Spatial instance, we can start using the WMTS Layer in MapInfo Pro.
In MapInfo Pro access the
Open WMTS Table from the
Open dropdown.
In the
Open WMTS Table dialog click on
Servers... in the top right corner. Then click on
Add... in the top right corner of the
WMTS Servers List dialog.
Now you have to enter the URL to your WMTS Service. You can copy this URL from the
Service Settings tab for your WMTS Service in Spatial Manager. Hit the
Get Description button to request the name from your service. You can afterward alter this if you prefer a different name to be displayed inside MapInfo Pro.
Click
OK twice to get back to the
Open WMTS Table dialog where you now can select the WMTS Layer you want to open in MapInfo Pro. Give the table a name and also consider where to create the WMTS table on your hard drive. By default, MapInfo Pro is using the
WMTS Tables Directory configured via the
Options.
Finally, click
OK to open the WMTS Table into a map in MapInfo Pro.
If you haven't used the Spectrum Spatial utility to pre-generate the tiles, you will notice that the performance improves as you come back to areas you already have accessed as this will start using the cached tiles from the server instead of Spectrum Spatial has to render the tiles.
MapInfo Pro is just one example of a client that can benefit from accessing data through a WMTS Service. You can also use this service to give people outside of your organization access to this data as a base map. Also note that by default, you need to log in to be able to access these services. Your log-in details can be stored locally, and you only need to provide these details once per session.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------