QMapShack visualizes maps and tracks

Map Viewer

Article from Issue 213/2018
Author(s):

QMapShack displays a wide variety of maps, making it easy to plan and manage your journeys.

QLandkart GT was once considered the best tool for displaying free maps on Linux and loading them on Garmin devices. Map enthusiasts were quite disappointed when the project came to a halt a few years ago, but fortunately, a number of developers quickly came together and launched a new project that extended the functions of QLandkarte.

QMapShack [1] lets you display map data from various sources, both online and offline. You can visualize, create, and edit GPX tracks and routes. Automatic routing is even possible. QMapShack combines information from different sources as a "project," which makes the program interesting for larger projects with several different elements. All in all, QMapShack is best described as a universal map planning and routing tool.

QMapShack Hands On

Some Linux package repositories contain packages for QMapShack, but they might not have the latest version. See the box entitled "Building QMapShack" for a brief look at how to build a QMapShack application yourself.

Building QMapShack

Most current distributions do not yet include the current QMapShack version 1.11.0 in the package sources, so you usually have to build the latest version of the application yourself. You need the Mercurial versioning system (version 4, or preferably 4.5) and CMake or CCMake v3.1. You also need GDAL, PROJ.4, and Routino, as well as QuaZIP and Qt v5.

Listing 1 shows the individual steps. First, clone the Mercurial repository to the local disk. Then create a working directory and change to the new folder. Now use CCMake to create a makefile: Create the configuration in the Ncurses interface by pressing C. Press G to create the makefiles and Q to end CCMake.

The make call builds the programs under bin/. This step creates several binaries: the main program qmapshack, the qmaptool utility for displaying maps, and the qmt_map2jnx and qmt_rgb3pct tools for converting data formats. sudo make install lets you import the program to /usr/local/ per the previously defined settings.

If necessary, you can update QMapShack directly from the cloned directory. Change back to the working directory and get the current code by typing:

hg pull && hg update

Re-running make generates the new version, and sudo make install installs the update.

Listing 1

Installing QMapShack

 

QMapShack comes up with an intuitive user interface (Figure 1). The most important functions are in the menu and toolbar. QMapShack supports various online and offline map formats, especially VRT, TMS, WMTS, RMAP, and Garmin IMG (see the "GMap" box).

Figure 1: Views and settings structure the QMapShack interface. The current version includes an easy-to-understand manual for setting up the program.

GMap

One of the special features of QMapShack is the support for Garmin IMG files. This features is limited to maps created by mkgmap for Garmin devices, but QMapShack handles them very well. Testing an IMG file with QMapShack works much better than trying to test it with a navigation device. In addition, you can use the IMG info offline with QMapShack (i.e., exactly where it is important: outdoors, where no Internet is available). Currently the developers are working on the possibility of integrating navigation devices, such as GPS coordinate generators, with QMapShack.

Configuration

The setup process for QMapShack has improved considerably since the last version. In the past, you had to create special directories for many aspects of the program and enter them in the configuration. The current version simplifies this step: Using the Give me a path… link on the welcome page (Figure 1), you just enter a base directory, and all the required folders are automatically created by QMapShack and entered in the configuration. Keep in mind that 10GB or more can quickly accumulate below the base directory. You may therefore need to distribute the different directories across several drives.

Offline maps are configured using File | Setup map paths (Figure 2). When you get there, you will see the path under which the software saves the map tiles (in the standard configuration, the default is ~/.QMapShack/). The application only loads maps from the specified folder, not from its subfolders.

Figure 2: Before using QMapShack, you'll need to complete the configuration: First enter one or more directories, in which you will be saving map material.

If you do not have offline maps, you can also revert to online maps. For example, *.tms ("Tile Map Server") files are used with online map services. The button with the plus symbol lets you add maps and map directories. When you create new .tms files, they will appear in the left view window of QMapShack under the file name you specify. The program won't distinguish identical file names in different directories, so make sure you don't give two files the same name (Figure 3).

Figure 3: QMapShack can integrate several maps at the same time and display them one on top of the other.

