Useful QGIS Plugins — QGIS Documentation documentation (2024)

Now that you can install, enable and disable plugins, let’s see how this canhelp you in practice by looking at some examples of useful plugins.

The goal for this lesson: To familiarize yourself with the plugin interfaceand get acquainted with some useful plugins.

9.2.1. ★☆☆ Follow Along: The QuickMapServices Plugin

The QuickMapServices plugin is a simple and easy to use plugin that adds base mapsto your QGIS project.It has many different options and settings.Let’s start to explore some of its features.

  1. Start a new map and add the roads layer from the training_dataGeopackage.

  2. Install the QuickMapServices plugin.

  3. Click on Web ► QuickMapServices.The first menu lists different map providers (OSM, NASA) with available maps.

  4. Click on an entry and you would load the base map into your project.

Nice! But one of the main strengths of QMS is to provide access to many data providers.Let’s add them.

  1. Click on Web ► QuickMapServices ► Settings

  2. Go to the More services tab.

  3. Read carefully the message of this tab and if you agree click on theGet Contributed pack button.

  4. Click Save.

  5. Reopen the Web ► QuickMapServices menu you will seethat more providers are available.

    Useful QGIS Plugins — QGIS Documentation documentation (2)
  6. Choose the one that best fits your needs, and load the data in the project!

It is also possible to search trough the now available data providers

  1. Open the plugin’s search tab by clicking on Web ► QuickMapServices ► Search QMS.This option of the plugin allows you to filter the available base mapsby the current extent of the map canvas or using a search word.

  2. Click on the Filter by extent and you should see one service available.If no service is found, zoom out and pan around the world (or your location)or search with a keyword.

  3. Click on the Add button next to a returned dataset to load it.

  4. The base map will be loaded and you will have a background for the map.

9.2.2. ★☆☆ Follow Along: The QuickOSM Plugin

With an incredible simple interface, the QuickOSM plugin allows you to downloadOpenStreetMap data.

  1. Start a new empty project and add the roads layer from thetraining_data GeoPackage.

  2. Install the QuickOSM plugin.The plugin adds two new buttons in the QGIS Toolbarand is accessible in the Vector ► QuickOSM menu.

  3. Open the QuickOSM dialog. The plugin has many different tabs: we will use theQuick Query one.

  4. You can download specific features by selecting a generic Key or be morespecific and choose a specific Key and Value pair.

    Tip

    if you are not familiar with the Key and Valuesystem, click on the Help with key/value button. It will open aweb page with a complete description of this concept of OpenStreetMap.

  5. Look for railway in the Key menu and let the Value beempty: so we are downloading all the railway features without specifyingany values.

  6. Select Layer Extent in the next drop-down menu and choose roads.

  7. Click on the Run query button.

    Useful QGIS Plugins — QGIS Documentation documentation (4)

After some seconds the plugin will download all the features tagged in OpenStreetMapas railway and load them directly into the map.

Nothing more! All the layers are loaded in the legend and are shown in the mapcanvas.

Warning

QuickOSM creates temporary layer when downloading the data. If youwant to save them permanently, click on the icon next to thelayer and choose the options you prefer. Alternatively you can open theAdvanced menu in QuickOSM and choose where to save the data in theDirectory menu.

9.2.3. ★★★ Follow Along: The QuickOSM Query engine

The quickest way to download data from QuickOSM plugin is using the Quick querytab and set some small parameters. But if you need some more specific data?

If you are an OpenStreetMap query master you can use QuickOSM plugin also withyour personal queries.

QuickOSM has an incredible data parser that, together with the amazing query engineof Overpass, lets you download data with your specific needs.

For example: we want to download the mountain peaks that belongs into a specificmountain area known as Dolomites.

