Skip to content
Snippets Groups Projects
Commit 1bf1ba61 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Add set/get_utm_zone functions

parent 98223daa
No related branches found
No related tags found
No related merge requests found
Pipeline #17228 failed
......@@ -36,6 +36,7 @@ class CRoadMap
std::vector<CRoad *> roads;
std::vector<CJunction *> junctions;
double resolution;
int utm_zone;
protected:
void free(void);
unsigned get_next_segment_id(void);
......@@ -55,6 +56,8 @@ class CRoadMap
void load_osm(const std::string &filename);
void set_resolution(double resolution);
double get_resolution(void);
void set_utm_zone(int zone);
int get_utm_zone(void);
std::vector<unsigned int> get_path_sub_roadmap(std::vector<unsigned int> &segment_ids,CRoadMap &new_road_map);
double get_path_length(std::vector<unsigned int> &segment_ids);
/* connectivity */
......
......@@ -14,6 +14,7 @@
CRoadMap::CRoadMap()
{
this->resolution=0.1;
this->utm_zone=31;
this->next_segment_id=0;
this->next_road_id=0;
this->next_junction_id=0;
......@@ -383,6 +384,7 @@ void CRoadMap::save_opendrive(const std::string &filename)
void CRoadMap::load_osm(const std::string &filename)
{
COSMMap road_map;
road_map.set_utm_zone(this->utm_zone);
this->free();
road_map.load(filename);
......@@ -403,6 +405,16 @@ double CRoadMap::get_resolution(void)
return this->resolution;
}
void CRoadMap::set_utm_zone(int zone)
{
this->utm_zone=zone;
}
int CRoadMap::get_utm_zone(void)
{
return this->utm_zone;
}
std::vector<unsigned int> CRoadMap::get_path_sub_roadmap(std::vector<unsigned int> &segment_ids,CRoadMap &new_road_map)
{
std::map<CRoad *,CRoad *> road_ref_update;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment