diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2015-08-13 11:27:42 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:01:25 +0300 |
commit | 923875cb959272a35fd2d608a68369f07db2e41e (patch) | |
tree | 300d505509a817a839658babda6cf062fc32eed6 /generator | |
parent | 0c4336a2a081a0f19c6e5441c280ab83cb010790 (diff) |
Optimize emit points
Diffstat (limited to 'generator')
-rw-r--r-- | generator/osm_element.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/generator/osm_element.hpp b/generator/osm_element.hpp index 6c3fe3a8a6..dc98456cde 100644 --- a/generator/osm_element.hpp +++ b/generator/osm_element.hpp @@ -407,15 +407,14 @@ public: { if (p->type == XMLElement::EntityType::Node) { + if (p->childs.empty()) + return; FeatureParams params; if (!ParseType(p, params)) return; - m2::PointD pt; - if (p->childs.empty() || !GetPoint(p->id, pt)) - return; - + m2::PointD const pt = MercatorBounds::FromLatLon(p->lat, p->lon); EmitPoint(pt, params, osm::Id::Node(p->id)); } else if (p->type == XMLElement::EntityType::Way) |