Shortcut hulls: Vertex-restricted outer simplifications of polygons

https://doi.org/10.1016/j.comgeo.2023.101983Get rights and content

Abstract

Let P be a polygon and C a set of shortcuts, where each shortcut is a directed straight-line segment connecting two vertices of P. A shortcut hull of P is another polygon that encloses P and whose oriented boundary is composed of elements from C. We require P and the output shortcut hull to be weakly simple polygons, which we define as a generalization of simple polygons. Shortcut hulls find their application in cartography, where a common task is to compute simplified representations of area features. We aim at a shortcut hull that has a small area and a small perimeter. Our optimization objective is to minimize a convex combination of these two criteria. If no holes in the shortcut hull are allowed, the problem admits a straight-forward solution via computation of shortest paths. For the more challenging case in which the shortcut hull may contain holes, we present a polynomial-time algorithm that is based on computing a constrained, weighted triangulation of the input polygon's exterior. We use this problem as a starting point for investigating further variants, e.g., restricting the number of edges or bends. We demonstrate that shortcut hulls can be used for the schematization of polygons.

Introduction

The simplification of polygons finds a great number of applications in tasks related to cartography or geographical information systems. For example, in map generalization it is used to obtain abstract representations of area features such as lakes or buildings. A common technique, which originally stems from polyline simplification, is to restrict the resulting polygon Q of a polygon P to the vertices of P, which is also called a vertex-restricted simplification [23], [27], [42]. In that case, the boundary of Q consists of directed straight-line segments between vertices of P. In the following, we simply refer to a directed straight-line segment as edge and as shortcut if it connects two vertices of P. In the classic problem definition of line and area simplification, the resulting polygon Q may have edges that cross edges of P.

In this paper, we consider the vertex-restricted crossing-free simplification of a polygon P considering only shortcuts that do not intersect the interior of P. All shortcuts satisfying this requirement are termed possible shortcuts. However, since there can be additional application-specific requirements, not all possible shortcuts may be admissible. In contrast to other work, we consider the admissible shortcuts as input for our problem and do not require special properties, e.g., that they are crossing-free or that they are within a prescribed buffer of P. The result of the simplification is a shortcut hull Q of P, with Q possibly having holes. We emphasize that the edges of a shortcut hull do not cross each other. Fig. 1 shows polygons (blue area) and different choices of shortcut hulls (blue and red area)—in this example all possible shortcuts are admissible. Such hulls find their application when it is important that the simplification contains the polygon. Fig. 2 shows the simplification of a network of lakes, whose complement is a (green) polygon; note that the lakes are connected to the exterior of the green polygon at the bottom side of the green polygon's rectangular outer boundary. In this application, it can be desirable that the simplification results in the water area being decreased, while preserving the land area, which may contain important map features. The degree of the simplification of Q can be quantified in terms of its perimeter and enclosed area. While a small perimeter may indicate a strong simplification of P, a small area gives evidence that Q adheres to P. In the two extreme cases, Q is either the convex hull of P (minimizing the perimeter), or Q coincides with P (minimizing the enclosed area). We present algorithms that construct shortcut hulls of P that seek a balanced optimization, minimizing a convex combination of these two competing criteria, with the combination specified by a parameter λ[0,1], which determines the relative importance of perimeter minimization versus area minimization. We show that for the case that Q must not have holes we can reduce the problem to that of finding a cost-minimal path in a directed acyclic graph that is based on the given set of admissible shortcuts. However, especially for applications in cartography, which require the simplification of spatial structures, we deem the support of holes in the simplification as an essential key feature. For example, in Fig. 2d the connections between the lakes are not preserved in the simplification shown, as they are very narrow, while it is desirable to preserve the large lakes. We therefore investigate the computation of shortcut hulls that have holes in greater detail. As input, we require a weakly simple polygon, whose boundary is composed of polygonal rings. We formally define these concepts as follows.

A polygonal ring R is a cyclic sequence (l1,,ln,l1) of straight-line segments such that the endpoint of li is the starting point of li+1 with 1in and ln+1:=l1.

A weakly simple polygon P is a region whose boundary consists of a polygonal ring O, which we call the outer ring of P, and possibly multiple polygonal rings H1,,Hk, which we call the inner rings of P, such that there is a connected planar straight-line graph G that supports O and H1,,Hk in the following manner: The outer ring O corresponds to the facial walk along the outer face of G and every inner ring Hi (1ik) corresponds to the facial walk along an inner face of G; see Fig. 3 for an example. We call an inner face of G whose facial walk corresponds to an inner ring of P a hole of P. This allows us to define the boundary, exterior, and interior of P as follows. The boundary PR2 of P is the point-wise union of all the straight-line segments in O and H1,,Hk. The exterior ExtPR2 of P is equal to the union of the outer face of G with the holes of P. The interior of P is IntP=R2(ExtPP). In the following, a vertex of P refers to a visit of a vertex of G during a facial walk along one of the faces of G. This particularly means that P may have multiple vertices at the same location; see Fig. 4.

