English

Efficient Fr\'echet distance queries for segments

Computational Geometry 2022-03-04 v1

Abstract

We study the problem of constructing a data structure that can store a two-dimensional polygonal curve PP, such that for any query segment ab\overline{ab} one can efficiently compute the Fr\'{e}chet distance between PP and ab\overline{ab}. First we present a data structure of size O(nlogn)O(n \log n) that can compute the Fr\'{e}chet distance between PP and a horizontal query segment ab\overline{ab} in O(logn)O(\log n) time, where nn is the number of vertices of PP. In comparison to prior work, this significantly reduces the required space. We extend the type of queries allowed, as we allow a query to be a horizontal segment ab\overline{ab} together with two points s,tPs, t \in P (not necessarily vertices), and ask for the Fr\'{e}chet distance between ab\overline{ab} and the curve of PP in between ss and tt. Using O(nlog2n)O(n\log^2n) storage, such queries take O(log3n)O(\log^3 n) time, simplifying and significantly improving previous results. We then generalize our results to query segments of arbitrary orientation. We present an O(nk3+ε+n2)O(nk^{3+\varepsilon}+n^2) size data structure, where k[1..n]k \in [1..n] is a parameter the user can choose, and ε>0\varepsilon > 0 is an arbitrarily small constant, such that given any segment ab\overline{ab} and two points s,tPs, t \in P we can compute the Fr\'{e}chet distance between ab\overline{ab} and the curve of PP in between ss and tt in O((n/k)log2n+log4n)O((n/k)\log^2n+\log^4 n) time. This is the first result that allows efficient exact Fr\'{e}chet distance queries for arbitrarily oriented segments. We also present two applications of our data structure: we show that we can compute a local δ\delta-simplification (with respect to the Fr\'{e}chet distance) of a polygonal curve in O(n5/2+ε)O(n^{5/2+\varepsilon}) time, and that we can efficiently find a translation of an arbitrary query segment ab\overline{ab} that minimizes the Fr\'{e}chet distance with respect to a subcurve of PP.

Keywords

Cite

@article{arxiv.2203.01794,
  title  = {Efficient Fr\'echet distance queries for segments},
  author = {Maike Buchin and Ivor van der Hoog and Tim Ophelders and Lena Schlipf and Rodrigo I. Silveira and Frank Staals},
  journal= {arXiv preprint arXiv:2203.01794},
  year   = {2022}
}
R2 v1 2026-06-24T10:01:00.877Z