File indexing completed on 2024-11-17 04:47:25

0001 /*
0002     SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "datatypes.h"
0010 
0011 namespace OSM {
0012 
0013 /** Distance between two coordinates. */
0014 uint32_t distance(double lat1, double lon1, double lat2, double lon2);
0015 
0016 /** Distance between @p coord1 and @p coord2 in meter. */
0017 uint32_t distance(Coordinate coord1, Coordinate coord2);
0018 
0019 /** Distance between the given polygon and coordinate, in meter. */
0020 uint32_t distance(const std::vector<const OSM::Node*> &path, Coordinate coord);
0021 
0022 }
0023