Skip to content

Comments

[editor] Building levels support in the core.#2670

Merged
ygorshenin merged 6 commits intomapsme:masterfrom
biodranik:building-levels-support
Apr 6, 2016
Merged

[editor] Building levels support in the core.#2670
ygorshenin merged 6 commits intomapsme:masterfrom
biodranik:building-levels-support

Conversation

@biodranik
Copy link
Contributor

No description provided.

@biodranik
Copy link
Contributor Author

DUDE JTTP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

То есть, решили не мёржить всё подряд?

@biodranik biodranik force-pushed the building-levels-support branch 2 times, most recently from 2191496 to 0245a28 Compare April 1, 2016 11:14
@biodranik
Copy link
Contributor Author

@Zverik PTAL DUDE JTTP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем ssize_t, зачем static_cast ??
Лучше size_t i = 2; i < size(); { внутри писать i-2, i-1, i }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (size_t i = 0; i + 2 < utf8.size(); ++i)
Заодно s/utf8String/utf8/

@biodranik biodranik force-pushed the building-levels-support branch from 0245a28 to af10e69 Compare April 1, 2016 12:47
@biodranik
Copy link
Contributor Author

@Zverik @vng @mpimenov поправил все замечания, PTAL DUDE JTTP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот эта строчка зачем? Она не сломает какой-то важный список в приложении?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эта строчка убирает заматчившийся building из вектора всех типов фичи, чтобы по нему зря не бегать дальше в циклах.

On Apr 1, 2016, at 16:02, Ilya Zverev notifications@github.com wrote:

In editor/editor_config.cpp #2670 (comment):

                                   TypeAggregatedDescription & outDesc) const

{

  • bool isBuilding = false;
  • for (auto it = classificatorTypes.begin(); it != classificatorTypes.end(); ++it)
  • {
  • if (*it == "building")
  • {
  •  outDesc.m_address = isBuilding = true;
    
  •  outDesc.m_editableFields.push_back(feature::Metadata::FMD_BUILDING_LEVELS);
    
  •  outDesc.m_editableFields.push_back(feature::Metadata::FMD_POSTCODE);
    
  •  classificatorTypes.erase(it);
    
    Вот эта строчка зачем? Она не сломает какой-то важный список в приложении?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/mapsme/omim/pull/2670/files/af10e69d522742081c4007f6da63a022705f438b#r58201922

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это не повлияет на отображение зданий?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет, это временный вектор, который создается перед вызовом этой функции только с одной целью - передать в нее список типов фичи.

On Apr 1, 2016, at 16:51, Ilya Zverev notifications@github.com wrote:

In editor/editor_config.cpp #2670 (comment):

                                   TypeAggregatedDescription & outDesc) const

{

  • bool isBuilding = false;
  • for (auto it = classificatorTypes.begin(); it != classificatorTypes.end(); ++it)
  • {
  • if (*it == "building")
  • {
  •  outDesc.m_address = isBuilding = true;
    
  •  outDesc.m_editableFields.push_back(feature::Metadata::FMD_BUILDING_LEVELS);
    
  •  outDesc.m_editableFields.push_back(feature::Metadata::FMD_POSTCODE);
    
  •  classificatorTypes.erase(it);
    
    Это не повлияет на отображение зданий?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/mapsme/omim/pull/2670/files/af10e69d522742081c4007f6da63a022705f438b#r58207848

@mpimenov
Copy link
Contributor

mpimenov commented Apr 1, 2016

LGTM

1 similar comment
@Zverik
Copy link
Contributor

Zverik commented Apr 1, 2016

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nd

@biodranik biodranik force-pushed the building-levels-support branch from af10e69 to 48f13c5 Compare April 4, 2016 09:21
@biodranik
Copy link
Contributor Author

@ygorshenin @vng PTAL & merge please.

@biodranik
Copy link
Contributor Author

@ygorshenin @vng PTAL & merge please.
DUDE JTTP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Т.е. наша прога сломается с очередным арабским небоскребом? Зачем как-то ограничивать это чиселко?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы фильтровать мусор из осма, где может быть всё, что угодно.

On 4.4.2016, at 18.29, ygorshenin notifications@github.com wrote:

In generator/osm2meta.cpp:

{

  • double d;
  • if (!strings::to_double(v, d) || d == 0)
  • return {};
  • return strings::to_string_dac(d, 1);
  • // https://en.wikipedia.org/wiki/List_of_tallest_buildings_in_the_world
  • auto constexpr kMaxBuildingLevelsInTheWorld = 167;
    Т.е. наша прога сломается с очередным арабским небоскребом? Зачем как-то ограничивать это чиселко?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы фильтровать мусор из осма достаточно проверить что передано число, а не что передано число до 167.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Превышающие значения будут не около 168, а за 500: это скажется и на нашем рендеринге (наверное, я не проверял), и ещё, может, на чём-нибудь. Не вижу ничего плохого в том, чтобы проверять.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@biodranik biodranik force-pushed the building-levels-support branch from f95ce43 to baf4a0c Compare April 5, 2016 10:55
@biodranik
Copy link
Contributor Author

@ygorshenin @vng PTAL
DUDE JTTP

@biodranik
Copy link
Contributor Author

Падают не мои тесты, они уже пофикшены в мастере, но мой реквест еще фикс не включает.

@vng
Copy link
Contributor

vng commented Apr 5, 2016

LGTM

1 similar comment
@ygorshenin
Copy link
Contributor

LGTM

@ygorshenin ygorshenin merged commit 8a83e58 into mapsme:master Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants