Challenges and Tips

Here are some challenges and tips should you wish to take a similar approach.

QGIS

  • The tools often don’t communicate problems very clearly, i.e. silent fails. Often this is due to an issue with the input data or parameters*, but use the latest LTS version of QGIS to rule out major software bugs. (I started out with v3.20, and then moved back to v3.16.)
  • *Check the default values make sense for your input, e.g. cell size ‘Not Set’ (meaning ‘guess from input’) vs 0.0.
  • Some issues were due to processes not assigning the CRS of the input to the output. (Hence the many CRS assignments in the Topo-flow model.)
  • For similar reasons, when using the model builder, don’t try do too much at once - test frequently.

qgis2web

qgis2web was used to create the above Leaflet map. I was very happy with the results, considering how much coding time would otherwise have been required. But, here are some of the issues I encountered:

  • It doesn’t support layer grouping (See issue #989).
  • The rendering of composite styles (patterns etc.) is hit and miss. Notice the cross-hatch colour in the zones layer doesn’t match the desired colour (shown correctly in the legend).
  • It was pretty unstable - 50% of the time it would fail to export or preview, with error AttributeError: 'QgsFillSymbol' object has no attribute 'width'. This would put QGIS in an unstable state - it would look like it was hanging, and that a restart was needed. But, you can still operate it, despite the cursor saying otherwise, and attempt exporting again without losing your settings. Will follow up on this issue when possible.
  • Fortunately, the layers for this map ended up a totalling only a few MB. So, they could just be served as regular files. Working with larger datasets would mean hosting the layers in e.g. GeoServer, which would mean additional work.

QGIS map sample
📷 Desired map symbology.

Source

The QGIS project and associated data can be found in the qgis-project folder.

Go to source.