222 Commits

Author SHA1 Message Date
Sarah Hoffmann
70b9140f13 pass reverse-only as a separate parameter
... instead of hacking the internal structures of SQLPreprocessor
2026-02-13 11:12:23 +01:00
Sarah Hoffmann
2237ce7124 split up table creation SQL into separate files 2026-02-12 16:36:10 +01:00
Sarah Hoffmann
58295e0643 remove unused indexes and sequences 2026-02-12 16:33:45 +01:00
Sarah Hoffmann
fed64cda5a Merge pull request #3957 from jayaddison/issue-2714/linked-places-default-language
Indexing: add default-language placename from linked places
2026-02-11 15:08:18 +01:00
Sarah Hoffmann
7a62c7d812 sanity check class names before inserting into classtype tables
The subsequent INSERT is done on an unqouted table name, making in
theory an SQL injection through an OSM value possible. In practise
this cannot happen because we check for the existance of the table.
During the creation of the classtype tables there is a sanity
check in place to disallow any table names that consist of anything
other than alphanumeric characters.
2026-02-10 11:38:26 +01:00
James Addison
e62811cf97 Indexing: invert boolean logic to factor-out empty ELSE clause
Relates-to commit fa2a789e27.
2026-02-09 18:33:02 +00:00
James Addison
fa2a789e27 Indexing: manage the case where no default-language exists
Relates-to commit 6fee784c9f.
2026-02-05 20:48:01 +00:00
James Addison
6fee784c9f Indexing: add default-language placename from linked places 2026-02-05 15:19:48 +00:00
Sarah Hoffmann
cc9c8963f3 Merge pull request #3949 from Itz-Agasta/try
Feat: Add admin function for granting access to read-only user
2026-02-02 09:53:24 +01:00
Itz-Agasta
45972811e3 Preserve import error tables during freeze
- Remove 'import_polygon_%' from UPDATE_TABLES to keep import_polygon_error
and import_polygon_delete tables in frozen databases.

