GEOS 3.16.0dev
CoordinateSequenceLocation.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2026 Martin Davis
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: operation/distance/CoordinateSequenceLocation.java (aff11591)
16 *
17 **********************************************************************/
18
19#pragma once
20
21#include <geos/export.h>
22#include <geos/geom/Coordinate.h>
23
24#include <cstddef>
25
26namespace geos {
27namespace geom {
28class CoordinateSequence;
29}
30}
31
32namespace geos {
33namespace operation {
34namespace distance {
35
49public:
50
52 std::size_t index,
53 const geom::CoordinateXY& pt);
54
55 const geom::CoordinateXY& getCoordinate() const;
56
57 std::size_t getIndex() const;
58
59 bool isSameSegment(const CoordinateSequenceLocation& f) const;
60
61 const geom::CoordinateXY& getEndPoint(int i) const;
62
63 std::size_t normalize(std::size_t index) const;
64
65private:
66
67 const geom::CoordinateSequence* seq;
68 std::size_t index;
69 geom::CoordinateXY pt;
70
71 bool isNext(std::size_t index, std::size_t index1) const;
72};
73
74} // namespace distance
75} // namespace operation
76} // namespace geos
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
Definition CoordinateSequenceLocation.h:48
Basic namespace for all GEOS functionalities.
Definition geos.h:38