You cannot achieve this task with the Quick query tab, you have tobe more specific and write your own query. Let’s try to do this.

  1. Start a new project.

  2. Open the QuickOSM plugin and click on the Query tab.

  3. Copy and paste the following code into the query canvas:

     <!--This shows all mountains (peaks) in the Dolomites.You may want to use the "zoom onto data" button. =>--><osm-script output="json"><!-- search the area of the Dolomites --><query type="area"> <has-kv k="place" v="region"/> <has-kv k="region:type" v="mountain_area"/> <has-kv k="name:en" v="Dolomites"/></query><print mode="body" order="quadtile"/><!-- get all peaks in the area --><query type="node"> <area-query/> <has-kv k="natural" v="peak"/></query><print mode="body" order="quadtile"/><!-- additionally, show the outline of the area --><query type="relation"> <has-kv k="place" v="region"/> <has-kv k="region:type" v="mountain_area"/> <has-kv k="name:en" v="Dolomites"/></query><print mode="body" order="quadtile"/><recurse type="down"/><print mode="skeleton" order="quadtile"/></osm-script>

    Note

    This query is written in a xml like language. If you are moreused to the Overpass QL you can write the query in this language.

  4. And click on Run Query:

    Useful QGIS Plugins — QGIS Documentation documentation (7)

The mountain peaks layer will be downloaded and shown in QGIS:

You can write complex queries using the Overpass Query language.Take a look at some example and try to explore the query language.

9.2.4. ★☆☆ Follow Along: The DataPlotly Plugin

The DataPlotly plugin allows you to create D3 plots of vectorattributes data thanks to the plotly library.

  1. Start a new project

  2. Load the sample_points layer from the exercise_data/pluginsfolder

  3. Install the plugin following the guidelines described in ★☆☆ Follow Along: Installing New Pluginssearching Data Plotly

  4. Open the plugin by clicking on the new icon in the toolbar or in thePlugins ► Data Plotly menu

In the following example we are creating a simple Scatter Plot of two fieldsof the sample_points layer.In the DataPlotly Panel:

  1. Choose sample_points in the Layer filter, cl forthe X Field and mg for the Y Field:

    Useful QGIS Plugins — QGIS Documentation documentation (9)
  2. If you want you can change the colors, the marker type, the transparency andmany other settings: try to change some parameters to create the plotbelow.

    Useful QGIS Plugins — QGIS Documentation documentation (10)
  3. Once you have set all the parameters, click on the Create Plotbutton to create the plot.

The plot is interactive: this means you can use all the upper buttons to resize,move, or zoom in/out the plot canvas. Moreover, each element of the plot is interactive:by clicking or selecting one or more point on the plot, the corresponding point(s)will be selected in the plot canvas.

You can save the plot as a png static image or as an html file by clickingon the or on the button in the lower right cornerof the plot.

There is more. Sometimes it can be useful to have two (or more) plots showingdifferent plot types with different variables on the same page. Let’s do this!

  1. Go back to the main plot settings tab by clicking on the buttonin the upper left corner of the plugin panel

  2. Change the Plot Type to Box Plot

  3. Choose group as Grouping Field and ph asY Field

  4. In the lower part of the panel, change the Type of Plot fromSinglePlot to SubPlots and let the default optionPlot in Rows selected.

    Useful QGIS Plugins — QGIS Documentation documentation (14)
  5. Once done click on the Create Plot button to draw the plot

    Useful QGIS Plugins — QGIS Documentation documentation (15)

Now both scatter plot and box plot are shown in the same plot page. You stillhave the chance to click on each plot item and select the corresponding featuresin the map canvas.

Tip

Each plot has its own manual page available in the tab.Try to explore all the plot types and see all the other settings available.

9.2.5. In Conclusion

There are many useful plugins available for QGIS. Using the built-in tools forinstalling and managing these plugins, you can find new plugins and makeoptimum use of them.

9.2.6. What’s Next?

Next we’ll look at how to use layers that are hosted on remote servers in realtime.

Useful QGIS Plugins — QGIS Documentation  documentation (2024)

References

Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6350

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.