2016-06-12 13:39:09 +03:00
|
|
|
<?php
|
|
|
|
|
2016-09-14 04:16:46 +03:00
|
|
|
|
2016-09-11 06:22:51 +03:00
|
|
|
function formatOSMType($sType, $bIncludeExternal = true)
|
2016-09-04 04:19:48 +03:00
|
|
|
{
|
2021-07-10 15:59:38 +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
|
|
|
|
2021-07-10 15:59:38 +03:00
|
|
|
if (!$bIncludeExternal) {
|
|
|
|
return '';
|
|
|
|
}
|
2016-09-04 04:19:48 +03:00
|
|
|
|
2021-07-10 15:59:38 +03:00
|
|
|
if ($sType == 'T') {
|
|
|
|
return 'way';
|
|
|
|
}
|
|
|
|
if ($sType == 'I') {
|
|
|
|
return 'way';
|
|
|
|
}
|
2016-09-04 04:19:48 +03:00
|
|
|
|
2020-02-09 18:50:04 +03:00
|
|
|
// not handled: P, L
|
|
|
|
|
2016-09-04 04:19:48 +03:00
|
|
|
return '';
|
|
|
|
}
|