Template:TagCount/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

This is a documentation subpage for Template:TagCount.
It contains usage information, categories and other content or metadata that is not part of the original template.

This template fetches and displays a count of elements for the specified key or value from Taginfo.

Parameters

  • {{{1}}}key whose count is obtained, for example building=*
  • {{{2}}} – optional value for the specified key whose count is obtained. If omitted, count of all objects tagged with the key is displayed.
  • {{{3}}} – optional type of objects whose count is obtained. It may take the following values:
    • all – (default) all object types are fetched
    • node – only nodes are fetched
    • way – only ways are fetched. It is not possible to distinguish open and closed ways (areas).
    • rel – only relations are fetched. It is not possible to distinguish by type of relation.

Usage

Examples:

  • {{TagCount|building}} produces (total count of building=* elements)
  • {{TagCount|building|detached}} produces (total count of building=detached objects)
  • {{TagCount|building|detached|node}} produces (total count of building=detached nodes)
  • {{TagCount|building|detached|way}} produces (total count of building=detached ways)
  • {{TagCount|building|detached|rel}} produces (total count of building=detached relations, presumably multipolygons)
  • {{TagCount|building||node}} produces (total count of building=* nodes, regardless of tag value)

See also