
Brief description of all 5 sections in this course
Geopackage/GPKG is a proprietary format of QGIS. We will compare Geopackage and ESRI Shapefile formats directly shows the differences, advantages and disadvantages of these two formats.
We will open some SHPs data, create new GPKG data and export these SHPs data into GPKG
Change or rename field name in GPKG and SHP (open and see convention name in notepad inside sample data attached above)
Before being processed in QGIS, the field data in XLS format is first cleaned, such as column names that must not contain spaces. Then this XLS is exported to CSV. The CSV is then plotted onto the QGIS canvas using 2 (two) columns/fields of Longitude and Latitude coordinates. The results of this plotting are then exported to GPKG
After the data is plotted and exported to GPKG, we will perform data cleaning. Every data always has errors, in spatial data often the location of the data that becomes an error such as the position of the point being off from where it should be. So we will shift these points using the existing attribute data, namely sub-district and village/urban village data. We already have SHP data for administrative polygons of villages and administrative polygons of sub-districts that have been exported to GPKG. This administrative polygon data is a reference in shifting the points that are off. This technique is called geocoding
Field titles or names can be a disaster for us now or in the future if we use too many abbreviations such as road name becomes road_nm or income becomes incm. This happens in the SHP format where the field name contains 10 characters/letters including spaces. We have exported survey point plotting data from CSV to GPKG, the field names are complete, nothing is cut off. In this meeting we will export survey point plotting data from CSV to SHP and see the comparison of field titles between SHP and GPKG.
In a QGIS Project document, we can create several thematic maps from one layer or several layers. These thematic maps can then be created in different layouts even in one QGIS Project document.
In this lecture, we will create a new QGIS/QGZ Project document. This New QGZ will create spatial modeling namely choropleth modeling, cluster modeling and heatmap modeling.
Although not too disruptive, adding a thousands separator can make it easier for us to see data in thousands or millions. In this section we will add a thousands separator in the attribute table and in the spatial model.
We will separate the choropleth, cluster and heatmap spatial models into separate QGZ projects. This is done to make it easier for us to design multi layouts.
We will design a layout for a thematic gender map where this map is generated from thematically-fielded businessType in survey attribute data.
We will design a layout for a thematic business duration map where this map is generated from thematically-fielded businessDurationin survey attribute data.
We will design a layout for a thematic business asset map where this map is generated from thematically-fielded businessAsset survey attribute data.
After designing the layout, we can then export this layout into another format such as JPG for presentation or reporting purposes.
After designing the layout, we can then export this layout into another format PDF for presentation or reporting purposes. We will also export this layout to template so may be used for another QGIS project layout in the future
We will design a layout for a graduated choropleth of Age map where this map is generated from thematically-fielded Age in survey attribute data. Design is assisted by template which exported from another QGIS layout project
We will design a layout for a cluster choropleth of Age map where this map is generated from thematically-fielded Age in survey attribute data.
We will design a layout for a heatmap choropleth of Age map where this map is generated from thematically-fielded Age in survey attribute data.
We will design a layout for a graduated choropleth of monthly income map where this map is generated from thematically-fielded monthlyIncomeIDR in survey attribute data.
We will design a layout for a cluster choropleth of monthly income map where this map is generated from thematically-fielded monthlyIncomeIDR in survey attribute data.
We will design a layout for a heatmap choropleth of monthly income map where this map is generated from thematically-fielded monthlyIncomeIDR in survey attribute data.
We will design a layout for a graduated choropleth of annual income map where this map is generated from thematically-fielded annualIncomeIDR in survey attribute data.
We will design a layout for a cluster choropleth of annual income map where this map is generated from thematically-fielded annualIncomeIDR in survey attribute data.
We will design a layout for a heatmap choropleth of annual income map where this map is generated from thematically-fielded annualIncomeIDR in survey attribute data.
Export maps layouts to JPG and PDF
This Video tutorial is created using QGIS 3.34 LTR, however all QGIS 3.xx may use and follow this course.
1. Introduction to Geopackage (.gpkg),
GPKG is a proprietary format from QGIS. Although this format is relatively new, its popularity is rapidly increasing because many things offered by this format far surpass the Shapefile/SHP format. GPKG not only accommodates vector data but also raster data, spreadsheets, tile data and can even store QGIS Project Document (QGS/QGZ) so that GPKG is truly able to create an isolated environment for a project. GPKG can do this because GPKG is supported by the SQLite database so GPKG is not just a format but also a database.
2. Geopackage VS Shapefile.
SHP has been the de facto standard vector data format in the GIS industry for 40 years. When SHP was first launched, this format was supported by the most advanced technology at that time, for example DBF database support. Currently, DBF is no longer used because there are many weaknesses here and there. The vector data storage format was then developed again by still using database technology as the backbone of data storage but with much better adjustments. One of the data storage formats developed by QGIS is Geopackage/GPKG. GPKG is supported by a sophisticated, lightweight and easy-to-use SQLite database. We will go head to head to compare the advantages and disadvantages of the SHP and GPKG formats.
3. Export SHP to GPKG
GPKG is able to create new features but on this occasion we will export existing SHP data to GPKG, besides saving time, we can also practice. There are many formats that can be read by QGIS and all of them can be exported to GPKG. besides SHP, other popular data formats are KML and geoJSON.
4. Processing field survey data in XLS format, editing and cleaning data
Before being processed in QGIS, field data in XLS format is first cleaned/cleaned such as column names that must not have spaces.
5. Export XLS to CSV
After being cleaned, the XLS data is exported to CSV.
6. Plotting survey point distribution data CSV to QGIS, XY data in Geographic Coordinate System (GCS) in decimal degree (DD) format
The CSV data is then added and plotted to QGIS. Plotting or displaying the distribution of survey points on the QGIS canvas is done using 2 (two) columns/fields, a combination of X/Longitude/Longitude and Y/Latitude/Latitude as the coordinate points of the earth where the survey respondents are located. The coordinate system used in this course is the Geographic Coordinate System (GCS) with degrees (Degree) and in Decimal Degree/DD format
7. Export plotting data to GPKG
The distribution of survey points that have been added to the QGIS canvas is temporarily stored in memory (temporary layer), to make it permanent we will export this point distribution data to GPKG
8. Creating a spatial model
We will create a spatial model from the distribution of survey points that have been stored in GPKG. This spatial model can be in the form of thematic, choropleth, clustering and heatmap. The spatial model will provide a clearer picture of how this data is distributed based on the attribute data obtained such as the age spatial model, the monthly turnover spatial model, the annual turnover spatial model and others.
9. Designing multi-Layout in one QGIS project document (QGS/QGZ).
The advantage of creating a layout in QGIS is multi-Layout. We can create many layouts/multi-layouts from just one QGS. We are able to create layouts for each of the spatial models above from just one QGS/QGZ.