[Photon] City names
Sarah Hoffmann
lonvia at denofr.de
Mon Nov 16 15:27:26 UTC 2020
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
More information about the Photon
mailing list