Determine if a geographic area contains a point

This commit is contained in:
Dan Paulat 2023-12-02 07:42:29 -06:00
parent 6ec594144d
commit 8780da4148
5 changed files with 85 additions and 1 deletions

View file

@ -1,5 +1,9 @@
#pragma once
#include <scwx/common/geographic.hpp>
#include <vector>
#include <GeographicLib/Geodesic.hpp>
#include <units/angle.h>
#include <units/length.h>
@ -20,6 +24,18 @@ namespace GeographicLib
*/
const ::GeographicLib::Geodesic& DefaultGeodesic();
/**
* Determine if an area/ring, oriented in either direction, contains a point. A
* point lying on the area boundary is considered to be inside the area.
*
* @param [in] area A vector of Coordinates representing the area
* @param [in] point The point to check against the area
*
* @return true if point is inside the area
*/
bool AreaContainsPoint(const std::vector<common::Coordinate>& area,
const common::Coordinate& point);
/**
* Get the angle between two points.
*