[Photon] City names

Hendrik Moree hendrikmoree at gmail.com
Tue Nov 17 07:19:48 UTC 2020


Hi Sarah,

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.

If the hit has an osm_type of city, skip the city tag completely in the
description of this hit.

Thanks, this is enough for me I think. But of course, this still needed to
be fixed in Photon.

Good luck getting out of your rabbit hole. Proper tests will be
really helpful for this kind of service.

Regards,

Hendrik Morée


On Mon, Nov 16, 2020 at 4:28 PM Sarah Hoffmann <lonvia at denofr.de> wrote:

> Hi Hendrik,
>
> On Mon, Nov 16, 2020 at 03:51:55PM +0100, Hendrik Moree wrote:
> > For example: https://photon.komoot.io/api/?q=helsinki&lang=en&limit=1
> > This returns a name 'Helsinki', and a city 'Helsinki sub-region'
> >
> > Sub-region's isn't exactly the city, but more a municipality. Is this
> > expected behaviour? I think this is caused because the rank of cities is
> > from 13 till 17. Shouldn't this be only 15 and 16?
>
> That's the similar to what was reported in
> https://github.com/komoot/photon/issues/499.
>
> Helsinki is already a city, so we shouldn't be adding any city
> elements at all to the result, i.e address elements should only be
> searched up to address rank 12.
>
> Similar for any other element. We are mapping the 30 address levels of
> Nominatim to the 7 address levels of Photon. Each of the levels should
> have at maximum one entry, including the place itself.
>
> I almost had a fix for that but then it didn't quite work as expected.
> Because of that I crawled into the rabbit hole called 'we need proper
> tests'
> and I haven't quite come out of this yet.
>
> Sarah
>
> _______________________________________________
> Photon mailing list
> Photon at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/photon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/photon/attachments/20201117/cf7a9113/attachment.htm>


More information about the Photon mailing list