]> git.openstreetmap.org Git - nominatim.git/blob - lib-php/output.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib-php / output.php
1 <?php
2 /**
3  * SPDX-License-Identifier: GPL-2.0-only
4  *
5  * This file is part of Nominatim. (https://nominatim.org)
6  *
7  * Copyright (C) 2022 by the Nominatim developer community.
8  * For a full list of authors see the git log.
9  */
10
11
12 function formatOSMType($sType, $bIncludeExternal = true)
13 {
14     if ($sType == 'N') {
15         return 'node';
16     }
17     if ($sType == 'W') {
18         return 'way';
19     }
20     if ($sType == 'R') {
21         return 'relation';
22     }
23
24     if (!$bIncludeExternal) {
25         return '';
26     }
27
28     if ($sType == 'T') {
29         return 'way';
30     }
31     if ($sType == 'I') {
32         return 'way';
33     }
34
35     // not handled: P, L
36
37     return '';
38 }