We make the following observations. First, not every inner face of G is necessarily a hole of P; see faces g1,,g4 in Fig. 3. Second, requiring G to be connected ensures that the holes of P are enclosed by O. Third, the edges of G that are neither incident to the outer face of G nor to the holes of P serve as connections between inner rings as well as between the outer ring and the inner rings; they can be chosen freely subject to the constraints above. Fourth, every simple polygon is a weakly simple polygon, but weakly simple polygons are more general than simple polygons. They can be used to describe more complex geometric objects, such as a Euclidean minimum spanning tree of a point set; see Fig. 5.

Next, we define the perimeter cP(P) and the area cA(P) of a weakly simple polygon P, which we will use as optimization criteria when computing a shortcut hull. The perimeter of a weakly simple polygon P is defined to be the sum of the lengths of the outer ring and the inner rings (if any), each defined to be the sum of the Euclidean lengths of the edges (line segments) making up the ring. Since a weakly simple polygon P is defined to be a region in the plane, bounded by the outer/inner rings, it has an associated area (possibly 0), which is given by the sum of the areas of the (polygonal) faces gi of G that are not holes of P.

Formal problem definition  We are given a weakly simple polygon P without holes and a set C of directed edges within PExtP such that the endpoints of the edges in C are vertices of P. We particularly require that an edge e=pqC is directed such that the round walk from p to q along e and from to q to p along the boundary of P is oriented clockwise and encloses P; see Fig. 6a. The elements in C are the admissible shortcuts. A C-hull is a weakly simple polygon (possibly with holes) whose oriented boundary consists only of directed edges from C and that contains P. We seek a C-hull Q that minimizes a linear combination of the perimeter and the enclosed area of Q. Formally, we define the cost of a C-hull Q to bec(Q)=λcP(Q)+(1λ)cA(Q), where λ[0,1] is a given constant parameter that specifies the relative importance of the perimeter cP(Q) and the area cA(Q) of Q. Further, Q is optimal if for every C-hull Q of P it holds c(Q)c(Q).

ShortcutHull.

We point out that an optimal C-hull of a weakly simple polygon P exists if a subset of C forms a polygonal ring R that contains P. One way to ensure the existence of an optimal C-hull is, hence, to include every edge of P in C. However, depending on the application this is not always desirable. For example, for schematized output polygons one may only want to consider edges with specific orientations. We note that |C|O(n2), since the edges of C have their endpoints at vertices of P.

We want to remind the reader that an (optimal) C-hull may contain holes. With this it is possible to fill up narrow parts of the input polygon's exterior; see Fig. 1b. This allows us to reduce the perimeter of the computed hull without making the new covered area too large. Nevertheless, we also provide a solution for the special case that the computed C-hull must not have any hole.

Further, we want to point out that by forbidding the input polygon P to have holes we aim at keeping the definition of the problem and the presentation of the algorithms simple. However, we could easily deal with holes in the input polygon by simplifying the polygonal rings of P independently of each other.

Our contribution  We first discuss how to construct an optimal C-hull in O(|C|) time for the special case in which the computed C-hull is required not to have holes (Section 3). Afterwards, we turn to the general case in which the C-hull may have holes (Sections 4–6). In particular, we show that finding an optimal C-hull Q of P is closely related to finding a triangulation T of the exterior of P and assigning each triangle ΔT either to the interior or to the exterior of Q; see Fig. 7a. We present an algorithm that solves ShortcutHull in O(n2) time if we forbid holes and in O(n3) time in the general case. Moreover, in the case that the edges of C do not cross each other, it runs in O(n) time. More generally, we analyze the running time based on the structure of C. Let S be the region between P and the convex hull of P. Let G be the crossing graph of C, i.e., each node of G corresponds to an edge in C and two nodes of G are adjacent if the corresponding edges in C cross each other. The spatial complexity of C is the smallest number χN such that for every connected component of G the corresponding edges in C can be enclosed by a polygon with χ edges whose interior is disjoint with P and only consists of vertices from P; see Fig. 7. We call the number h of connected components in G the number of crossing components. For the special case that no two edges of C cross each other, i.e., each connected component is a single node, we define χ=1 and h=1. We show that the proposed algorithm runs in O(hχ3+nχ) time. We emphasize that χO(n). Moreover, we present two variants of C-hulls that restrict the number of permitted edges or bends. We further discuss relations of shortcut hulls with respect to problems from application in cartography and computational geometry (Section 7).

Section snippets

Related work

In the following, we consider research fields that are closely related to our work: At first, the field of representing geometric objects by less complex and possibly schematized geometric objects and, secondly, the field of constrained and weighted triangulations.

The first field is motivated on the one hand by cartographic visualization tasks, where it is generally important to find a good balance between the legibility of a map and the preservation of information [15]. On the other hand, the

Computing optimal shortcut hulls without holes

Let GC be the directed graph induced by the directed edges in C. We call GC the geometric graph of C. If we do not allow the shortcut hull to have holes, we can compute an optimal C-hull Q based on a cost-minimal path in GC; see Fig. 6b. For each edge eC, let P[e] be the section of the outer ring of P between the starting point and the endpoint of e. We call the polygon describing the area enclosed by e and P[e] the pocket of e; see Fig. 6c. For each edge e we introduce costs that rate the