- These tables contain permanent import error tracking data and should not
be deleted during freeze. The ro-access grant system expects them to exist
in all database states.
2026-01-31 22:50:18 +05:30
Itz-Agasta
e021f558bf Restore grants for dynamic tables in tokenizer, migration, and tiger import 2026-01-30 20:43:57 +05:30
AmmarYasser455
fcc5ce3f92 docs: fix multiple typos in documentation and source code 2026-01-30 12:13:23 +02:00
James Addison
f07676a376 Fixup: add single-quote escaping within debug message 2026-01-28 01:27:53 +00:00
Itz-Agasta
ff1f1b06d9 Moves db grant statements to dedicated script
Centralizes all read-only access grants into a single SQL script, ensuring permissions are managed in one place.
2026-01-27 17:49:51 +05:30
Sarah Hoffmann
cc96912580 Merge pull request #3906 from AyushDharDubey/fix/issue_2463-Use-search_name-table-for-TIGER-data-imports-on-'dropped'-databases
Use `search_name` as fallback for TIGER imports when update tables are dropped
2026-01-23 20:52:40 +01:00
Ayush Dhar Dubey
eefd0efa59 update test frozen db: new tiger import mechanism 2026-01-09 17:47:07 +05:30
Ayush Dhar Dubey
954771a42d Add fallback search mechanism for dropped databases lookup 2026-01-09 17:35:01 +05:30
Sarah Hoffmann
e47601754a do not attempt to delete old data for newly created placex entries 2026-01-07 17:08:28 +01:00
Sarah Hoffmann
2cdf2db184 add NOT NULL and UNIQUE constraints where possible 2026-01-07 15:46:05 +01:00
Sarah Hoffmann
5200e11f33 ignore countries without geometry or country code for location_area 2026-01-07 11:43:32 +01:00
Sarah Hoffmann
ba1fc5a5b8 do not insert entries with empty name into search name 2026-01-07 11:27:55 +01:00
Sarah Hoffmann
d35a71c123 ensure correct indexed_status transitions 2026-01-07 11:12:35 +01:00
Sarah Hoffmann
e31862b7b5 make sure that importance is always set to a non-null value
Secondary importance might return invalid values in some cases.
2026-01-07 10:29:45 +01:00
Sarah Hoffmann
9ac5e0256d make sure array_merge() never returns null 2026-01-07 10:22:03 +01:00
Sarah Hoffmann
084e1b8177 remove unused new_query_log table 2026-01-01 20:30:37 +01:00
Sarah Hoffmann
d1cb578535 rework postcode computation
Now adds areas to location_postcodes, ignores postcode points
inside areas and supports customizable extents.
2025-12-30 15:20:46 +01:00
Sarah Hoffmann
89821d01e0 reorganise layout of location_postcode table
Also renames the table as this will make it easier to migrate.
2025-12-30 15:20:46 +01:00
Sarah Hoffmann
0aa9eee3e7 remove special casing for postcodes in trigger code 2025-12-30 15:20:46 +01:00
Sarah Hoffmann
9cfef7a31a prefer wikidata over name match when linking 2025-11-26 17:44:47 +01:00
Sarah Hoffmann
139678f367 fix linkage removal when nothing has changed 2025-11-26 17:03:19 +01:00
Sarah Hoffmann
a93113bc44 use extra place_entrance table 2025-10-23 17:25:20 +02:00
Sarah Hoffmann
1d1d80e1e3 adapt BDD tests for new address ranks 2025-09-11 11:56:39 +02:00
Emily Love Watson
91e345f77f Store entrance fields as columns on table 2025-08-29 10:26:29 -05:00
Emily Love Watson
d0ad65f696 Select all entrances for results in one query 2025-08-29 10:26:29 -05:00
Emily Love Watson
e916d27b7c Update entrances when entrance nodes are updated 2025-08-29 10:26:29 -05:00
Emily Love Watson
823ad5d279 Update entrances schema 2025-08-29 10:26:29 -05:00
Emily Love Watson
048d571e46 Index and return entrance coordinates for indexed locations 2025-08-29 10:25:44 -05:00
Sarah Hoffmann
6270c90052 replace ST_Relate by shortcut functions
For some reason ST_Relate returns wrong results in the context of
the trigger on Debian Trixie. Works fine with the Postgis version
from postgresql.org.
2025-08-06 14:43:07 +02:00
Sarah Hoffmann
83c6f27f5c reduce precision of interpolations to OSM precision 2025-07-29 22:35:47 +02:00
Sarah Hoffmann
1111597db5 reduce precision of computed centroids to 7 digits 2025-07-29 21:25:14 +02:00
Sarah Hoffmann
4cbbe04f7f align limits for deferring delete and reindexing on insert
Right now when a boundary with an area between 1 and 2 broke, it
was deleted but on reinsert afer repair, the addresses are not updated
resulting in inconsistent data.
2025-07-21 16:11:06 +02:00
Sarah Hoffmann
1aeb8a262c Merge pull request #3774 from lonvia/remove-postcodes-from-nameaddressvector
Do not add postcodes from postcode boundaries to address vector
2025-07-08 17:23:05 +02:00
Sarah Hoffmann
ec42fda1bd do not add postcodes from postcode boundaries to address vector
Postcodes will be found through a special search, so we can save
the space.
2025-07-08 14:49:16 +02:00
Sarah Hoffmann
287ba2570e reduce area for geometry rank for very small countries 2025-07-08 13:50:20 +02:00
Sarah Hoffmann
32728d6c89 Merge pull request #3693 from lonvia/remove-unused-sql
Remove SQL function for address lookup
2025-03-31 17:11:39 +02:00
Sarah Hoffmann
bbadc62371 remove SQL function for address lookup
This is now done in Python.
2025-03-31 15:09:40 +02:00
Sarah Hoffmann
3cb183ffb0 add lookup word to variants in word table 2025-03-31 14:52:50 +02:00
Sarah Hoffmann
58ef032a2b do not write any word counts on initial word insert 2025-03-31 14:52:50 +02:00
Thomas Butz
d86d491f2e Mark functions as PARALLEL SAFE 2025-03-13 10:53:11 +01:00
Sarah Hoffmann
267e5dac0d split up MultiPolygons before adding them to large_areas table 2024-12-22 09:15:16 +01:00