From: Sarah Hoffmann Date: Mon, 11 Sep 2023 07:48:58 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~44 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/13a17754a4adb1318869d09534d0c1124da68682?hp=4a8b78985bc0b20b67204633a776a8eb60eba02c Merge remote-tracking branch 'upstream/master' --- diff --git a/CMakeLists.txt b/CMakeLists.txt index cf76f00c..fc342e74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") project(nominatim) set(NOMINATIM_VERSION_MAJOR 4) -set(NOMINATIM_VERSION_MINOR 2) +set(NOMINATIM_VERSION_MINOR 3) set(NOMINATIM_VERSION_PATCH 0) set(NOMINATIM_VERSION "${NOMINATIM_VERSION_MAJOR}.${NOMINATIM_VERSION_MINOR}.${NOMINATIM_VERSION_PATCH}") diff --git a/ChangeLog b/ChangeLog index 89861d0b..fae0d68f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +4.3.0 + * fix failing importance recalculation command + * fix merging of linked names into unnamed boundaries + * fix a number of corner cases with interpolation splitting resulting in + invalid geometries + * fix failure in website generation when password contains curly brackets + * fix broken use of ST_Project in PostGIS 3.4 + * new NOMINATIM_SEARCH_WITHIN_COUNTRIES setting to restrict reverse lookups + to known countries (thanks @alfmarcua) + * allow negative OSM IDs (thanks @alfmarcua) + * disallow import of Tiger data in a frozen DB + * avoid UPDATE to change settings to be compatible with r/o DBs (thanks @t-tomek) + * update bundled osm2pgsql to 1.9.2 + * reorganise osm2pgsql flex style and make it the default + * exclude names ending in :wikipedia from indexing + * no longer accept comma as a list separator in name tags + * process forward dependencies on update to catch updates in geometries + of ways and relations + * fix handling of isolated silent letters during transliteration + * no longer assign postcodes to large linear features like rivers + * introduce nominatim.paths module for finding data and libraries + * documentation layout changed to material theme + * new documentation section for library + * various smaller fixes to existing documentation + (thanks @woodpeck, @bloom256, @biswajit-k) + * updates to vagrant install scripts, drop support for Ubunut 18 + (thanks @n-timofeev) + * removed obsolete configuration variables from env.defaults + * add script for generating a taginfo description (thanks @biswajit-k) + * modernize Python code around BDD test and add testing of Python frontend + * lots of new BDD tests for API output + +4.2.3 + + * fix deletion handling for 'nominatim add-data' + * adapt place_force_delete() to new deletion handling + * flex style: avoid dropping of postcode areas + * fix update errors on address interpolation handling + 4.2.2 * extend flex-style library to fully support all default styles diff --git a/SECURITY.md b/SECURITY.md index d023c1e5..f6215f64 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,10 +9,10 @@ versions. | Version | End of support for security updates | | ------- | ----------------------------------- | +| 4.3.x | 2025-09-07 | | 4.2.x | 2024-11-24 | | 4.1.x | 2024-08-05 | | 4.0.x | 2023-11-02 | -| 3.7.x | 2023-04-05 | ## Reporting a Vulnerability diff --git a/docs/admin/Migration.md b/docs/admin/Migration.md index dc2e2f37..3e62d219 100644 --- a/docs/admin/Migration.md +++ b/docs/admin/Migration.md @@ -15,7 +15,7 @@ breaking changes. **Please read them before running the migration.** If you are migrating from a version <3.6, then you still have to follow the manual migration steps up to 3.6. -## 4.1.0 -> master +## 4.2.0 -> 4.3.0 ### New indexes for reverse lookup diff --git a/nominatim/api/lookup.py b/nominatim/api/lookup.py index a46cdb69..81e6f74d 100644 --- a/nominatim/api/lookup.py +++ b/nominatim/api/lookup.py @@ -38,6 +38,7 @@ async def find_in_placex(conn: SearchConnection, place: ntyp.PlaceRef, t.c.importance, t.c.wikipedia, t.c.indexed_date, t.c.parent_place_id, t.c.rank_address, t.c.rank_search, t.c.linked_place_id, + t.c.geometry.ST_Expand(0).label('bbox'), t.c.centroid) if isinstance(place, ntyp.PlaceID): @@ -232,7 +233,8 @@ async def get_simple_place(conn: SearchConnection, place: ntyp.PlaceRef, # add missing details assert result is not None - result.bbox = getattr(row, 'bbox', None) + if hasattr(row, 'bbox'): + result.bbox = ntyp.Bbox.from_wkb(row.bbox) await nres.add_result_details(conn, [result], details) diff --git a/nominatim/api/v1/helpers.py b/nominatim/api/v1/helpers.py index 6a646e4f..13087280 100644 --- a/nominatim/api/v1/helpers.py +++ b/nominatim/api/v1/helpers.py @@ -108,15 +108,18 @@ def deduplicate_results(results: SearchResults, max_results: int) -> SearchResul assert result.names and 'ref' in result.names if any(_is_postcode_relation_for(r, result.names['ref']) for r in results): continue - classification = (result.osm_object[0] if result.osm_object else None, - result.category, - result.display_name, - result.rank_address) - if result.osm_object not in osm_ids_done \ - and classification not in classification_done: + if result.source_table == SourceTable.PLACEX: + classification = (result.osm_object[0] if result.osm_object else None, + result.category, + result.display_name, + result.rank_address) + if result.osm_object not in osm_ids_done \ + and classification not in classification_done: + deduped.append(result) + osm_ids_done.add(result.osm_object) + classification_done.add(classification) + else: deduped.append(result) - osm_ids_done.add(result.osm_object) - classification_done.add(classification) if len(deduped) >= max_results: break diff --git a/nominatim/server/falcon/server.py b/nominatim/server/falcon/server.py index b1859db6..5ec418a6 100644 --- a/nominatim/server/falcon/server.py +++ b/nominatim/server/falcon/server.py @@ -122,7 +122,7 @@ class FileLoggingMiddleware: writes logs for sucessful requests for search, reverse and lookup. """ if not req_succeeded or resource is None or resp.status != 200\ - or resource.name not in ('reverse', 'search', 'lookup'): + or resource.name not in ('reverse', 'search', 'lookup', 'details'): return finish = dt.datetime.now(tz=dt.timezone.utc) diff --git a/nominatim/server/starlette/server.py b/nominatim/server/starlette/server.py index 19a9943c..33ab22c7 100644 --- a/nominatim/server/starlette/server.py +++ b/nominatim/server/starlette/server.py @@ -93,7 +93,7 @@ class FileLoggingMiddleware(BaseHTTPMiddleware): finish = dt.datetime.now(tz=dt.timezone.utc) - for endpoint in ('reverse', 'search', 'lookup'): + for endpoint in ('reverse', 'search', 'lookup', 'details'): if request.url.path.startswith('/' + endpoint): qtype = endpoint break diff --git a/nominatim/version.py b/nominatim/version.py index beec32a5..95420b34 100644 --- a/nominatim/version.py +++ b/nominatim/version.py @@ -2,7 +2,7 @@ # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2022 by the Nominatim developer community. +# Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Version information for Nominatim. @@ -34,7 +34,7 @@ class NominatimVersion(NamedTuple): return f"{self.major}.{self.minor}.{self.patch_level}-{self.db_patch_level}" -NOMINATIM_VERSION = NominatimVersion(4, 2, 99, 2) +NOMINATIM_VERSION = NominatimVersion(4, 3, 0, 0) POSTGRESQL_REQUIRED_VERSION = (9, 6) POSTGIS_REQUIRED_VERSION = (2, 2)