Structural results for shortcut hulls with holes

In this section, we present structural results for ShortcutHull, which we utilize for an algorithm in Section 5. We allow the shortcut hull to have holes.

Computing optimal shortcut hulls with holes

The core of our algorithm is a dynamic programming approach that recursively builds the decomposition tree of T as well as the labeling using the sliced donut D of the input polygon P and the input set of shortcuts C as guidance utilizing Lemma 2. The algorithm consists of the following steps.

  • 1.

    Create a containing box B and the sliced donut D of P and B. Let e be the cut edge of D.

  • 2.

    Create an enrichment C+ of C and D.

  • 3.

    Create the directed graph GC+ induced by the edges in C+, i.e., there is a

Edge and bend restricted shortcut hulls

In this section, we discuss two variants of ShortcutHull in which we restrict the number of edges and bends of the computed shortcut hull. These restrictions are particularly interesting for the simplification of geometric objects as they additionally allow us to easily control the complexity of the simplification.

Applications

We have implemented the algorithm presented in Section 5. For example, computing a shortcut hull for the instance shown in Fig. 2 with 1836 vertices one run of the dynamic programming approach (Step 5) took 400 ms on average using an ordinary laptop. This suggests that despite its cubic worst-case running time our algorithm is efficient enough for real-world applications. However, more experiments are needed to substantiate this finding.

Balancing the costs of area and perimeter  In Fig. 1 we

Conclusion

We introduced a simplification technique for polygons that yields shortcut hulls, i.e., weakly simple polygons that are described by shortcuts and that enclose the input polygon. In contrast to other work, we consider the admissible shortcuts as input. We introduced a cost function of a shortcut hull that is a linear combination of the covered area and the perimeter. Computing optimal shortcut hulls without holes takes O(n2) time. For the case that we permit holes, we presented an algorithm

Declaration of Competing Interest

The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Annika Bonerath reports financial support was provided by German Research Foundation. Joseph S. B. Mitchell reports financial support was provided by National Science Foundation.

Acknowledgements

We thank Nikolas Schwarz from the University of Konstanz, Germany who pointed us to a mistake in a previous version of our paper as well as the anonymous reviewers who provided us with valuable feedback.

This work has partially been funded by the German Research Foundation under Germany's Excellence Strategy, EXC-2070-390732324-PhenoRob, and by the National Science Foundation (Mitchell, CCF-2007275).

References (60)

  • B. Speckmann et al.

    Homotopic c-oriented routing with few links and thick edges

    Comput. Geom.

    (2018)
  • M.A. Abam et al.

    Streaming algorithms for line simplification

    Discrete Comput. Geom.

    (2010)
  • J. Adegeest et al.

    Minimum-link c-oriented paths: single-source queries

    Int. J. Comput. Geom. Appl.

    (1994)
  • T. Ai et al.

    Envelope generation and simplification of polylines using Delaunay triangulation

    Int. J. Geogr. Inf. Sci.

    (2017)
  • T. Ai et al.

    The hierarchical watershed partitioning and data simplification of river network

  • T. Ai et al.

    A simplification of Ria coastline with geomorphologic characteristics preserved

    Mar. Geod.

    (2014)
  • O. Aichholzer et al.

    Geodesic-preserving polygon simplification

    Int. J. Comput. Geom. Appl.

    (2014)
  • C. Alegría et al.

    Efficient computation of minimum-area rectilinear convex hull under rotation and generalizations

    J. Glob. Optim.

    (2021)
  • R. Bar-Yehuda et al.

    Triangulating disjoint Jordan chains

    Int. J. Comput. Geom. Appl.

    (1994)
  • T. Barkowsky et al.

    Schematizing maps: simplification of geographic shape by discrete curve evolution

  • M. Baum et al.

    Scalable exact visualization of isocontours in road networks via minimum-link paths

    J. Comput. Geom.

    (2018)
  • A. Bonerath et al.

    Tight rectilinear hulls of simple polygons

  • A. Bonerath et al.

    Retrieving α-shapes and schematic polygonal approximations for sets of points within queried temporal ranges

  • K. Buchin et al.

    Area-preserving simplification and schematization of polygonal subdivisions

    ACM Trans. Spatial Algorithms Syst.

    (2016)
  • D. Burghardt et al.

    Investigations on cartographic constraint formalisation

  • B. Chazelle

    Triangulating a simple polygon in linear time

    Discrete Comput. Geom.

    (1991)
  • L.P. Chew

    Constrained Delaunay triangulations

    Algorithmica

    (1989)
  • F.Y.L. Chin et al.

    Finding the constrained Delaunay triangulation and constrained Voronoi diagram of a simple polygon in linear time

    SIAM J. Comput.

    (1998)
  • T.H. Cormen et al.

    Introduction to Algorithms

    (2009)
  • J.J. Daymude et al.

    Convex hull formation for programmable matter

  • Cited by (0)

    View full text