{'fraction_non_alphanumeric': 0.018971848225214197, 'fraction_numerical': 0.0, 'mean_word_length': 5.437007874015748, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Implications of Weighting Metrics for Line Generalization with Visvalingam's Algorithm

Visvalingam's algorithm was designed for caricatural line generalization. A distinction must be made between the algorithm and its operational definition, which includes the metric used to drive it. When the algorithm was first introduced, it was demonstrated using the concept of the effective area of triangles. It was noted that alternative metrics could be used and that the metrics could be weighted, for example to take account of shape. Ordnance Survey (Great Britain) and others are using Visvalingam's algorithm for generalizing coastlines and other natural features, with complex parameter-driven functions to weight the original metric. This paper shows how free software and data were used to scrutinize the implications of one of Matthew Bloch's simple and transparent weighting functions. The results look promising, when compared with manually produced mid and small-scale maps; and encourage further research focussed on weighting functions and related topics, such as self-intersection of lines and model-based generalization. The paper discusses why weights were used in some projects. It comments on their range of applicability and reiterates the original guidance provided for the use of weights. It also demonstrates how weights can undermine the algorithm's capacity to draw caricatures with very few points. The paper provides sufficient background and links to the authors’ test data and to open source software for the benefit of others wishing to undertake research in line generalization using Visvalingam's algorithm.