Line Networks: Geoprocessing Tools
Integrating new data from trusted sources in bulk presents the problem of manually checking for and resolving local differences and updates. This is the case for my cartography team at Outdooractive where a network of activity trails (e.g. hiking, cycling) is aggregated from diverse proprietary sources and requires regular maintenance, resulting in heavy repetitive workloads. I created a pyqgis geoprocessing tool that automates name checks and geometry comparisons of new trails against existing ones, dramatically reducing the time needed to adopt changes.
Trail attributes are passed into pandas dataframes for code minimisation. Names undergo a fuzzy string comparison using the python SequenceMatcher and the diverging segments of matching new and old trails are found. Unmatched trails are efficiently compared against the existing network to return potential match suggestions based on geometry. The tool outputs all results in a structured directory of geopackage files as well as a QGIS project file with semantic groups, layer names with metrics and appropriate symbology for further editorial work.
This tool resulted in real workflow improvement, being versatile (custom inputs for encoding, comparison and geometry parameters with recommended defaults) and runnable from inside the Processing Toolbox of QGIS with a user friendly documentation dialog linking to further guidance in a wikipage online.