|
| bool | load (const std::string &path, std::string *error=nullptr) |
| bool | load (const uint8_t *data, std::size_t length, std::string *error=nullptr) |
| bool | is_inside (M49Code country, const GeodeticPosition &position) const |
| bool | empty () const |
Definition at line 14 of file country_database.hpp.
◆ embedded()
| CountryDatabase vanetza::geodesy::CountryDatabase::embedded |
( |
std::string * | error = nullptr | ) |
|
|
static |
Create a CountryDatabase from embedded country data. Only available when built with VANETZA_WITH_EMBEDDED_COUNTRY_DATA.
- Parameters
-
| [out] | error | optional error message |
- Returns
- loaded database, or empty database on failure
Definition at line 19 of file country_database.cpp.
◆ empty()
| bool vanetza::geodesy::CountryDatabase::empty |
( |
| ) |
const |
Check if the database contains any country data.
- Returns
- true if no countries are loaded
Definition at line 78 of file country_database.cpp.
◆ is_inside()
Check if a geodetic position lies within a country.
- Parameters
-
| country | M.49 country code |
| position | geodetic position to check |
- Returns
- true if position is inside the country's boundaries
Definition at line 67 of file country_database.cpp.
◆ load() [1/2]
| bool vanetza::geodesy::CountryDatabase::load |
( |
const std::string & | path, |
|
|
std::string * | error = nullptr ) |
Load country data from a file.
- Parameters
-
| [in] | path | path to the binary country data file |
| [out] | error | optional error message |
- Returns
- true on success
Definition at line 33 of file country_database.cpp.
◆ load() [2/2]
| bool vanetza::geodesy::CountryDatabase::load |
( |
const uint8_t * | data, |
|
|
std::size_t | length, |
|
|
std::string * | error = nullptr ) |
Load country data from a memory buffer.
- Parameters
-
| [in] | data | pointer to binary data |
| [in] | length | size of data in bytes |
| [out] | error | optional error message |
- Returns
- true on success
Definition at line 47 of file country_database.cpp.
◆ m_countries
| std::unordered_map<M49Code, CountryPolygon> vanetza::geodesy::CountryDatabase::m_countries |
|
private |
The documentation for this class was generated from the following files: