|
MalariaSentinel — C++ reference
The contract-defining headers of the ABM engine
|
#include <habitat_engine.hpp>
Public Member Functions | |
| void | load_from_gpkg (const std::string &path, const AOI &aoi) |
| const std::vector< HabitatPatch > & | patches () const |
| const HabitatPatch & | patch_by_id (int64_t pid) const |
Reader of the candidate habitat-patch census: loads the single-layer OGR Point gpkg emitted by ingest and keeps the patches that pass the candidate-potential floor, indexed for O(1) lookup by patch_id.
| void mal_abm_fast::HabitatEngine::load_from_gpkg | ( | const std::string & | path, |
| const AOI & | aoi ) |
Read the candidate-patch gpkg from path and populate patches_. Each row becomes a HabitatPatch (see wire.hpp). Throws std::runtime_error if the OGR driver fails or the layer is missing.
| const HabitatPatch & mal_abm_fast::HabitatEngine::patch_by_id | ( | int64_t | pid | ) | const |
O(1) lookup by patch_id (the gpkg's sequential index, 0-based). Throws std::out_of_range if the id is not present.
|
inline |
Patches loaded from the gpkg. May be empty if the gpkg was absent (the union then comes from the static env planes).