diff --git a/data/mapcss-dynamic.txt b/data/mapcss-dynamic.txt index 828f6c5048..c655560149 100644 --- a/data/mapcss-dynamic.txt +++ b/data/mapcss-dynamic.txt @@ -1,3 +1,3 @@ population name -envelope_area +bbox_area diff --git a/indexer/drules_selector.cpp b/indexer/drules_selector.cpp index f838223991..275cc21e3b 100644 --- a/indexer/drules_selector.cpp +++ b/indexer/drules_selector.cpp @@ -111,8 +111,8 @@ bool GetName(FeatureType const & ft, string & name) return true; } -// Feature tag value evaluator for tag 'envelope_area' (envelope area in sq.meters) -bool GetEnvelopeArea(FeatureType const & ft, double & sqM) +// Feature tag value evaluator for tag 'bbox_area' (bounding box area in sq.meters) +bool GetBoundingBoxArea(FeatureType const & ft, double & sqM) { if (feature::GEOM_AREA != ft.GetFeatureType()) return false; @@ -153,7 +153,7 @@ unique_ptr ParseSelector(string const & str) { return make_unique>(&GetName, e.m_operator, e.m_value); } - else if (e.m_tag == "envelope_area") + else if (e.m_tag == "bbox_area") { double value = 0; if (!e.m_value.empty() && (!strings::to_double(e.m_value, value) || value < 0)) @@ -162,7 +162,7 @@ unique_ptr ParseSelector(string const & str) LOG(LDEBUG, ("Invalid selector:", str)); return unique_ptr(); } - return make_unique>(&GetEnvelopeArea, e.m_operator, value); + return make_unique>(&GetBoundingBoxArea, e.m_operator, value); } // Add new tag here diff --git a/indexer/indexer_tests/drules_selector_parser_test.cpp b/indexer/indexer_tests/drules_selector_parser_test.cpp index f9266390a3..3febe79752 100644 --- a/indexer/indexer_tests/drules_selector_parser_test.cpp +++ b/indexer/indexer_tests/drules_selector_parser_test.cpp @@ -19,9 +19,9 @@ UNIT_TEST(TestDruleSelectorIsSet) UNIT_TEST(TestDruleSelectorIsSet2) { SelectorExpression e; - TEST(ParseSelector("envelope_area", e), ()); + TEST(ParseSelector("bbox_area", e), ()); - TEST_EQUAL("envelope_area", e.m_tag, ()); + TEST_EQUAL("bbox_area", e.m_tag, ()); TEST_EQUAL("", e.m_value, ()); TEST_EQUAL(SelectorOperatorIsSet, e.m_operator, ()); } @@ -39,9 +39,9 @@ UNIT_TEST(TestDruleSelectorIsNotSet) UNIT_TEST(TestDruleSelectorIsNotSet2) { SelectorExpression e; - TEST(ParseSelector("!envelope_area", e), ()); + TEST(ParseSelector("!bbox_area", e), ()); - TEST_EQUAL("envelope_area", e.m_tag, ()); + TEST_EQUAL("bbox_area", e.m_tag, ()); TEST_EQUAL("", e.m_value, ()); TEST_EQUAL(SelectorOperatorIsNotSet, e.m_operator, ()); } @@ -79,9 +79,9 @@ UNIT_TEST(TestDruleSelectorLess) UNIT_TEST(TestDruleSelectorLess2) { SelectorExpression e; - TEST(ParseSelector("envelope_area<1000", e), ()); + TEST(ParseSelector("bbox_area<1000", e), ()); - TEST_EQUAL("envelope_area", e.m_tag, ()); + TEST_EQUAL("bbox_area", e.m_tag, ()); TEST_EQUAL("1000", e.m_value, ()); TEST_EQUAL(SelectorOperatorLess, e.m_operator, ()); } @@ -99,9 +99,9 @@ UNIT_TEST(TestDruleSelectorGreater) UNIT_TEST(TestDruleSelectorGreater2) { SelectorExpression e; - TEST(ParseSelector("envelope_area>1000", e), ()); + TEST(ParseSelector("bbox_area>1000", e), ()); - TEST_EQUAL("envelope_area", e.m_tag, ()); + TEST_EQUAL("bbox_area", e.m_tag, ()); TEST_EQUAL("1000", e.m_value, ()); TEST_EQUAL(SelectorOperatorGreater, e.m_operator, ()); }