Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-10-19 15:58:43 +0300
committerLev Dragunov <l.dragunov@corp.mail.ru>2015-10-19 15:58:43 +0300
commit4737cdf2ce045c40c7af9f35a41b20c733e583c0 (patch)
treecb55de1d4d29d156a883e6c015b3c259cdf9539a /generator
parent64f97ff659413eb416e9f3789f9fad981c8f884b (diff)
[routing] Cross section geometry generation fix.
Diffstat (limited to 'generator')
-rw-r--r--generator/routing_generator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/generator/routing_generator.cpp b/generator/routing_generator.cpp
index d680ad1259..053fe02aaa 100644
--- a/generator/routing_generator.cpp
+++ b/generator/routing_generator.cpp
@@ -119,10 +119,14 @@ void FindCrossNodes(osrm::NodeDataVectorT const & nodeData, gen::OsmID2FeatureID
if (outStart == outEnd)
continue;
- border.FindIntersection(MercatorBounds::FromLatLon(segment.lat1, segment.lon1),
- MercatorBounds::FromLatLon(segment.lat2, segment.lon2),
- intersection);
+ if (!border.FindIntersection(MercatorBounds::FromLatLon(segment.lat1, segment.lon1),
+ MercatorBounds::FromLatLon(segment.lat2, segment.lon2),
+ intersection))
+ {
+ ASSERT(false, ("Can't determine a intersection point with a border!"));
+ continue;
+ }
// for old format compatibility
intersection = m2::PointD(MercatorBounds::XToLon(intersection.x), MercatorBounds::YToLat(intersection.y));
if (!outStart && outEnd)