Location - Field Length

14 views
Skip to first unread message

Johannes Haberl

unread,
Aug 27, 2024, 4:28:28 AM8/27/24
to photini
Is it possible to reduce the length of the city field or better to configure what is shown.
Only the city would be enough. And only the street without the number?

Jim Easterbrook

unread,
Aug 27, 2024, 10:44:24 AM8/27/24
to pho...@googlegroups.com
The problem is that many places don't have a city value. There is no
logic to which elements of an address are included in the reply Photini
gets from OpenCage. You can see the mapping used here:
https://github.com/jim-easterbrook/Photini/blob/1a7947523aaaacba11799e6c27de83113fdc18d0/src/photini/address.py#L74

Photini errs on the side of including everything, as it's often a user
choice of what applies in a particular place. You are expected to edit
the values provided. I sometimes want house numbers, sometimes not.

What works in Germany may not work in the UK or the USA. In the UK a
city is a large town (usually) that has been granted city status. In
some countries it's any populated place.

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Johannes Haberl

unread,
Aug 27, 2024, 11:25:01 AM8/27/24
to photini
ok, thank you

Jim Easterbrook

unread,
Aug 27, 2024, 1:19:40 PM8/27/24
to pho...@googlegroups.com, Jim Easterbrook
On 27/08/2024 15:44, Jim Easterbrook wrote:
>
> Photini errs on the side of including everything, as it's often a user
> choice of what applies in a particular place. You are expected to edit
> the values provided. I sometimes want house numbers, sometimes not.
>
> What works in Germany may not work in the UK or the USA. In the UK a
> city is a large town (usually) that has been granted city status. In
> some countries it's any populated place.

If anyone gets address details that could be improved (e.g. a "city"
name in the "province" field) let me know the coordinates and the error
and I'll see if some adjustment is possible.
Reply all
Reply to author
Forward
0 new messages