mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 11:00:06 +00:00 
			
		
		
		
	Determine if a geographic area contains a point
This commit is contained in:
		
							parent
							
								
									6ec594144d
								
							
						
					
					
						commit
						8780da4148
					
				
					 5 changed files with 85 additions and 1 deletions
				
			
		|  | @ -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. | ||||
|  * | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat