Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
GeoJson
Map
Map Tools
Maps
postgis
Python
QGIS
Uncategorized

Caching Bing Maps for offline use in QGIS

Caching Bing Maps for offline use in QGIS

Step 1: Setting Up Your Project

To begin, open QGIS and create a new blank project. Make sure to check if the browser panel is visible. If it’s not, you can bring it back by right-clicking on the toolbar and selecting the browser panel from the context menu.

Opening the browser panel in QGIS

Step 2: Adding a New XYZ Tile Connection

Once the browser panel is visible, look for the XYZ Tiles section. If you only see OpenStreetMap or other default tiles, you can create a new connection. Right-click on the XYZ Tiles section and choose to create a new connection.

Creating a new XYZ tile connection

Step 3: Inputting the Tile URL

For this tutorial, we will use Bing Maps. You will need the URL for the Bing Maps tile service. Once you have the URL, paste it into the dialog box and set the minimum zoom level to 0 and the maximum zoom level to 18.

Inputting the Bing Maps URL

Step 4: Loading the Tile Layer

Now that the connection is set up, you can load the Bing Maps layer into your project. You can either double-click on the new connection or select it and drag it into the layers panel.

Loading the Bing Maps layer

Step 5: Zooming to Your Area of Interest

Use the zoom tools to navigate to the area you want to work with. It’s important to zoom in until you can see a clear image of the desired region.

Zooming in on the map

Step 6: Generating XYZ Tiles

Next, navigate to the Processing Toolbox. Under the raster tools, select the option to generate XYZ tiles. This will open a window where you can input parameters for the tile generation.

Accessing the Processing Toolbox

Step 7: Defining Parameters for Tile Generation

Set the extent for the tiles you want to generate. You can either select a predefined layer or use the map canvas extent. If you want precision, select “Draw on Canvas” to manually select the area. Adjust the minimum zoom to 2 and the maximum to 18.

Defining the extent for tile generation

Step 8: Configuring Output Settings

Configure the output settings, including DPI and tile format. A DPI of 300 is recommended for clear images. Select JPEG as the tile format and set the quality to 85. Specify the output file location where the tiles will be saved.

Configuring output settings for the tiles

Step 9: Running the Tile Generation Process

Click the run button to start generating the tiles. The processing time will depend on the size of your selected area. For smaller areas, it may complete quickly.

Running the tile generation process

Step 10: Adding the Raster Layer to Your Project

After the tiles are generated, navigate to the layer menu and add a raster layer. Browse to the location where you saved the generated tiles and add them to your project.

Adding the raster layer to the project

Step 11: Viewing and Using Your XYZ Tiles

Once the tiles are loaded, you can view them in your project. You can toggle the visibility of the Bing Maps layer to see how well the generated tiles blend with the base map.

Viewing the generated XYZ tiles

FAQ

  • What are XYZ tiles? XYZ tiles are a way of organizing map tiles in a grid format, where each tile can be accessed via a URL based on its zoom level and coordinates.
  • What is the maximum zoom level I can set for my tiles? The maximum zoom level depends on the tile service you are using; for Bing Maps, it is typically 18.

 

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.