[Imports] Latvia-bot

Dāvis Kļaviņš davisklavins at gmail.com
Tue Jan 3 12:38:39 UTC 2023


On Tue, 3 Jan 2023 at 11:56, Sarah Hoffmann <lonvia at denofr.de> wrote:

> I strongly recommend that you describe the exact changes you want to do
> before you do any further uploads to the database. The public database
> is not a playground for yo to toy around with until you get it right.
>
> On Tue, Jan 03, 2023 at 10:58:30AM +0200, Dāvis Kļaviņš wrote:
> > On Tue, 3 Jan 2023 at 10:19, Sarah Hoffmann <lonvia at denofr.de> wrote:
> >
> > > Unfortunately, you have now broken the addresses which do not have a
> > > street. These are the ones were you need addr:place.
> > >
> >
> > When you point to such a fact, I was able to find at Key:addr:place
> > <https://wiki.openstreetmap.org/wiki/Key:addr:place> that "it is okay to
> > have both addr:place=* and addr:city=* with the same value on the same
> > object". Will fix it. At the same time, there is nothing written about it
> > at Key:addr:city <https://wiki.openstreetmap.org/wiki/Key:addr:city>,
> > although there should be.
>
> addr:place and addr:city may appear together when they refer to
> different places which both would appear in the postal address. Do not
> duplicate them when they refer to the same place or datausers will
> interpret the address wrong.
>

Then why does the wiki state that "it is okay to have both addr:place=* and
addr:city=* *with the same value on the same object*"? It's rather
impossible to do things right when wiki says one thing, but some other user
says the opposite.


> > > > https://www.openstreetmap.org/way/1001090030 (name consisting of
> name
> > > and
> > > > number),
> > >
> > > Should probably be:
> > >
> > >   addr:housenumber=48
> > >   addr:place=Salenieki
> > >
> > >
> > No, in Latvia, housenames are not further separated in parts but treated
> as
> > a whole. Per legislation. In full address notation, this would be
> > "Salenieki 48", Salaspils pag., Salaspils nov., LV-2118.
>
> The format used by the legislation is only marginally relevant in this
> discussion. The more important part is to get the format right, so OSM
> data users can interpret the address. If you leave the address as is
> with jus the addr:housename and no addr:street or addr:place, then the
> address will per convention be interpreted as a street address, i.e.
> addr:street will be derived from the nearest street. You'll see that
> when searching for the address:
> https://www.openstreetmap.org/search?query=Salenieki%2048
>
>
For this particular address, the upper object is rural territory
("Salaspils pag."), not a village or any other settlement. Although
Salenieki looks like a village, interpreting it as such in context of an
address would be wrong. Or should addr:place contain the value of
addr:subdistrict ("Salaspils pagasts")? Then such an assumption I would
like to see documented in wiki. Probably in such cases Nominatim should be
improved not to add the nearest road and a bunch of nearest settlements
(all of "C11, Vācu Kalni, Augstkalni, Salenieki" are erroneously added) in
Latvia? Since address data is being updated with the bot, all necessary
data to create an address notation, are within addr.* tags (except
country), so there is no need to add anything else from other objects
(street names, settlements etc.) in Latvia. Seems that country specific
configuration exists (
https://github.com/osm-search/Nominatim/blob/master/settings/address-levels.json).
Ideally, results should match the address notation in the State Address
Register (e.g., when searching for an address at kadastrs.lv
<https://www.kadastrs.lv/> (National Address Register > Search address) or
BalticMaps <https://balticmaps.eu/en/> (the latter visually excludes
postcodes from search results and housenames aren't quoted)).


> > > > https://www.openstreetmap.org/way/237853362 (number in a village),
> > >
> > > Should be:
> > >
> > >   addr:housenumber=1
> > >   addr:place=Feimaņi
> > >
> >
> > Although it looks like a number, it's a housename in the State Address
> > Register. In full address notation, all housenames are put in double
> > quotes. This one would be "1", Feimaņi, Feimaņu pag., Rēzeknes nov.,
> > LV-4623.
>
> There is a common misconception that an import source is wisely
> structured just because it is 'official'. It is not.
> Official database were made by humans, too. Somebody came up with a
> database schema on their desk based on the couple of examples they were
> familiar with. And then they hit reality, which didn't fit the neat
> schema at all. So they stuffed the data into the database anyways as best
> as it's possible without changing the schema and then put a complicated
> 'legislation' on top to explain away the errors. There is no need to
> copy the errors 1:1 into OSM. We are in the fortunate position that we
> can change our schema when reality doesn't fit our preconceptions.
> This is how addr:place came to be. We started out with the assumption
> that every address has a street. When we found out that this is wrong,
> we adapted the schema instead of reassigning addr:housenumber a new
> function.
>
> In this address the "1" smells like a house number, looks like a house
> number,
> behaves like a house number, so addr:housenumber it should be. Not doing so
> will give you the strangest misbehaviour when the data is used.
> For example, as long as you insist on using addr:housename this address
> can only
> be found with '1 Feimaņi, Latvia' but not with 'Feimaņi 1, Latvia'.
> That is not a bug, it is a feature.
>

It's OK not to be found with "Feimaņi 1, Latvia" because village comes
after housename or streetname+housenumber. "Feimaņi 1" would mean either
housename, or name of village/town/city, none of which exist. Btw, if
country isn't added, it's found even with "Feimaņi 1".
Interpreting on top of local legislation is necessary because it's used
outside OSM. If somebody wants to find an address in OSM, he expects it to
follow rules used elsewhere. Otherwise he might not be able to find an
address.
Technically, it's not hard to separate housenames that look like numbers
(also with letters etc., e.g., 1A, 1/3) into addr:housenumber. As Mateusz
also pointed out, I'll change it as it doesn't complicate the ability to
construct proper address notation much and even in legislation it's called
number in some (but not all) places as it looks like one (Articel 43.1.
<https://likumi.lv/ta/id/324387#p43>).

 Sarah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/imports/attachments/20230103/f2a887a8/attachment.htm>


More information about the Imports mailing list