24namespace localization {
26namespace pyramid_map {
48 return !(*
this == index);
52 std::ostringstream ss;
54 <<
" Zone ID: " <<
zone_id_ <<
" Easting: " <<
n_ <<
" Northing: " <<
m_
60 const Eigen::Vector3d& coordinate,
61 unsigned int resolution_id,
63 Vector2d coord2d(coordinate[0], coordinate[1]);
68 const Eigen::Vector2d& coordinate,
69 unsigned int resolution_id,
88 std::cerr <<
"MapNodeIndex::get_map_node_index illegal n: " << n
89 <<
",m: " << m << std::endl;
96 unsigned int resolution_id) {
97 return static_cast<unsigned int>(
104 unsigned int resolution_id) {
105 return static_cast<unsigned int>(
T GetMaxY() const
Get the max y of the rectangle.
T GetMaxX() const
Get the max x of the rectangle.
T GetMinX() const
Get the min x of the rectangle.
T GetMinY() const
Get the min y of the rectangle.
The options of the reflectance map.
unsigned int map_node_size_y_
The map node size in pixels.
std::vector< float > map_resolutions_
The pixel resolutions in the map in meters.
Rect2D< double > map_range_
The minimum and maximum UTM range in the map.
unsigned int map_node_size_x_
The map node size in pixels.
unsigned int m_
The map node ID at the northing direction.
bool operator<(const MapNodeIndex &index) const
Overload the less than operator.
static unsigned int GetMapIndexRangeEast(const BaseMapConfig &option, unsigned int resolution_id)
Get the index range (maximum possible index + 1) in the east direction.
std::string ToString() const
bool operator!=(const MapNodeIndex &index) const
Overload the unequal operator.
MapNodeIndex()
The constructor.
unsigned int resolution_id_
The ID of the resolution.
unsigned int n_
The map node ID at the easting direction.
bool operator==(const MapNodeIndex &index) const
Overload the equal operator.
static MapNodeIndex GetMapNodeIndex(const BaseMapConfig &option, const Eigen::Vector3d &coordinate, unsigned int resolution_id, int zone_id)
Construct a map node index, given a global coordinate, eigen version.
static unsigned int GetMapIndexRangeNorth(const BaseMapConfig &option, unsigned int resolution_id)
Get the index range (maximum possible index + 1) in the north direction.
std::ostream & operator<<(std::ostream &cerr, const MapNodeIndex &index)