]> git.openstreetmap.org Git - nominatim.git/log
nominatim.git
2 days agoprepare release 5.3.3.post4 master
Sarah Hoffmann [Fri, 27 Nov 2026 13:09:05 +0000 (14:09 +0100)]
prepare release 5.3.3.post4

2 days agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Fri, 27 Nov 2026 10:56:35 +0000 (11:56 +0100)]
Merge remote-tracking branch 'upstream/master'

2 days agoRemove private parking spaces from index (#4247)
Sarah Hoffmann [Fri, 27 Nov 2026 10:56:05 +0000 (11:56 +0100)]
Remove private parking spaces from index (#4247)

There are about 850k private `amenity=parking` in OSM which don't
contribute much to searchability. This removes them. I've intentionally
left parkings with `access=customer` and `access=destination` so that
searches like `parking near IKEA Berlin` still work (to the extend that
they work, of course).

2 days agoIntroduce table for saving label-member relations (#4246)
Sarah Hoffmann [Fri, 27 Nov 2026 10:08:06 +0000 (11:08 +0100)]
Introduce table for saving label-member relations (#4246)

This adds a new table `place_label_members` which stores node IDs that
are a member with role 'label' in a relation. The table is filled by
osm2pgsql. A membership is considered valid only when there is exactly
one label member with a node in a relation. The linking code now uses
that table to look up members instead of going through the members
loaded from `planet_osm_rels`. This should be a bit faster and has the
added bonus that it now can reject label nodes when they appear in more
than one relation. This was a source of confusion for Nominatim.

This is the first in a series of PRs to stop Nominatim from using the
osm2pgsql middle tables. This is in preparation for the next version of
osm2pgsql which will have a [new middle
implementation](https://osm2pgsql.org/project-coda/) that is a lot more
compact but no longer accessible in PostgreSQL.

2 days agoremove private parking spaces from index
Sarah Hoffmann [Thu, 26 Nov 2026 16:51:21 +0000 (17:51 +0100)]
remove private parking spaces from index

2 days agoadd migration for new place_label_members table
Sarah Hoffmann [Thu, 26 Nov 2026 16:19:59 +0000 (17:19 +0100)]
add migration for new place_label_members table

2 days agoadapt tests for new place_label_member table
Sarah Hoffmann [Thu, 26 Nov 2026 14:19:05 +0000 (15:19 +0100)]
adapt tests for new place_label_member table

3 days agosave boundary-label relation in seprate table
Sarah Hoffmann [Sun, 22 Nov 2026 21:33:35 +0000 (22:33 +0100)]
save boundary-label relation in seprate table

3 days agoprepare release 5.3.3.post3
Sarah Hoffmann [Thu, 26 Nov 2026 14:23:22 +0000 (15:23 +0100)]
prepare release 5.3.3.post3

3 days agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Thu, 26 Nov 2026 14:20:51 +0000 (15:20 +0100)]
Merge remote-tracking branch 'upstream/master'

3 days agoAdd named rapids to index (#4245)
Sarah Hoffmann [Thu, 26 Nov 2026 14:19:59 +0000 (15:19 +0100)]
Add named rapids to index (#4245)

This adds extra places to the index for OSM objects tagged with `rapids`
and `rapids:name`.

The tagging for rapids is a bit unfortunate as the tag can contain the
difficulty of the rapids as a number or even a number range. This makes
the `rapids` tag itself unsuitable for use as a main tag. So this PR
adds the ability to set a custom main tag when adding additional place
variants. For the rapids, it ends up with `rapids=yes` as the main tag,
while the `rapids` tag itself is pushed into extratags so that the rapid
classification remains accessible.

Also, `rapids=no` + `rapids:name` are ignored. Just doesn't make sense.

Closes #4234.

3 days agoadd documentation for new main tag customization
Sarah Hoffmann [Wed, 25 Nov 2026 18:29:30 +0000 (19:29 +0100)]
add documentation for new main tag customization

3 days agoadd rapids when a rapids:name is present
Sarah Hoffmann [Wed, 25 Nov 2026 18:25:37 +0000 (19:25 +0100)]
add rapids when a rapids:name is present

3 days agolua: allow to customize main tag for separate places
Sarah Hoffmann [Wed, 25 Nov 2026 18:25:11 +0000 (19:25 +0100)]
lua: allow to customize main tag for separate places

3 days agoLua: fix bug in clearing of main tag filter (#4244)
Sarah Hoffmann [Thu, 26 Nov 2026 08:45:36 +0000 (09:45 +0100)]
Lua: fix bug in clearing of main tag filter (#4244)

This fixes a bug in Lua where a table was accidentally modified by being
iterated over. The bug has been present for a long time but only
manifested until recently with an occasionally failing BDD test.
Production is unlikely to be affected because even custom scripts will
rarely reset the main tag list filter. They will only set it once and
then modify it further.

4 days agofix cleaning of main tags
Sarah Hoffmann [Wed, 25 Nov 2026 21:14:08 +0000 (22:14 +0100)]
fix cleaning of main tags

4 days agoSmaller improvements to normalization rules (#4243)
Sarah Hoffmann [Wed, 25 Nov 2026 18:30:15 +0000 (19:30 +0100)]
Smaller improvements to normalization rules (#4243)

* Use ICU's builtin NFKC normlaization which makes quite a few of the
custom rules needless.
* Finally fix #3718.
* Read the wikipedia article on the palochka, which metioned that '1' is
a common replacement for it. Use that at transliteration.

These rules will only have an effect on newly imported databases.

4 days agoImprove main class and category assignment in Lua (#4242)
Sarah Hoffmann [Wed, 25 Nov 2026 14:15:31 +0000 (15:15 +0100)]
Improve main class and category assignment in Lua (#4242)

This introduces hooks for determining the main tag and categories in the
Lua scripts. Right now the functions behind the hooks are hard-coded but
will be made configurable in a follow-up PR.

The function for determining the main tag now takes semantic priorities
into account instead of going simply by alphabetic order. As a result we
can go back to determining the place ranks directly from the main tag
instead of doing heuristics over the categories. The latter caused quite
a few odd misclassifications.

Categories are still simply derived from the candidates for the main tag
with a few tag combinations blacklisted.

This also resurrects the ability to create more than one place object
for a single OSM object. This is to cater for bridges and tunnels. I had
considered just giving bridges and tunnels the priority and ignoring the
underlying highways/railways but there are [bridges that form part of an
address](https://www.openstreetmap.org/way/122237921). The highway
entries are required for those.

Also fixes a bug in the recently introduced `is_area()` function and
reworks some of the osm2pgsql BDD tests.

First part of #4180.

4 days agotransliterate palochka as 1
Sarah Hoffmann [Wed, 25 Nov 2026 10:03:19 +0000 (11:03 +0100)]
transliterate palochka as 1

Source: https://en.wikipedia.org/wiki/%D3%80

4 days agouse ICU's normalization before anything else
Sarah Hoffmann [Wed, 25 Nov 2026 09:17:50 +0000 (10:17 +0100)]
use ICU's normalization before anything else

4 days agoimprove transliteration of Teh Marbuta
Sarah Hoffmann [Wed, 25 Nov 2026 08:55:39 +0000 (09:55 +0100)]
improve transliteration of Teh Marbuta

Teh Marbuta 'ة' may be written as Ha 'ه', i.e without diacretics.
ICU transliterates them into different letters.

Fixes #3718.

5 days agoextend BDD tests for category and main tag computation in osm2pgsql
Sarah Hoffmann [Tue, 24 Nov 2026 22:13:17 +0000 (23:13 +0100)]
extend BDD tests for category and main tag computation in osm2pgsql

5 days agoUnpin pytest (#4241)
Sarah Hoffmann [Tue, 24 Nov 2026 21:59:49 +0000 (22:59 +0100)]
Unpin pytest (#4241)

The pytest-bdd 9.0.1 release resolved the incompatibility issue.

5 days agomake sure place tag is always present with admin boundaries
Sarah Hoffmann [Tue, 24 Nov 2026 13:42:30 +0000 (14:42 +0100)]
make sure place tag is always present with admin boundaries

7 days agofix is_area() function
Sarah Hoffmann [Sun, 22 Nov 2026 10:13:44 +0000 (11:13 +0100)]
fix is_area() function

8 days agounpin pytest
Sarah Hoffmann [Sat, 21 Nov 2026 19:15:55 +0000 (20:15 +0100)]
unpin pytest

8 days agorevert to using extratags.place for linking
Sarah Hoffmann [Fri, 20 Nov 2026 13:17:00 +0000 (14:17 +0100)]
revert to using extratags.place for linking

8 days agorevert to rank computation based on class/type
Sarah Hoffmann [Thu, 19 Nov 2026 15:22:42 +0000 (16:22 +0100)]
revert to rank computation based on class/type

8 days agointroduce Lua functions to compute class tag and categories
Sarah Hoffmann [Wed, 18 Nov 2026 20:26:58 +0000 (21:26 +0100)]
introduce Lua functions to compute class tag and categories

Currently these functions are still hard-coded.

8 days agoremove lazy backfill for categories
Sarah Hoffmann [Wed, 18 Nov 2026 19:08:14 +0000 (20:08 +0100)]
remove lazy backfill for categories

Migration now has filled the categories that are important for existing
databases. For new tables the backfill interferes with category
selection from Lua.

8 days agoRanking tweaks (#4240)
Sarah Hoffmann [Sat, 21 Nov 2026 18:58:19 +0000 (19:58 +0100)]
Ranking tweaks (#4240)

This adapts ranking for some place and waterway features that have
appeared in the top tagging ranks over the last few years.

Most important change: `place=square` is now ranked as a highway. This
fixes a long-standing omission by Nominatim which caused people to be
confused why their `addr:street` isn't properly linked to a square.
Using `addr:place` works and people have used it as a work-around but
it's really not right. With the ranking change, Nominatim will now
expect a `addr:street` in the address in order to link properly with the
place. `addr:place` will keep working through its general fallback
handling, so nothing breaks in the existing data.

Fixes https://github.com/osm-search/Nominatim-Data-Analyser/issues/77.

8 days agoadapt BDD test for squares
Sarah Hoffmann [Sat, 21 Nov 2026 15:54:50 +0000 (16:54 +0100)]
adapt BDD test for squares

8 days agoupdate place ranks to reflect current mapping practises
Sarah Hoffmann [Sat, 21 Nov 2026 15:29:06 +0000 (16:29 +0100)]
update place ranks to reflect current mapping practises

Most importantly, moves place=square into the highway ranks
so that it now works with addr:street.

8 days agotweak ranks of addressable waterway features
Sarah Hoffmann [Sat, 21 Nov 2026 13:26:13 +0000 (14:26 +0100)]
tweak ranks of addressable waterway features

8 days agoreduce postcode area extend for US
Sarah Hoffmann [Sat, 21 Nov 2026 11:02:35 +0000 (12:02 +0100)]
reduce postcode area extend for US

Current extent is too expensive to recompute.

11 days agoOptionally ignore class parameter on details (#4239)
Sarah Hoffmann [Wed, 18 Nov 2026 08:11:41 +0000 (09:11 +0100)]
Optionally ignore class parameter on details (#4239)

The `class` parameter in the `details()` functions and API endpoint is
now only used as a hint which result to return when there are multiple
entries for an OSM object available.

Additional test borrowed from #4195 by @davidbian1.

Also enables a few skipped BDD tests around /details that have long
since been fix.

Closes #4181.

12 days agooptionally ignore class parameter on details
Sarah Hoffmann [Tue, 17 Nov 2026 19:27:32 +0000 (20:27 +0100)]
optionally ignore class parameter on details

13 days agoAdd check for duplicate partial terms in word table (#4233)
Sarah Hoffmann [Mon, 16 Nov 2026 08:43:53 +0000 (09:43 +0100)]
Add check for duplicate partial terms in word table (#4233)

Adds a check to `nominatim admin --check-database` for duplicated
partial terms in the word table, as suggested in #4232. Two processes
importing or indexing the same database at the same time can create the
same partial term twice; any query containing it then fails with `assert
snode.partial is None` in the query analyzer, which is hard to diagnose
from the API's 500 alone. The check is a single GROUP BY on the word
table (a few seconds on a country extract) and is not applicable when
there is no word table.

13 days agoRemove remaining hard-coded object filtering from SQL code (#4237)
Sarah Hoffmann [Mon, 16 Nov 2026 08:43:21 +0000 (09:43 +0100)]
Remove remaining hard-coded object filtering from SQL code (#4237)

This removes dropping of unwanted highway and boundary types for good
from the SQL code. #4177 already dropped the resulting categories but
still left the dropping as a hard-coded function in SQL. This PR now
moves the code to Lua making it fully configurable.

The Lua version isn't an exact copy of the old code as it doesn't make
fully sense anymore. For highways it is largely enough to drop all
unnamed pedestrian to achieve the general effect of the SQL code.
Boundary dropping works about the same.

The code also adds a bit more sophisticated geometry building for
highway ways: unless `area=yes` is set, it will prefer to build a
linestring (excepting rest areas, just as is done [by
osm-carto](https://github.com/openstreetmap-carto/openstreetmap-carto/blob/003cefdd67918e8317e9753312ec3327d78f5d1f/openstreetmap-carto-flex.lua#L251)).

Closes #4172.

2 weeks agoremove hard-coded OSM feature drop from SQL code
Sarah Hoffmann [Sun, 15 Nov 2026 16:32:06 +0000 (17:32 +0100)]
remove hard-coded OSM feature drop from SQL code

2 weeks agoadapt BDD tests to new osm2pgsql behaviour
Sarah Hoffmann [Sun, 15 Nov 2026 15:55:10 +0000 (16:55 +0100)]
adapt BDD tests to new osm2pgsql behaviour

2 weeks agorestrict boundary import to areas
Sarah Hoffmann [Sun, 15 Nov 2026 14:56:29 +0000 (15:56 +0100)]
restrict boundary import to areas

2 weeks agoadd is_area() function to lua place object
Sarah Hoffmann [Sun, 15 Nov 2026 14:38:16 +0000 (15:38 +0100)]
add is_area() function to lua place object

2 weeks agoonly make areas out of selected highway types
Sarah Hoffmann [Sun, 15 Nov 2026 14:31:42 +0000 (15:31 +0100)]
only make areas out of selected highway types

2 weeks agoexclude unnamed pedestrian ways as they are usually areas
Sarah Hoffmann [Sun, 15 Nov 2026 14:30:26 +0000 (15:30 +0100)]
exclude unnamed pedestrian ways as they are usually areas

2 weeks agofix tag list for excluded footways
Sarah Hoffmann [Sun, 15 Nov 2026 14:29:44 +0000 (15:29 +0100)]
fix tag list for excluded footways

3 weeks agoadd slow warning to duplicate partial terms check
acpuchades [Sun, 8 Nov 2026 13:47:17 +0000 (14:47 +0100)]
add slow warning to duplicate partial terms check

Also flush the check title, so that the warning is visible while
the check is still running.

3 weeks agoAdd support for multiple postcode patterns per country (#4235)
Sarah Hoffmann [Tue, 3 Nov 2026 09:32:09 +0000 (10:32 +0100)]
Add support for multiple postcode patterns per country (#4235)

This adds support for countries switching their postcode system to allow
accepting the old and new postcode patterns. Concretely adds support for
the new postcode system in Nigeria.

The Nigeria case shows that different patterns may also have differently
sized coverage areas. Therefore the extent configuration moves from
per-country extent to per-postcode pattern extent. The code is written
in a way now that we can even move to per-postcode extent in the future.

Looking through the code I also noticed that postcodes from external
CSVs still use the old schema of normalising through the analyser. That
is incompatible with the postcode parser in the search code. So this PR
also moves the DSC reading code to using the postcode pattern matcher.

Closes #4217.

3 weeks agoadd support for more than one postcode pattern per country
Sarah Hoffmann [Mon, 2 Nov 2026 09:12:01 +0000 (10:12 +0100)]
add support for more than one postcode pattern per country

4 weeks agouse matching also for external postcodes
Sarah Hoffmann [Sun, 1 Nov 2026 16:29:18 +0000 (17:29 +0100)]
use matching also for external postcodes

Allows to get rid of analyser for most of the analysis.

4 weeks agodefine extent per postcode instead of per country
Sarah Hoffmann [Sun, 1 Nov 2026 15:52:21 +0000 (16:52 +0100)]
define extent per postcode instead of per country

4 weeks agoadd check for duplicate partial terms in word table
acpuchades [Fri, 30 Oct 2026 10:03:06 +0000 (11:03 +0100)]
add check for duplicate partial terms in word table

When two processes import or index the same database at the same time,
they can create the same partial term twice. Queries containing such a
term then fail with an assertion in the query analyzer, which is hard to
diagnose from the API's 500 response alone.

4 weeks agoPin pytest at 9.1 (#4230)
Sarah Hoffmann [Wed, 28 Oct 2026 09:10:21 +0000 (10:10 +0100)]
Pin pytest at 9.1 (#4230)

The latest 9.2 release of pytest is currently incompatible with
pytest-bdd, see https://github.com/pytest-dev/pytest/pull/14984.

4 weeks agopin pytest at 9.1
Sarah Hoffmann [Tue, 27 Oct 2026 22:32:18 +0000 (23:32 +0100)]
pin pytest at 9.1

The new 9.2 release is currently incompatible with pytest-bdd,
see https://github.com/pytest-dev/pytest/pull/14984.

4 weeks agoAvoid deleting from array that is being looped over (#4228)
Sarah Hoffmann [Tue, 27 Oct 2026 21:26:01 +0000 (22:26 +0100)]
Avoid deleting from array that is being looped over (#4228)

This fixes a case of deleting an element from an array while looping
over the array in the postcode sanitizer, as found by Copilot (see
#4227).

Python will jump over the the next element after having deleted one, so
that a postcode following an invalid one might not be handled. This case
is very unlikely to appear in the real world because addresses can only
be input with a single postcode. You'd have to use a special sanitizer
to duplicate the entry. And also change the default of actually keeping
the postcode.

To keep the frequent case lean, simply recreate the address item list
without the filtered postcodes in the rare case that a postcode needs to
be deleted.

4 weeks agoavoid deleting from array that is being looped over
Sarah Hoffmann [Tue, 27 Oct 2026 08:42:47 +0000 (09:42 +0100)]
avoid deleting from array that is being looped over

5 weeks agoprepare release 5.3.3-post2
Sarah Hoffmann [Tue, 20 Oct 2026 09:07:37 +0000 (11:07 +0200)]
prepare release 5.3.3-post2

5 weeks agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Tue, 20 Oct 2026 08:27:01 +0000 (10:27 +0200)]
Merge remote-tracking branch 'upstream/master'

5 weeks agoAdd support for addr:substreet and addr:parentstreet (#4226)
Sarah Hoffmann [Tue, 20 Oct 2026 08:18:35 +0000 (10:18 +0200)]
Add support for addr:substreet and addr:parentstreet (#4226)

This adds support for the [special addressing schema in the
UK](https://wiki.openstreetmap.org/wiki/Addresses_in_the_United_Kingdom)
which may consist of two streets or a place and a street.

The implementation follows what is described in the wiki with support
for `addr:street`+ `addr:parentstreet` and `addr:substreet` +
`addr:parentstreet`. Also possible are combinations of `addr:place` +
`addr:parentstreet` and `addr:housename` + `addr:street` (although here
`addr:unit` support is missing for completeness).

Not supported is the combination of `addr:substreet` + `addr:street`
which is in relatively wide usage. It ends up interpreting the
`addr:substreet` as a suburb. The result is that the combination can
still be found but will be displayed wrongly.

Internally, this is solved as follows:

* addr:substreet is aliased to addr:place in the osm2pgsql import
configuration
* address ranks for results are slightly changed:
   *  addr:place parents are assigned rank 28 (was 18-25 before)
   *  addr:street parents are always assigned 27 (was 26-27 before)
   * addr:parentstreet is inserted at rank 26, when it exists

Standard output formats should be largely uneffected except roads
showing up at rank 27 instead of 26. However, if you have implemented
custom output formatters, you might want to review your implementation.

Closes #4200.

5 weeks agoadd support for addr:substreet and addr:parentstreet
Sarah Hoffmann [Tue, 22 Sep 2026 11:59:19 +0000 (13:59 +0200)]
add support for addr:substreet and addr:parentstreet

addr:substreet is aliased to addr:place and output ranking slightly
changed: addr:place is 28, addr:street always 27, while addr:parentstreet
is inserted at 26. This might or might not break some custom
formatter.

5 weeks agoUpdate Update.md (#4222)
Sarah Hoffmann [Mon, 19 Oct 2026 18:26:25 +0000 (20:26 +0200)]
Update Update.md (#4222)

Fix typo in `StandardOutput` in `nominatim-updates.service`

## Summary
fix typo

## AI usage
none

6 weeks agofix joining of words in structured postcode phrases (#4224)
Sarah Hoffmann [Sun, 18 Oct 2026 09:12:15 +0000 (11:12 +0200)]
fix joining of words in structured postcode phrases (#4224)

## Summary
Fixes #4223.

Adds the missing parentheses in the `PHRASE_POSTCODE` join in
`PostcodeParser.parse()`, so words after a space or dash are kept. Also
adds a parser test for a postcode phrase with a space, which fails on
master and passes with the fix.

## AI usage
Not used

6 weeks agofix joining of words in structured postcode phrases
justpriyanshu [Fri, 16 Oct 2026 04:48:44 +0000 (10:18 +0530)]
fix joining of words in structured postcode phrases

6 weeks agoUpdate Update.md
knowname [Thu, 15 Oct 2026 09:49:34 +0000 (11:49 +0200)]
Update Update.md

Fix typo in StandardOutput in nominatim-updates.service

6 weeks agoprepare release 5.3.3-post1
Sarah Hoffmann [Wed, 14 Oct 2026 21:09:18 +0000 (23:09 +0200)]
prepare release 5.3.3-post1

6 weeks agoprepare release 5.3.2.post12
Sarah Hoffmann [Wed, 14 Oct 2026 21:06:01 +0000 (23:06 +0200)]
prepare release 5.3.2.post12

6 weeks agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Wed, 14 Oct 2026 10:26:06 +0000 (12:26 +0200)]
Merge remote-tracking branch 'upstream/master'

6 weeks agoFix reported parent street for TIGER results in reverse search (#4221)
Sarah Hoffmann [Wed, 14 Oct 2026 06:59:23 +0000 (08:59 +0200)]
Fix reported parent street for TIGER results in reverse search (#4221)

This is an alternative fix for #4208 which avoids introducing additional
variables. BDD and unit tests both adapted to trigger the condition.

Closes #4208.

6 weeks agoTighten down AI usage policy (#4220)
Sarah Hoffmann [Tue, 13 Oct 2026 17:28:48 +0000 (19:28 +0200)]
Tighten down AI usage policy (#4220)

As announced in #4207, I'm going to take a break from reviewing
AI-generated PRs. This is not a judgement on the overall quality of such
contributions. A good part of them is actually quite usable. The problem
is that it takes a huge amount of time to find out if it is a good or
bad PR. They all look the same on the surface. I'm happy to keep working
with AI-generated content as part of contracting work and when submitted
from long-time contributors, but I'm out of spare time to do this stuff
for drive-by contributions.

The PR also removes the requirement to show a prove of testing. That's
just become useless when AI can easily make up a text section that looks
like a proof.

6 weeks agofix reported parent street for TIGER results in reverse search
Sarah Hoffmann [Tue, 13 Oct 2026 15:11:58 +0000 (17:11 +0200)]
fix reported parent street for TIGER results in reverse search

6 weeks agoadd right to refuse PRs on AI-generation grounds
Sarah Hoffmann [Tue, 13 Oct 2026 09:07:04 +0000 (11:07 +0200)]
add right to refuse PRs on AI-generation grounds

6 weeks agoadd categories for all fallback tags, drop artificial place/house category (#4203)
Sarah Hoffmann [Tue, 13 Oct 2026 07:53:10 +0000 (09:53 +0200)]
add categories for all fallback tags, drop artificial place/house category (#4203)

Fixes #4182.

## Summary

fallback tags such as building and landuse now always get a category,
and all of them are retained if there are more than one. before, only
one (whichever `pairs()` returned last) survived, and only if the object
had a name or address. class/type selection is the same as before.
address only objects still have class/type `place`/`house` but no longer
have `osm.place.house` as a category. `categories` is NULL for those
rows - an empty array would make `is_rankable_place()` drop them. the
backfill in `placex_update()` skips place/house so it doesn't return on
re-index.
adjusted the fallback scenarios in `osm2pgsql/import/tags.feature` and
the two address-only node scenarios in `osm2pgsql/update/tags.feature`
to match.
ran lint, the unit tests and the bdd suites locally, all passed (with
flying colors).
on a full import of the test pbf, all 81 place/house rows in placex now
have NULL categories and none carry osm.place.house.
CI is red because of the sqlalchemy 2.1 thing that #4202 mentioned.

## AI usage
Used Ai for the testing purposes and for extending the existing tests
for this case.

6 weeks agoCLI reverse/lookup/details return entrances (#4209)
Sarah Hoffmann [Tue, 13 Oct 2026 07:44:44 +0000 (09:44 +0200)]
CLI reverse/lookup/details return entrances (#4209)

## Summary
While debugging https://github.com/osm-search/Nominatim/issues/4205 with
a local database (added the gate as entrance locally) I discovered
"nominatim lookup" with "--entrances" didn't print the entrance data.

For the examples I'm using [an
entrance](https://www.openstreetmap.org/node/3144704341) of [a swimming
center](https://www.openstreetmap.org/way/309147947).

`nominatim search --query "Piscinas do Sport Lisboa e Benfica" --limit 1
--entrances`
- before: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
[{"osm_id": 3144704341, "type": "yes"}] }`
- after: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
[{"osm_id": 3144704341, "type": "yes"}] }`

`nominatim reverse --lat 38.751207 --lon -9.182630 --entrances`
- before: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
null}`
- after: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
[{"osm_id": 3144704341, "type": "yes"}] }`

`nominatim lookup --id W309147947 --entrances`
- before: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
null}`
- after: `{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
[{"osm_id": 3144704341, "type": "yes"}] }`

`nominatim details --way 309147947 --entrances`
- before: `{"name": "Piscinas do Sport Lisboa e Benfica"}` //
"entrances" key not in response
- after:`{"name": "Piscinas do Sport Lisboa e Benfica", "entrances":
[{"osm_id": 3144704341, "type": "yes"}]}`

## AI usage
Used for both code and test. Tests iterated several times trying to make
it more readable. All commands in this PR tested manually on two
servers.

6 weeks agoEscape error message text (#4210)
Sarah Hoffmann [Tue, 13 Oct 2026 07:28:32 +0000 (09:28 +0200)]
Escape error message text (#4210)

## Summary
I got a HTTP 500 error with
https://nominatim.openstreetmap.org/search?q=berlin&format=xml&include=%3C1
but it turns out it was my app. The Nominatim API returns HTTP 400 with
broken XML which couldn't be parsed.

```
XML Parsing Error: not well-formed
Line Number 4, Column 50
```

Best to escape all error message text.

## AI usage
I did the XML format handling, documentation, manual tests, PR. LLM
added JSON and extended the test.

6 weeks agoonly collect fallback tags for named objects
justpriyanshu [Tue, 13 Oct 2026 01:55:00 +0000 (07:25 +0530)]
only collect fallback tags for named objects

6 weeks agoadd categories for all fallback tags, drop artificial place/house category fix for...
justpriyanshu [Mon, 28 Sep 2026 12:59:24 +0000 (12:59 +0000)]
add categories for all fallback tags, drop artificial place/house category fix for #4182

6 weeks agoCLI: make --entrances work for all reverse,lookup,details
marc tobias [Wed, 30 Sep 2026 13:24:52 +0000 (15:24 +0200)]
CLI: make --entrances work for all reverse,lookup,details

6 weeks agoescape error message text
marc tobias [Tue, 29 Sep 2026 11:16:19 +0000 (13:16 +0200)]
escape error message text

6 weeks agoDocumentation: point to helper script cutting down TIGER data (#4212)
Sarah Hoffmann [Mon, 12 Oct 2026 08:00:36 +0000 (10:00 +0200)]
Documentation: point to helper script cutting down TIGER data (#4212)

## Summary
Nominatim TIGER import processes every input row and looks for nearby
streets even if the region doesn't have OSM data imported. Importing a
small region of OSM data, then TIGER data can take hours. Instead of
adding more logic/parameters/thing-that-need tests I created a helper
script to cut down the CSV files.

## AI usage
Script mostly LLM generated. Years ago I wrote two versions of the TIGER
data extract in the repo so I understand the input and output data.
Tested with extracts.

6 weeks agoVarious updates to CI and adaptions for newer dependency versions (#4218)
Sarah Hoffmann [Mon, 12 Oct 2026 07:59:00 +0000 (09:59 +0200)]
Various updates to CI and adaptions for newer dependency versions (#4218)

This finally fixes all the latest CI fails:

* type adaptions for SQLAlchemy 2.1 (including reallowing this version)
* type adaptions for urllib
* replacement of SQLAlchemy's `await_` (see #4202)
* some general cleanup of the CI scripts including moving linting into
its own task so it will fail quickly when it fails

Supersedes #4202.

7 weeks agoreplace removed SQLAlchemy await_ call
Sarah Hoffmann [Sun, 11 Oct 2026 21:29:23 +0000 (23:29 +0200)]
replace removed SQLAlchemy await_ call

7 weeks agoreintroduce python-bdd installed from pip
Sarah Hoffmann [Sun, 11 Oct 2026 21:05:57 +0000 (23:05 +0200)]
reintroduce python-bdd installed from pip

Ubunut's version is too old.

7 weeks agoremove SQLAlchemy 2.1 restriction
Sarah Hoffmann [Sun, 11 Oct 2026 20:30:33 +0000 (22:30 +0200)]
remove SQLAlchemy 2.1 restriction

7 weeks agoCI: move linting/mypy into separate task
Sarah Hoffmann [Sun, 11 Oct 2026 20:07:20 +0000 (22:07 +0200)]
CI: move linting/mypy into separate task

7 weeks agoremove typing workarounds for Protocol, Final and TypedDict
Sarah Hoffmann [Sun, 11 Oct 2026 19:49:25 +0000 (21:49 +0200)]
remove typing workarounds for Protocol, Final and TypedDict

These are all supported for Python >=3.9.

7 weeks agoadapt to typing changes in SQLAlchemy 2.1
Sarah Hoffmann [Sun, 11 Oct 2026 19:38:16 +0000 (21:38 +0200)]
adapt to typing changes in SQLAlchemy 2.1

7 weeks agowork around type changes in urllib
Sarah Hoffmann [Sun, 11 Oct 2026 15:28:05 +0000 (17:28 +0200)]
work around type changes in urllib

7 weeks agoremove mypy sqlalchemy plugin (no longer needed with 2.1)
Sarah Hoffmann [Sun, 11 Oct 2026 15:18:28 +0000 (17:18 +0200)]
remove mypy sqlalchemy plugin (no longer needed with 2.1)

7 weeks agouse new install groups for CI
Sarah Hoffmann [Sun, 11 Oct 2026 12:43:07 +0000 (14:43 +0200)]
use new install groups for CI

7 weeks agodocs: Fix a typo (#4216)
Abe Tomoaki [Sun, 11 Oct 2026 12:24:32 +0000 (21:24 +0900)]
docs: Fix a typo (#4216)

enivronment -> environment

7 weeks agoMerge pull request #4211 from mtmail/pytest-bdd-fixed-backslashes-issue
Sarah Hoffmann [Sat, 10 Oct 2026 16:33:38 +0000 (18:33 +0200)]
Merge pull request #4211 from mtmail/pytest-bdd-fixed-backslashes-issue

pytest-bdd 9.0 no longer over-quotes, we can tweak our workaround

8 weeks agoDocumentation: point to helper script cutting down TIGER data
marc tobias [Thu, 1 Oct 2026 13:52:13 +0000 (15:52 +0200)]
Documentation: point to helper script cutting down TIGER data

8 weeks agopytest-bdd 9.0 no longer over-quotes, we can tweak our workaround
marc tobias [Wed, 30 Sep 2026 23:08:20 +0000 (01:08 +0200)]
pytest-bdd 9.0 no longer over-quotes, we can tweak our workaround

8 weeks agoMerge pull request #4206 from mtmail/pin-sqlalchemy-below-2.1
Sarah Hoffmann [Wed, 30 Sep 2026 19:04:56 +0000 (21:04 +0200)]
Merge pull request #4206 from mtmail/pin-sqlalchemy-below-2.1

SqlAlchemy 2.1 deprecates some features we use. Staying with <2.1 for now

2 months agoSqlAlchemy 2.1 deprecates some features we use. We stay with older verion for now
marc tobias [Tue, 29 Sep 2026 22:05:47 +0000 (00:05 +0200)]
SqlAlchemy 2.1 deprecates some features we use. We stay with older verion for now

2 months agoMerge pull request #4199 from lonvia/remove-hardcoded-address-tags
Sarah Hoffmann [Wed, 16 Sep 2026 14:01:06 +0000 (16:01 +0200)]
Merge pull request #4199 from lonvia/remove-hardcoded-address-tags

Remove hard-coded handling of some special address tags

2 months agoMerge pull request #4198 from lonvia/improve-postcode-parsing
Sarah Hoffmann [Wed, 16 Sep 2026 13:07:36 +0000 (15:07 +0200)]
Merge pull request #4198 from lonvia/improve-postcode-parsing

Take token breaks into account during postcode parsing

2 months agoremove hard-coded handling of some special address tags
Sarah Hoffmann [Wed, 16 Sep 2026 09:43:04 +0000 (11:43 +0200)]
remove hard-coded handling of some special address tags

Now configurable via sanitizers

2 months agoignore token breaks in postcode parser
Sarah Hoffmann [Wed, 16 Sep 2026 09:37:55 +0000 (11:37 +0200)]
ignore token breaks in postcode parser

2 months agomake space in Falkland postcode pattern optional
Sarah Hoffmann [Wed, 16 Sep 2026 08:57:23 +0000 (10:57 +0200)]
make space in Falkland postcode pattern optional