MapInfo Pro

 View Only
  • 1.  MapInfo Monday: Publishing a named map as a WMTS Service from Spectrum Spatial

    Employee
    Posted 08-30-2021 09:04
    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.


    Now click on WMTS to configure your Spectrum Spatial WMTS Service.

    On the WMTS page, you can add a new WMTS layer using the button at the top of the WMTS Layers.


    To create a new WMTS Layer, you need to select the Reference Tile which is the Tile that we created earlier. You also need to specify an Identifier and a Title for your new WMTS Layer. The Identifier is a unique name for your WMTS Layer where the Title is more descriptive and can contain special characters and spaces. You also need to provide a Layer Name which often can be the same as the Identifier.


    Configuring your WMTS Service

    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
    ------------------------------


  • 2.  RE: MapInfo Monday: Publishing a named map as a WMTS Service from Spectrum Spatial

    Posted 08-31-2021 04:18
    Hello Peter, thanks for this thorough guide. I would only add that, if you're planning to use the Tile-Generator utility to pre-seed the tiles, the tool won't like SPACES or UNDERSCORES ("_") in the url of the Spectrum Tile. There could be other characters that the tool doesn't like. Using those characters will result in an "illegal character" exception when running the Tile-Generator utility. Hence, avoid using those characters when creating the Spectrum Tile. At least this is how it was in 2018.2. I haven't tested in Spectrum Spatial 2020.1 yet.

    Kind regards,

    ------------------------------
    Miquel Roy Sunyer
    Kirklees Council
    HUDDERSFIELD
    ------------------------------



  • 3.  RE: MapInfo Monday: Publishing a named map as a WMTS Service from Spectrum Spatial

    Employee
    Posted 08-31-2021 06:02
    Thanks, Miquel

    That's helpful information you share. Especially that it doesn't like underscores does surprise me.

    Thanks for sharing this

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------