Skip to content

[index][generator] Separate TypeAlways exist. Distinguish always existing types from nondrawable types which we do not want to remove.#9933

Merged
maksimandrianov merged 1 commit into
mapsme:masterfrom
tatiana-yan:remove_cuisine_visible_always
Nov 28, 2018

Conversation

@tatiana-yan

Copy link
Copy Markdown
Contributor

У нас для невидимых типов существовало 2 варианта поведения:

  • либо мы удаляем тип из объектов вообще: без специальных костылей от amenity=cafe + internet_access=wlan + cuisine=vegeterian, осталось бы только amenity=cafe при эмите
  • либо мы невидимый тип считаем видимым везде и всегда, даже если других видимых тегов нет, на любом зуме и т.п. -- объект wheelchair=yes без каких-либо ещё тегов заэмитится на всех уровнях зума.

В этом реквесте делаю третий вариант поведения -- типы для cuisine, wheelchair, hwtag, psurfaсe оставляем, если у объекта есть другие видимые типы. То есть на кафешках у которых есть тег cuisine он останется, без кафешки объект с cuisine но без других типов эмититься не будет. wheelchair=yes без других типов эмититься не будет (с другими типами -- будет). То же самое psurfaсe/hwtag -- если есть дорожная фича с дорожными тегами, там psurfaсe/hwtag останется, если он просто на произвольном объекте у которого других тегов нет, то такой объект эмитить не будем.

internet_access остается в числе тех, что эмитим безусловно, т.к. он бывает без других типов (например, точка доступа в парке). Возможно нам надо такие объекты рисовать и эмитить нормально, а не через костыль (для справки, в Москве таких объектов около 30).

С roundabout надо разбираться отдельно, там кажется может быть сложнее.
Спонсорские типы не трогаю, т.к. для них может быть важно то что они заэмичены везде и всё вытесняют -- тоже надо разбираться отдельно.

@tatiana-yan

Copy link
Copy Markdown
Contributor Author

JTA

@tatiana-yan

Copy link
Copy Markdown
Contributor Author

по поводу hwtag и psurface: сгенерировала mwm с Исландией с роутингом. Вижу что на дорогах hwtag и psurface на месте. Например hwtag oneway есть и работает:
screen shot 2018-11-28 at 11 22 25
в сгенерированной Исландии 28720 фичей с тегом psurface. Раньше было чуть больше 29066.
Посмотрела какие фичи пропали, например такие:

{"geometry": {"type": "LineString"}, "header": {"types": ["psurface-paved_good"]}, "id": 5374, "size": 13}
{"geometry": {"type": "LineString"}, "header": {"types": ["psurface-paved_good"]}, "id": 5378, "size": 13}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Miðbraut"}, "types": ["psurface-paved_good"]}, "id": 5869, "size": 23}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Borgarspítalinn"}, "types": ["psurface-paved_good"]}, "id": 7988, "size": 31}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Strandasel"}, "types": ["psurface-paved_good"]}, "id": 8769, "metadata": {"postcode": "109"}, "size": 25}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Íþróttamiðstöð ÍR"}, "types": ["psurface-paved_good"]}, "id": 9307, "size": 38}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Austurberg"}, "types": ["psurface-paved_good"]}, "id": 10660, "size": 25}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Bústaðakirkja"}, "types": ["psurface-paved_good"]}, "id": 12071, "size": 30}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Perlan", "ru": "Перлан"}, "types": ["psurface-paved_good"]}, "id": 14890, "size": 37}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Kringlan"}, "types": ["psurface-paved_good"]}, "id": 15349, "size": 23}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Laugardalshöll"}, "types": ["psurface-paved_good"]}, "id": 17873, "size": 30}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Vogar"}, "types": ["psurface-paved_good"]}, "id": 18075, "size": 20}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Vogar"}, "types": ["psurface-paved_good"]}, "id": 18163, "size": 20}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Sægarðar"}, "types": ["psurface-paved_good"]}, "id": 18540, "size": 24}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Sund"}, "types": ["psurface-paved_good"]}, "id": 18565, "size": 19}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Funafold"}, "types": ["psurface-paved_good"]}, "id": 18839, "size": 22}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Funafold"}, "types": ["psurface-paved_good"]}, "id": 18840, "size": 22}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "OLÍS"}, "types": ["psurface-paved_good"]}, "id": 18867, "size": 20}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Borgarvegur"}, "types": ["psurface-paved_good"]}, "id": 21682, "size": 26}
{"geometry": {"type": "LineString"}, "header": {"name": {"default": "Borgavegur"}, "types": ["psurface-paved_good"]}, "id": 21982, "size": 25}
{"geometry": {"type": "LineString"}, "header": {"types": ["psurface-unpaved_bad"]}, "id": 26959, "size": 23}

@bykoianko мы же не поддерживаем роутинг по фичам у которых есть psurface, но нет highway?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In line comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@tatiana-yan
tatiana-yan force-pushed the remove_cuisine_visible_always branch from edbb137 to 8a03edc Compare November 28, 2018 09:15
Comment thread indexer/feature_visibility.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/NotUseful/Useless/ ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread indexer/feature_visibility.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Предлагаю заодно скобки убрать

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread generator/translator_planet.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/different/differently/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread indexer/feature_visibility.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

const после типа?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@bykoianko

Copy link
Copy Markdown
Contributor

Как говорили, надо бы запустить генерацию карт за ранее и проверить все роутинг тесты.

@bykoianko bykoianko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

…ting types from nondrawable types which we do not want to remove.
@tatiana-yan
tatiana-yan force-pushed the remove_cuisine_visible_always branch from 8a03edc to e3e1ae6 Compare November 28, 2018 10:18

@mpimenov mpimenov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tatiana-yan

Copy link
Copy Markdown
Contributor Author

@maksimandrianov PTAL

@maksimandrianov maksimandrianov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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