MapInfo Pro

 View Only

MapInfo Monday: Raster Grid Legends

  • 1.  MapInfo Monday: Raster Grid Legends

    Posted 05-23-2022 05:52
    Happy #MapInfoMonday!

    Today, we will look at creating legends for raster grid datasets in MapInfo Pro.

    Legends are an essential part of a map​ as it helps users understand the data visible on the map. In MapInfo Pro, you can create legends for your vector layers, your thematic layer, and of course also for your raster layers.

    The process for all these different layers is in fact quite similar. Let's see how this is done specifically for raster layers.

    I have a very simple map that only contains elevation data for a small area in Denmark. The map also has a base map but for now, I'll not turn that on.

    Adding a Legend for at Raster Dataset

    From the Add to Map dropdown on the Map tab, select Legend. This will initiate the Create Legend Guide.

    The Create Legend Guide helps you create a new legend or add new layers to an existing legend.

    The first step is to select the layers for which you want to create a legend. The dialog Create Legend - Choose Layer will only show those layers that don't already have a legend for the current map window.

    By default, the list Legend Frames will hold all the layers that can get a legend created and don't already have one. You can use the << Remove button to remove layers from this list.

    Click Next to move to the second step in the Create Legend Guide.

    In the dialog Create Legend - Legend Default Properties you can set default values for the Legend window and the frames that will be added to the Legend window. You can afterward modify these settings for the Legend window.

    Click Next to continue to the third step.

    In the Create Legend - Frame Properties you can control the specific settings for each legend frame you are about to create. Each layer will appear in the Legend Frames list and you can select the individual layers and control their display. The settings vary from layer type to layer type.

    Click Finish to create your legend. I my example, I didn't change any of the default settings which also meant that I could have clicked the Finish button in the first dialog, Create Legend - Choose Layer, after having selected the layers.

    The resulting legend for my raster layer looks like the example below.

    Modifying a Legend for at Raster Dataset

    Once you have created your legend, you can also modify it. In my example, I would prefer my legend to be horizontal instead of vertical. I can right-click on the legend frame and select Modify Legend Frame Properties or just double-click on the legend frame I want to modify.

    The content of the Legend Frame Properties dialog will depend on the layer type. For a raster layer, I can set the orientation of the color bar, the legend. I change mine from Vertical to Horizontal. When doing so, I would also recommend that you click the Clear all Label ordering button above the label example. If you don't, the order will be from the larger values towards the lower values as that's the default order for a vertical legend.

    When you click OK, the legend will now look like this

    And keep in mind that the legend is linked dynamically to the raster dataset. This means that if you modify the display of the raster itself, the legend will also change.

    Imagine you decide to change the color scheme used for your elevation data. This can be done by simply selecting a different color table from the Color dropdown on the Style tab once you have selected the raster layer in the Layer List.

    As soon as you hover your mouse over a different color scheme, the raster dataset will show you how this will look, and the legend changes too.

    I hope you found this useful. Are you using the powerful raster capabilities of MapInfo Pro? If you are, we would love to hear what you are doing.

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