In addition to real maps, QMapShack also displays arbitrary tiles (e.g., the aerial images provided by Microsoft on Bing). Integrating these images is not exactly intuitive, as Listing 2 shows. Please note that the legal situation is not clear for all map sources: Google does not allow the use of its tiles with programs other than Google Earth or its own online services. In addition, some of the maps are not very practical and only cover small areas or provide small zoom ranges. Others, such as the Alpine map, have a considerable scope and show many details.

Listing 2

Integrating Tiles

 

In addition to pure map data, QMapShack also supports the use of Digital Elevation Model (DEM) data, which refers to digital elevation or terrain data. A whole series of servers provide DEM data that you can integrate into QMapShack as online maps. The original documentation dedicates a separate chapter [2] to the topic of DEM maps.

Navigating in the map window is quite intuitive: Hold down the middle mouse button to move the displayed map section, and use the mouse wheel to scale the view size. (By the way, you can use the same feature when creating tracks and routes.)

Services such as OpenCycleMap place a watermark on tiles until the user registers and obtains an API key (see the box entitled "API Key for OpenCycleMap.")

API Key for OpenCycleMap

The OpenCycleMap server operated by Thunderforest.com (and some others) requires an API key to deliver tiles without an API Key Required message (Figure 4). You receive the key free of charge [6] after registration as part of a noncommercial project. After a confirmation email, you will find the API key in the service's dashboard.

Figure 4: A number of servers mark the maps with a watermark if you do not specify an API key.

You then need to configure QMapShack so that the application sends the API key to the OpenCycleMap tile server with every request. Open the OpenCycleMap.tms file in the map directory, which only contains a few lines of XML code (Listing 3). In the <ServerUrl> line, add the API key with ?apikey=API key before the closing </ServerUrl>. This modification gives you "undisturbed" tiles from the OpenCycleMap server again.

Where the OpenCycleMap.tms file is located in the configuration files depends on several factors and can be specified with Setup map paths during configuration. When importing old data from QLandkarte, you will often find it below ~/qlandkartegt-Konto/OpenCycleMap.tms. If necessary, search for this file using find ~ -iname OpenCycleMap.tms.

Listing 3

Setting Up OpenCycleMap

 

Installing Maps

Manually installed maps must first be activated. To activate or deactivate a map, right-click on the map in the list and choose the function in the context menu (Figure 5). QMapShack always sorts enabled map views at the top of the list.

Figure 5: You can enable and disable maps via the context menu.

QMapShack lets you enable multiple maps at the same time. For example, you could superimpose an aerial image on a map display or vice versa. This feature allows completely new forms of "realistic" map images, which, until now, could only be created by combining the maps with image-processing techniques.

The order of the maps plays an important role: Maps further down the list cover the maps above. The opacity of each activated map is controlled by a hidden dialog that opens after a mouse click on the small triangle in front of the map icon (Figure 6). The uppermost slider controls the opacity of the layer.

Figure 6: You can adjust the opacity of map displays to allow partial overlapping of maps and aerial photos.

You also need to pay attention to the two sliders below: Cache Size (MB) limits the amount of disk space used per map view, and Expiration (Days) automatically removes obsolete tiles and replaces them later when the region is called.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • FOSSPicks

    We explore KDevelop 5.1, Riot.im, Cursynth, QMapShack 1.8, KWipe 2.1.3, Rapid Photo Downloader 0.9, Kakoune, VPG 0.2.8, Anbox (alpha), Terasology Alpha 7, and Mudlet 3.0.

  • GPS Tools

    Almost all manufacturers of GPS devices use proprietary formats to save routes, tracks, and waypoints. Vendors unfortunately rarely offer Linux software for uploading and downloading or processing the data. Four GPS editors keep Linux users on the right track.

  • Welcome

    RadioShack has dug itself into serious financial straits through the years by failing to stay with the times. When I was a kid, “Radio Shack” was a cool little store with lots of strange gadgets for electronics hobbyists and do-it-yourself home repair types. Any business that intentionally calls itself a “shack” is clearly trying to evoke an image, and the Radio Shack image was a preserve for the home inventor, laboring in a backyard shop, contentedly stringing wires and soldering connections amid piles of loose parts and circuit diagrams.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News