Class astrea::trace::SpatialIndex¶
ClassList > astrea > trace > SpatialIndex
Spatial index for efficient ground point queries. More...
#include <SpatialIndex.hpp>
Public Functions¶
| Type | Name |
|---|---|
| SpatialIndex (const Angle & binSize=10.0 *mp_units::angular::unit_symbols::deg) Construct spatial index with specified bin size. |
|
| void | add_ground_point (std::size_t groundPointIdx, const Angle & lat, const Angle & lon) Add a ground point to the index. |
| void | clear () Clear all ground points from the index. |
| std::vector< std::size_t > | get_all_ground_points () const Get all ground point indices. |
| std::unordered_set< std::size_t > | get_nearby_ground_points (const Angle & lat, const Angle & lon, const Angle & radius) const Get ground points within a radius of a lat/lon position. |
Detailed Description¶
Divides the Earth's surface into geographic bins to quickly find which ground points are near a satellite's subsatellite point
Public Functions Documentation¶
function SpatialIndex¶
Construct spatial index with specified bin size.
astrea::trace::SpatialIndex::SpatialIndex (
const Angle & binSize=10.0 *mp_units::angular::unit_symbols::deg
)
Parameters:
binSizeAngular size of each bin (smaller = more bins, finer resolution)
function add_ground_point¶
Add a ground point to the index.
void astrea::trace::SpatialIndex::add_ground_point (
std::size_t groundPointIdx,
const Angle & lat,
const Angle & lon
)
Parameters:
groundPointIdxIndex of the ground point being added (used for lookup)latLatitude of the ground pointlonLongitude of the ground point
function clear¶
Clear all ground points from the index.
function get_all_ground_points¶
Get all ground point indices.
Returns:
std::vector<std::size_t> Vector of all ground point indices in the index
function get_nearby_ground_points¶
Get ground points within a radius of a lat/lon position.
std::unordered_set< std::size_t > astrea::trace::SpatialIndex::get_nearby_ground_points (
const Angle & lat,
const Angle & lon,
const Angle & radius
) const
Parameters:
latLatitude of center pointlonLongitude of center pointradiusAngular radius to search
Returns:
Set of ground point indices within radius
The documentation for this class was generated from the following file astrea/trace/trace/analysis/SpatialIndex.hpp