<div dir="ltr">Hi Sarah,<div><br></div><div>Thanks for your explanation. That sounds good, the city tag indeed isn't needed anymore. Now you told me that I realise I can fix my formatting of the address based on osm_type.</div><div><br></div><div>If the hit has an osm_type of city, skip the city tag completely in the description of this hit.</div><div><br></div><div>Thanks, this is enough for me I think. But of course, this still needed to be fixed in Photon.</div><div><br></div><div>Good luck getting out of your rabbit hole. Proper tests will be really helpful for this kind of service.</div><div><br></div><div>Regards,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Hendrik Morée</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 16, 2020 at 4:28 PM Sarah Hoffmann <<a href="mailto:lonvia@denofr.de">lonvia@denofr.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Hendrik,<br>
<br>
On Mon, Nov 16, 2020 at 03:51:55PM +0100, Hendrik Moree wrote:<br>
> For example: <a href="https://photon.komoot.io/api/?q=helsinki&lang=en&limit=1" rel="noreferrer" target="_blank">https://photon.komoot.io/api/?q=helsinki&lang=en&limit=1</a><br>
> This returns a name 'Helsinki', and a city 'Helsinki sub-region'<br>
> <br>
> Sub-region's isn't exactly the city, but more a municipality. Is this<br>
> expected behaviour? I think this is caused because the rank of cities is<br>
> from 13 till 17. Shouldn't this be only 15 and 16?<br>
<br>
That's the similar to what was reported in<br>
<a href="https://github.com/komoot/photon/issues/499" rel="noreferrer" target="_blank">https://github.com/komoot/photon/issues/499</a>.<br>
<br>
Helsinki is already a city, so we shouldn't be adding any city<br>
elements at all to the result, i.e address elements should only be<br>
searched up to address rank 12.<br>
<br>
Similar for any other element. We are mapping the 30 address levels of<br>
Nominatim to the 7 address levels of Photon. Each of the levels should<br>
have at maximum one entry, including the place itself.<br>
<br>
I almost had a fix for that but then it didn't quite work as expected.<br>
Because of that I crawled into the rabbit hole called 'we need proper tests'<br>
and I haven't quite come out of this yet.<br>
<br>
Sarah<br>
<br>
_______________________________________________<br>
Photon mailing list<br>
<a href="mailto:Photon@openstreetmap.org" target="_blank">Photon@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/photon" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/photon</a><br>
</blockquote></div>