Skip to main content
All CollectionsMaps & Layers
Creating mbtiles files from QGIS
Creating mbtiles files from QGIS

How to convert a SHP, GeoJSON, or KML to a MBTile file using QGIS.

Cory MacVie avatar
Written by Cory MacVie
Updated over a week ago

With the release of QGIS 3.8, there was a new feature to generate raster XYZ layers. This is exciting because Fulcrum users can now create raster MBTile files to use within Fulcrum without needing to install any additional plugins. While there are other options available I have found this to be one of the easiest ways to generate an MBTile layer.

Creating a layer

To start, have all the layers you wish to have included enabled within QGIS. In this example, I am using a layer of Mt. Rainier.

Now that you have your layer setup, you can open up the Toolbox by either selecting the gear icon or by going into the processing tab on the menu bar and selecting the toolbox. Then in the Processing Toolbox, drill down into the Raster Tools section. Within this section, select the Generate XYZ tile (MBTiles) option.

You should now see a popup window to generate the MBTile layer. You will need to set your parameters to ensure that you generate the layer you want. Below are the options that I found necessary to set. All others I left as is.

Extent: You can either manually enter in the min and max values for the X and Y coordinates, or what I find much easier to do is use either the canvas extent, select extent on canvas, or use layer extent… For this example, I used the layer extent option.

Minimum zoom: How far out do you want to be able to see the layer? The smaller the number the further out (ability to see more area) the map view is. For this example, I used 12.

Maximum zoom: How deep do you want to be able to zoom into the map? The higher the number the deeper the map view is. For this example, I used 18.

Note: Fulcrum supports up to zoom level 22, so you do not want to go deeper than this. Additionally, a layer that covers a large area with a deep zoom level can get very large. Each deeper value is 4 times as large as the higher zoom level.

Output file (for MBTiles): Here you will want to select the save to file option and then enter the name you wish to give your layer.

Once you have the parameters set you can click the run button to create the layer. Depending on the extent and zoom level range this could take a while.

Uploading the layer to Fulcrum

Once you have the file created you can go into your Fulcrum plan and create a new MBTIles layer. From the homepage, click the setup button in the sub-menu bar and select layers.

On the layers page, select the create layer button to begin creating a new layer. When creating a new layer you will want to select the MBTile layer type, give your layer a name and then select the MBTile file you just created. Make sure to click on the upload layer button after you have selected the file to begin creating the layer.

Now that the layer has been created, make sure you select the member permissions for the layer accordingly and click the update layer button at the bottom of the page.

Viewing the layer

Now the layer can be viewed within the web app or downloaded to the Fulcrum Android or iOS apps and used offline out in the field. The processes for adding layers on Android and iOS are different from one another, so be sure to check out the how-to article for your specific device

Did this answer your question?