GFED (Global Fire Emissions Database) data is distributed in HDF5 format, which is commonly used for multidimensional datasets, but can sometimes be a challenge to use in QGIS for a variety of reasons. First, it doesn't have an explicitly-defined CRS that QGIS can simply use to display the data in the correct location. Second, there are many different subdatasets packed into a single GFED .hdf5 file, representing different variables, units, and time periods.
<html> | |
<head> | |
</head> | |
<body> | |
<canvas id='canvas' width=960 height=500></canvas> | |
<script> | |
var c = canvas.getContext('2d'); |
The following Python code will, every 30 seconds, automatically update the data from the source for any QGIS layer with 'autoUpdate' in the layer name. Each time it updates, it will put the timestamp in the layer name, although you could leave that part out.
This is particularly useful for remote data sources like json-over-http or even local CSV files that might be changed by another program while the QGIS project is open.
Just paste the code into the QGIS Python console.
import threading
import datetime
The QGIS workshop folder on Box has been updated, so please download the entire "QGIS-workshops" folder to your computer.
- Unzip the files
- Double-click the workshop2.qgz project to open it in QGIS (or else open it from within QGIS)
Workshop 2020-09-09 by Keith Jenkins, GIS Librarian at Mann Library
For help after this workshop, contact me at kgj2@cornell.edu
Or set up a Zoom appointment at https://guides.library.cornell.edu/gis/help
Data for this workshop is located in the "QGIS-workshops" folder on Box
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Demo</title> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" |
GEOID10 | GEOID10_2 | |
---|---|---|
0102200 | 0102200 | |
0101700 | 0102200 | |
0102300 | 0102200 | |
0102600 | 0102200 | |
0102703 | 0102200 | |
0102100 | 0102200 | |
1203301 | 0102200 | |
1211300 | 0102200 | |
1209100 | 0102200 |
QGIS has the ability to style points using SVG symbols, and size and color them by attributes of the points.
SVG is a file format that means Scalable Vector Graphics. Because they are a vector format, they can easily be sized without losing detail or becoming pixelated (as can happen with raster icons).
Free or public domain SVG files can be found on the web. For example, here is a collection of paint splatters: https://svgsilh.com/tag/splatter-1.html
SVG files are actually text files that can be viewed in any text editor. Many SVGs are solid black; if you want to be able to color them in QGIS you'll want to edit the SVG and change fill="#000000"
to fill="param(fill)"
-- this has already been done for splatter1.svg -- click the "raw" button below to see the SVG code.
Microsoft US Building Footprints are available at:
https://github.com/Microsoft/USBuildingFootprints
The state-based downloads are in .geojson format, which is a pretty bad choice for datasets this large. Bad because .geojson has no spatial index, making it very slow to load and render. So it will be useful to split and save them into a separate file (geopackage or shapefile) for each county. Also, some of the polygons have invalid geometries that we should fix along the way.