Skip to content
Snippets Groups Projects
Commit 2cac3c19 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Assigned a default lane with to all roads. Not read from the OSM file.

parent 42a81b12
No related branches found
No related tags found
1 merge request!2Solved a bug when creating a new geometry object: the sale factor is...
#ifndef _OSM_COMMON_H
#define _OSM_COMMON_H
#define DEFAULT_LANE_WIDTH 3.0
#define DEFAULT_LANE_WIDTH 4.0
#define DEFAULT_MIN_RADIUS 5.0
#define MIN_ROAD_LENGTH 0.5
......
......@@ -84,11 +84,12 @@ COSMWay::COSMWay(const osmium::Way &way,COSMMap *parent)
this->num_backward_lanes=std::stoi(std::string(value));
}
// get the road width
value=way.get_value_by_key("width");
if(value==NULL)
this->lane_width=-1.0;
else
this->lane_width=std::stof(std::string(value))/(this->num_forward_lanes+this->num_backward_lanes);
// value=way.get_value_by_key("width");
// if(value==NULL)
// this->lane_width=-1.0;
// else
// this->lane_width=std::stof(std::string(value))/(this->num_forward_lanes+this->num_backward_lanes);
this->lane_width=DEFAULT_LANE_WIDTH;
// get the lane constraints
this->load_lane_restrictions(way);
// create and add the way
......
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