Extend mapcss-mapping functionality and syntax #7728

Open
opened 2024-03-29 11:29:34 +00:00 by pastk · 2 comments
Member

At the moment one needs to examine many files (styles, strings, categories, editor and all over c++ sources) to be able to say how a particular OSM tag is used in OM, whether its drawable, searchable etc.

It makes validation hard and we often forget to add a particular "trait" (like category search) to newly added tags.
Also we have a lot of hardcoded behavior for cases like cuisine, wheelchair (not drawable), "OM-invented" tags like hwtag, etc.

The idea is to make those traits configured more explicitly in the OSM tags mapping config file (atm its data/mapcss-mapping.csv).

  • a good overview of each tag usage (easy to spot mistakes, inconsistencies, easier validation..)
  • easier for the generator to decide what kind of data to include for a tag, whether to put into the search index, etc (less hardcoded logic)

Possible "traits":

  • drawable (or non-drawable)
  • searchable
  • searchable by category
  • translatable
  • acceptable geom types
  • "generated" or "internal" (hwtag, city= ...)
  • attributes or secondary tags supported by the main one
  • editable
  • "special" (implies there is unobvious hardcoded behavior)

The current csv format is not suitable for it, we can migrate to e.g. yaml.
Extended multi-line syntax will allow to also e.g. get rid of replaced_tags.txt.

Related:

At the moment one needs to examine many files (styles, strings, categories, editor and all over c++ sources) to be able to say how a particular OSM tag is used in OM, whether its drawable, searchable etc. It makes validation hard and we often forget to add a particular "trait" (like category search) to newly added tags. Also we have a lot of hardcoded behavior for cases like cuisine, wheelchair (not drawable), "OM-invented" tags like hwtag, etc. The idea is to make those traits configured more explicitly in the OSM tags mapping config file (atm its `data/mapcss-mapping.csv`). - a good overview of each tag usage (easy to spot mistakes, inconsistencies, easier validation..) - easier for the generator to decide what kind of data to include for a tag, whether to put into the search index, etc (less hardcoded logic) Possible "traits": - drawable (or non-drawable) - searchable - searchable by category - translatable - acceptable geom types - "generated" or "internal" (hwtag, city= ...) - attributes or secondary tags supported by the main one - editable - "special" (implies there is unobvious hardcoded behavior) The current csv format is not suitable for it, we can migrate to e.g. yaml. Extended multi-line syntax will allow to also e.g. get rid of `replaced_tags.txt`. Related: - https://git.omaps.dev/organicmaps/organicmaps/issues/5436 - https://git.omaps.dev/organicmaps/organicmaps/issues/1312
Author
Member

mentioned in merge request !7716

mentioned in merge request !7716
Author
Member

mentioned in merge request !10168

mentioned in merge request !10168
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps#7728
No description provided.