Pista ng Mapa 2021 QGIS Workshop

᛫ 4 min read

SHARE:


Setting of expectations

  • Time vs Objectives
    • Really short-term (< 1 day) events are best for awareness-raising and community building.
    • Short-term (<1 week) events can provide some skill-building opportunities.
    • Medium-term (2-12 weeks) events are good for building and applying skills.
    • Long-term (> 3 months) events can create direct-impact projects.
  • This isn’t a basic QGIS training (you can visit my website for that).
  • This isn’t a comprehensive list of QGIS features but you can find a lot of stuff about QGIS, FOSS4G, and open geospatial on my website, YouTube, Facebook, and Twitter.
  • Some of the exercises shown will be about the application of QGIS features and functionalities to basketball analysis.

Data

You can find the data for the workshop here.


QGIS Processing Framework

The QGIS Processing Framework includes:

  • native QGIS algorithms
  • algorithms from processing providers (GDAL, GRASS, SAGA)
  • algorithms from processing plugins and processing scripts
  • QGIS models
  • Python scripts

Algorithms that are part of the Processing Framework can:

  • be batch processed
  • be used in the Graphical Modeler
  • be used in Python (via PyQGIS processing), R, and the command line

How do I know if the plugin I’m using is part of the Processing Framework:

  • Can you see it in the Processing Toolbox?
    • If yes, then it’s part of the framework
    • If not, then it is not

LEARN MORE:

NOTE: Make sure you have downloaded all the data for the workshop before proceeding


The graphical modeler

NOTE: Add spatial indices to your vector data for faster processing. Use the Create spatial index processing algorithm.

  1. Open the Graphical Modeler I QGIS project file (Graphical Modeler I.qgz)
  2. If QGIS encounters “Handle Unavailable Layers” issue, try to use Auto-Find to resolve the issue or you can just manually add the correct link to the following layers inside pnm21-qgis-workshop-data.gpkg in the data folder:
    • highway_all
    • amenity_school
    • PHL_provinces
  3. Let’s build two models that look for suitable sites for schools using just 2 parameters:
    • distance from existing schools
    • distance from roads

Model 1 - Suitable areas are those near existing schools and roads that meet the following criteria:

  1. Within X meters from an existing school
  2. Within X meters from a road

Model 2 - Suitable areas are those that are isolated and meet the following criteria:

  1. Not within X meters from an existing school
  2. Not within X meters from a road

BONUS: You can open the suitable-school-sites.model3 and suitable-school-sites-isolated.model3 files inside models/school-suitability to see how the final models look like (or reverse engineer them).

CHALLENGE: How else can we improve the model? (HINT: Can we use a processing algorithm to automatically download road and school data?)

LEARN MORE:


Expressions are your best friend

NOTE: Add spatial indices to your vector data for faster processing. Use the Create spatial index processing algorithm.

Whenever you see this icon , that means that you can use an Expression in that part of QGIS.

  1. Open the Expressions I QGIS project file (Expressions I.qgz).
  2. Our task is to summarize field goals per grid (e.g. count the number of attempts, count the number of points scored, count the points per attempt)

BONUS: You can open the summarize-fg.model3 file inside models/courtvisionph to see how the final models look like (or reverse engineer them).

CHALLENGE: If I want to add fields that count the number of missed and made attempts per grid, what should I do?

LEARN MORE:


Layering your symbols and geometry generators

Utilize symbol layers and geometry generators to create custom and complex styles.

  1. Open the Symbol layers and geometry generators I QGIS project file (Symbol layers and geometry generators I.qgz).
  2. Let’s create a bivariate style for the PPA grid that shows the number of attempts (size) and the points per attempt (color) by:
    • getting the centroid of each grid cell
    • setting the size of the centroid marker to be based on the number of attempts
    • setting the color of the centroid marker to be based on the points per attempt

The data-defined Assistant

Whenever you see this icon , that means you can use a data-defined override for that parameter.

The Data-defined assistant is an option under the Data-defined override. The Assistant makes it easier to define how the data is applied to the parameter for each feature.

We will use the Assistant to change the size and color of the PPA marker.

LEARN MORE:


QGIS Atlas tricks

Open the QGIS Atlas tricks I QGIS project file (QGIS Atlas tricks I.qgz).

  • Let’s learn how to create a simple Atlas with data-defined elements (e.g. table, chart) and styling helped by Expressions.

Open the QGIS Atlas tricks II QGIS project file (QGIS Atlas tricks II.qgz).

  • Let’s learn how to create an Atlas that iterates over the same area/coverage.

Open the QGIS Atlas tricks III QGIS project file (QGIS Atlas tricks III.qgz).

  • Let’s learn how to create an Atlas that iterates over the same area/coverage with different levels/styles with the help of Map themes.

Share everything as one GeoPackage

You can save layers, projects, styles, models, and other things in a GeoPackage.

You can use the Package Layers algorithm to save multiple layers in one run.

comments powered by Disqus

You may also like:

Towards a spatial analysis of shooting in Philippine basketball (FOSS4G2021)

01 Oct 2021 ᛫ 1 min read

Win and let win: On being unconventional, openness, and building communities

30 Apr 2021 ᛫ 1 min read

QGIS Styles based on HLURB Land Use Categories and Color Coding (CLUP Guidebook Vol 3, 2014)

15 Dec 2020 ᛫ 2 min read

Select duplicate geometries from a layer in QGIS

09 Dec 2020 ᛫ 3 min read

Get Data from DPWH Road and Bridge Inventory in QGIS

29 Nov 2020 ᛫ 2 min read

Support BNHR

If you find my website or any of the materials I share useful, you can consider donating to the cause below.

Donate and support BNHR

BNHR

[email protected]

Creative Commons License
Except when explicitly stated otherwise, this work and its contents by Ben Hur S. Pintor is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Other works (software, source code, etc.) referenced in this website are under their own respective licenses.
This site is powered by Jekyll and hosted on Github (view source)