Nominatim/lib-php/output.php

39 lines
660 B
PHP
Raw Normal View History

<?php
2022-01-03 18:23:58 +03:00
/**
* SPDX-License-Identifier: GPL-2.0-only
*
* This file is part of Nominatim. (https://nominatim.org)
*
* Copyright (C) 2022 by the Nominatim developer community.
* For a full list of authors see the git log.
*/
function formatOSMType($sType, $bIncludeExternal = true)
2016-09-04 04:19:48 +03:00
{
if ($sType == 'N') {
return 'node';
}
if ($sType == 'W') {
return 'way';
}
if ($sType == 'R') {
return 'relation';
}
2016-09-04 04:19:48 +03:00
if (!$bIncludeExternal) {
return '';
}
2016-09-04 04:19:48 +03:00
if ($sType == 'T') {
return 'way';
}
if ($sType == 'I') {
return 'way';
}
2016-09-04 04:19:48 +03:00
// not handled: P, L
2016-09-04 04:19:48 +03:00
return '';
}