MapInfo Pro

 View Only

MapInfo Monday: Using Raster Images as a Base Map

  • 1.  MapInfo Monday: Using Raster Images as a Base Map

    Employee
    Posted 08-05-2024 05:56
    Edited by Peter Møller 08-05-2024 06:04

    These days it is quite easy to get a base map into your map. You click on a button and there you go: Bing or Precisely Maps at your fingertip!

    Back when I started using GIS and MapInfo Pro, OGC WMS, OGC WMTS, and Tile Servers were unknown. This means all your data had to be locally on your computer or a network drive. Getting a base map was a different story back then. In fact, this can still be the case for some users out there who, often for security reasons, aren't granted internet access.

    So how can you create a base map in these situations? That's what we will dive into in this article.

    For this purpose, I have looked at the Ordnance Survey website to see what data is available for free with a free account for the OS Data Hub. Not all countries to provide free access to mapping data but more and more countries do. So check your specific country to see what is available.

    As you know data comes in various forms; vector or raster. In this article, I will focus on raster but there is also an option to use vector data as your base map. In the image above, you can see the 6 datasets available from the OS Data Hub when it comes to mapping (base maps) that are downloadable.

    As we are looking for raster base maps, you will most likely have to download several datasets to get base maps for different scales.

    Let's start by downloading the MiniScale which gives you a decent map of the United Kingdom. This comes as a single image covering the entire country in various formats and colors.

    You can open it into MapInfo Pro via the Open dialog. Just select Raster Image in the File of Type list.

    This works well at certain scales but as you zoom in, you would be looking for more details. This would require another dataset.
    I downloaded the dataset 1:250 000 Scale Color Raster. Now it starts to get more tricky. This dataset comes as multiple images.
    You can still open these into MapInfo Pro via Open dialog. Switch to Raster Image again and also make sure to select Current Mapper from the Preferred View list instead of Automatic.
    In MapInfo Pro, you can create a new folder in the Layer List and move all these images to that folder. This gives you the ability to only see the folder and not all the layers in map.
    As you now have two base maps, you want to control when to see which. You can do this via Zoom Layering for the layers. Select all these raster layers for the 1:250 000 Scale Color Raster dataset. Now right-click on one of the layers and click on Layer Properties. In the Layer Properties dialog, enable Display within Zoom Range and specify a minimum and maximum zoom for the layers.
    Once set, the layers will only be visible when you are within the specified zoom range.
    Instead of opening these many images individually, you can create a seamless table for them. A seamless table refers to several tables and will open the layers that would be visible in the current map extent. As a user, you would only see the seamless table in MapInfo Pro, not the individual tables opened by the seamless table.
    Let's investigate this part for the next dataset, the OS Vector Map District.
    This dataset comes as almost 3,000 raster images. That is just too many raster images to open individually in MapInfo Pro. Let's create a seamless table from these.
    First, we need to get them all into a single folder. When you unzip the downloaded zip file, the images are saved into several subfolders based on the OS Grid. This has it benefits but is a bit of a pain if you are looking to create a seamless table.
    There is an easy way to move all these files from their subfolder into another folder.
    First, we need to use Windows Explorer to search for all the images. In Windows Explorer in the Search field, I enter "*.tif" to get all the images listed. Once the Search has returned all the files, click on one of the files and then use the Ctrl + A shortcut to select all files. Now use the Ctrl + X shortcut to clip all the files from their current location.
    Go to the folder where you want the files to be stored and use Ctrl + V to move the files from their current location to the new location.
    Now we have all the images stored in a single folder which makes it easier when working with them in MapInfo Pro.
    Go back into MapInfo Pro. MapInfo Pro v2023 comes with a new tool called Build Seamless Raster Table. From the Registered tab in the Tools window, double-click on the tool to load it.
    Now double-click on the tools again in the Running tab to run the process to create a new seamless table from images in a folder.
    First, you will have to select a single raster image from the folder where you inserted all the files. This will tell the tool from what folder to search for additional raster files.
    Secondly, you need to specify a name for the seamless table. You can just type in a table name in the Outpur Seamless TAB File field. The table will be created in the folder above.
    Click OK to process the raster images and create the seamless table. This may take up to an hour.
    Once done, open the new seamless table created. I have seen issues where the new seamless table has to be closed and reopened for the content to show on a map.
    Below you can see how this seamless table looks when zoomed into an area around a city. On the left, you can see the 3 base maps as individual layers each with a Zoom Layering setting controlling when to display the layer.
    Even though I showed how to open the 56 individual images from the dataset 1:250 000 Scale Color Raster into MapInfo Pro, I really would suggest that you create a seamless table for that dataset too.
    Here's a dynamic GIFF showing the base maps as they change during zoom. I haven't spent too much time setting the zoom intervals which probably could be improved slightly.
    I have just used 3 of the six base maps. You can get even more details by also using the dataset OS OpenMap Local.
    Do you need to have your base maps locally? Happy #MapInfoMonday!



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