From 2cac3c1932e0c1380e5bcbcdebce810b3c787e26 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 4 Sep 2023 18:39:23 +0200 Subject: [PATCH] Assigned a default lane with to all roads. Not read from the OSM file. --- include/osm/osm_common.h | 2 +- src/osm/osm_way.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/osm/osm_common.h b/include/osm/osm_common.h index 921e276..843ffcc 100644 --- a/include/osm/osm_common.h +++ b/include/osm/osm_common.h @@ -1,7 +1,7 @@ #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 diff --git a/src/osm/osm_way.cpp b/src/osm/osm_way.cpp index 5b97dfc..e07adfe 100644 --- a/src/osm/osm_way.cpp +++ b/src/osm/osm_way.cpp @@ -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 -- GitLab