Sarah Hoffmann
896a40b7d5
prepare release 4.4.1
2024-08-20 13:54:37 +02:00
Sarah Hoffmann
1e71085004
update CI scripts
2024-08-20 13:54:37 +02:00
Sarah Hoffmann
3c05d98b80
make sure SQLAlchemy can handle the loaded dialect
...
The psycopg dialect was only added in SQLAlchemy 2.0. To avoid loading
errors when SQLAlchemy 1.4 is installed together with psycopg3,
check that the dialect is really available.
2024-08-20 10:10:09 +02:00
Sarah Hoffmann
7bbdf57b08
restrict interpolation housenumbers to 0-999999
...
Ensures that the numbers fit into integers.
2024-08-20 09:45:01 +02:00
Markus Döring
5e91b78ff4
update Search.md, fix typo ( #3454 )
2024-08-20 09:43:43 +02:00
Sarah Hoffmann
ad72641424
restrict invalidation of child objects on large street features
...
When streets become very large, it is more likely a mapping error.
So ignore such changes.
2024-08-20 09:43:20 +02:00
marc tobias
75130e4332
docs: use nominatim-project everywhere
2024-08-20 09:41:42 +02:00
marc tobias
47b41ed510
Import documentation: reverse-only only a little faster import [skip ci]
2024-08-20 09:40:52 +02:00
marc tobias
b4e2e7de16
geocodejson: admin level output should only print boundaries
2024-08-20 09:40:21 +02:00
marc tobias
1c3ed66ca1
docs: correct URL of an internal link
2024-08-20 09:39:06 +02:00
Sarah Hoffmann
e5a5f02666
prepare release 4.4.0
2024-03-07 11:43:01 +01:00
Sarah Hoffmann
11ced26025
Merge pull request #3358 from lonvia/pg-module-for-pg16
...
Fix compilation of legacy module for PostgreSQL 16
2024-03-07 11:39:24 +01:00
Sarah Hoffmann
edb1eec46d
actions: run legacy test against newest postgresql 16
2024-03-05 19:38:06 +01:00
Sarah Hoffmann
63eacc5589
fix compilation of PG module for PostgreSQL 16
...
This version requires an additional include for the macros used.
2024-03-05 16:31:02 +01:00
Sarah Hoffmann
e929693cae
Merge pull request #3356 from lonvia/use-date-from-osm2pgsql-prop
...
Use import date from osm2pgsql property table if available
2024-03-05 15:32:16 +01:00
Sarah Hoffmann
ae7c584e28
use import date from osm2pgsql property table if available
2024-03-05 11:33:32 +01:00
Sarah Hoffmann
4d5faf9423
Merge pull request #3353 from mtmail/add-codespell
...
Github Actions: add codespell linter, warn only
2024-03-04 14:02:00 +01:00
marc tobias
b7eea4d53a
Github Actions: add codespell linter, warn only
2024-03-04 00:22:24 +01:00
Sarah Hoffmann
dd2c794de5
Merge pull request #3350 from lonvia/improve-postcode-handling
...
Improve handling of postcode areas
2024-02-28 18:45:31 +01:00
Sarah Hoffmann
3b6d35fc12
Merge pull request #3349 from lonvia/remove-way-geometry-table-after-import
...
Drop lower-rank-ways index after import
2024-02-28 17:47:34 +01:00
Sarah Hoffmann
9fa73cfb15
improve display name for postcodes
...
Don't add the postcode again in the list of address details and
make sure that the result proper always comes before anything else
independently of the address rank.
2024-02-28 16:50:40 +01:00
Sarah Hoffmann
62b7670e0c
for postcodes use rank_search as base rank for finding addresses
...
The rank_address reflects the position in the address which is
usually lower than what one would expect for a postcode area.
2024-02-28 14:40:36 +01:00
Sarah Hoffmann
d7bb449e74
drop lower-rank-ways index after import
...
The index becomes quite big and is only needed during import
because the full geometry import does not exist yet.
2024-02-28 14:35:56 +01:00
Sarah Hoffmann
247065ff6f
Merge pull request #3342 from mtmail/tyops
...
Correct some typos
2024-02-28 14:25:16 +01:00
Sarah Hoffmann
9a84adef59
Merge pull request #3347 from lonvia/tweak-boundary-imports
...
Assorted style tweaks
2024-02-28 14:22:08 +01:00
Sarah Hoffmann
1879cf902c
Merge pull request #3346 from lonvia/reduce-artificial-importance
...
Reduce default importance
2024-02-28 14:21:46 +01:00
Sarah Hoffmann
019a68a4bb
Merge pull request #3345 from lonvia/simplify-large-geometries
...
Simplify very large polygons that are not used in addresses
2024-02-28 12:06:49 +01:00
Sarah Hoffmann
110491011f
Merge pull request #3344 from lonvia/osm2pgsql-new-middle
...
Update osm2pgsql to latest 1.11.0 and add support for new middle format
2024-02-28 12:06:33 +01:00
Sarah Hoffmann
36b1660121
add support for new middle table format of osm2pgsql
...
Functions are adapted according to the format detected from the
osm2pgsql property table.
2024-02-27 18:18:19 +01:00
Sarah Hoffmann
56201feb28
simplify very large polygons non used in addresses
...
Polygons with rank_address = 0 are only used in search and (rarely)
for reverse lookup. Geometries do not need to be precise for that
because topology does not matter. OSM has some very large polygons
of natural features with sizes of more than 10MB. Simplify these
polygons to keep the database and indexes smaller.
2024-02-27 10:16:18 +01:00
Sarah Hoffmann
c6d40d4bf4
reduce importance when computed from search rank
2024-02-27 10:15:54 +01:00
Sarah Hoffmann
a4f2e6a893
do not send outdated parameters to osm2pgsql flex
2024-02-27 10:15:36 +01:00
Sarah Hoffmann
b427fc7965
update osm2pgsql to 1.11.0
2024-02-27 10:15:36 +01:00
Sarah Hoffmann
e264604894
drop more railway tags
2024-02-27 10:15:08 +01:00
Sarah Hoffmann
3a5d9f0377
drop amenity=parking_space/entrance objects
...
Parking is sufficiently covered with amenity=parking.
2024-02-27 10:15:08 +01:00
Sarah Hoffmann
8be27015b2
drop boundary=land_area
...
Usually a version of administrative boundaries without ocean area.
Resulting polygons are pretty larrge and having the boundaries
should be enough.
2024-02-27 10:15:08 +01:00
Sarah Hoffmann
100391fb8e
import leisure=natural_reserve as fallback only
...
About half of the natural reserves have a double tagging with
boundary=protected_area. Avoid importing these objects twice.
2024-02-27 10:15:08 +01:00
Sarah Hoffmann
dc1baaa0af
prefer min() function over if construct
...
Fixes a linter complaint.
2024-02-27 09:26:50 +01:00
marc tobias
7205491b84
Correct some typos
2024-02-26 18:13:30 +01:00
Sarah Hoffmann
918fec73c6
Merge pull request #3341 from mtmail/remove-php-faq-entries
...
PHP related FAQ entries are no longer needed
2024-02-21 08:56:18 +01:00
marc tobias
b6df486525
PHP related FAQ entries are no longer needed
2024-02-20 18:55:02 +01:00
Sarah Hoffmann
8bd8a040e0
Merge pull request #3340 from lonvia/fix-lua-liniting-issues
...
Fix some issues in the style files found by luacheck
2024-02-20 12:00:01 +01:00
Sarah Hoffmann
781e83ddc3
fix issues found by luacheck
...
The variable shadowing causes bad results when used with LuaJIT.
2024-02-20 10:43:51 +01:00
Sarah Hoffmann
5afd96d210
Merge pull request #3339 from lonvia/python-frontend-as-default
...
Switch to Python frontend as the default
2024-02-20 10:17:21 +01:00
Sarah Hoffmann
cf49a070fd
switch Ubuntu installation scripts to Python frontend
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
4aba36c5ac
API debug: properly escape non-highlighted code
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
ca6e65fff1
bdd: be more verbose on HTML parsing error
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
1e0025b095
also switch unit tests for cli
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
173e85c9e6
actions: make php the legacy tests
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
ffb467028e
update documentation to recommend Python frontend
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
05fad607ff
make Python frontend default and PHP optional
2024-02-19 18:39:01 +01:00
Sarah Hoffmann
19360a9552
Merge pull request #3338 from lonvia/remove-nested-cli-groups
...
Add documentation for importing without superuser rights
2024-02-16 19:27:25 +01:00
Sarah Hoffmann
b087f3ab7b
actions: switch no-superuser test to PostgreSQL 16
...
The new premission restrictions on the public schema took only
place in PG15, so the previsouly used PG14 does not show any issues.
2024-02-16 17:14:47 +01:00
Sarah Hoffmann
2c8fb31381
add documentation for non-superuser import
2024-02-16 17:14:47 +01:00
Sarah Hoffmann
b2d3f0a8b3
remove unnecessary nested group in CLI import command
2024-02-16 11:32:50 +01:00
Sarah Hoffmann
bd8025feab
Merge pull request #3333 from lonvia/set-empty-extratags-to-null
...
Extratags should become null when empty
2024-02-08 14:26:49 +01:00
Sarah Hoffmann
4c19762e33
extratags should become null when empty
...
Removing the artifical entries in the extratags may lead to
an empty hstore. Set it to null in that case.
Fixes #3055 .
2024-02-08 10:21:48 +01:00
Sarah Hoffmann
1015ac40ae
Merge pull request #3332 from lonvia/improve-cutting-of-result-list
...
Prefilter bad results before adding details and reranking
2024-02-07 10:50:32 +01:00
Sarah Hoffmann
4ce13f5c1f
prefilter bad results before adding details and reranking
...
Move the first cutting of the result list before reranking
by result match. This means that results with significantly
less importance are removed early and independently of the
fact how well they match the original query.
Fixes #3266 .
2024-02-06 20:29:48 +01:00
Sarah Hoffmann
2833362cf6
Merge pull request #3331 from lonvia/fix-word-table-rights
...
Properly grant rights to read-only user when switching out word table
2024-02-06 20:21:25 +01:00
Sarah Hoffmann
bc51378aee
properly grant rights to read-only user when switching out word table
2024-02-06 17:30:01 +01:00
Sarah Hoffmann
39039e2a55
docs: mark layer parameter as python-only
2024-02-06 15:59:04 +01:00
Sarah Hoffmann
f523c01571
Merge pull request #3328 from lonvia/word-count-into-new-table
...
Recreate word table when refreshing counts
2024-02-05 11:58:11 +01:00
Sarah Hoffmann
81eed0680c
recreate word table when refreshing counts
...
The counting touches a large part of the word table, leaving
bloated tables and indexes. Thus recreate the table instead and
swap it in.
2024-02-04 21:35:10 +01:00
Sarah Hoffmann
33c0f249b1
avoid LookupAny with address and too many name tokens
...
The index for nameaddress_vector has grown so large that PostgreSQL
will resort to a sequential scan if there are too many items
in the LookupAny list.
2024-01-29 16:52:14 +01:00
Sarah Hoffmann
76eadc562c
print any collected debug output when returning a timeout error
2024-01-28 22:30:34 +01:00
Sarah Hoffmann
3cc3e3b2e3
Merge pull request #3321 from lonvia/remove-duplicate-partials
...
Improvements to query parsing
2024-01-28 20:32:58 +01:00
Sarah Hoffmann
f07f8530a8
housenumber-only searches cannot be combined with qualifiers
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
103800a732
adjust rankings for housenumber-only searches
...
A normal address search with housenumber will use name rankings for
the street name. This is slightly different than weighing for
address parts. Use the same ranking for the first part of the
address for housenumber-only searches to make sure that penalties
remain comparable.
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
f9ba7a465a
always add a penalty for name + address search fallback
...
If there already was a search by full names, the search is likely
a repeatition that yields the same results, only running slower.
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
fed46240d5
disallow category tokens in the middle of a query string
...
This already worked for left-to-right readings and now is also
implemented for right-to-left reading. A qualifier must always be
before or after the name.
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
2703442fd2
protect against very frequent bad partials
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
2813bf18e6
avoid duplicates in the list of partial tokens for a query
...
This messes with the estimates for expected results.
2024-01-28 19:03:11 +01:00
Sarah Hoffmann
dcebea376d
Merge pull request #3320 from lonvia/fix-timeout-return-code
...
Fix returned HTTP error when query runs too long
2024-01-28 10:37:37 +01:00
Sarah Hoffmann
b3a2b3d484
catch special async timeout error in servers
...
In Python <= 3.10 this is not yet the same as TimeoutError.
Fixes #3303 .
2024-01-27 20:57:23 +01:00
Sarah Hoffmann
7321e66d08
Merge pull request #3317 from lonvia/postcodes-for-highway-areas
...
Search postcodes for highway areas around the area
2024-01-26 19:51:02 +01:00
Sarah Hoffmann
9627352ee4
search postcodes for highway areas around the area
...
So far the code would only accept postcodes that are inside the area.
Fixes #3304 .
2024-01-26 18:14:11 +01:00
Sarah Hoffmann
bfc7acbb18
Merge pull request #3301 from lonvia/fix-class-search-regression
...
Interpret stand-alone special terms always as near term
2024-01-17 10:47:35 +01:00
Sarah Hoffmann
e0ca2ce6ec
interpret stand-alone special terms always as near term
...
Fixes #3298 .
2024-01-16 17:19:21 +01:00
Sarah Hoffmann
b969c5a62f
Merge pull request #3293 from lonvia/rematch-against-country-code
...
Add country code to words to be rematched
2024-01-08 18:48:32 +01:00
Sarah Hoffmann
28f7e51279
add country code to words to be rematched
2024-01-08 12:23:23 +01:00
Sarah Hoffmann
d35eb4105e
Merge pull request #3292 from lonvia/faster-country-search
...
Speed up country search
2024-01-07 20:42:20 +01:00
Sarah Hoffmann
b2afe3ce3e
when a country is in the results, restrict further searches to places
...
A country search result usually comes with a very high importance.
As a result only other very well known places will show up together
with country results and that means only places with lower address
ranks. Name searches for country names tend to yield a lot of POI
results because the country name is part of the name
(think "embassy of Sweden"). By excluding POIs from further searches,
the search is sped up quite a bit.
2024-01-07 17:29:12 +01:00
Sarah Hoffmann
7337898b84
dump params in log view
2024-01-07 15:37:53 +01:00
Sarah Hoffmann
4305160c91
prioritize country searches when penaly is equal
2024-01-07 15:28:37 +01:00
Sarah Hoffmann
dc52d0954e
Merge pull request #3238 from mtmail/check-database-for-version-match
...
admin --check-database also checks database vs nominatim version
2024-01-07 15:24:00 +01:00
Sarah Hoffmann
d3a575319f
Merge pull request #3289 from lonvia/viewbox-and-housenumbers
...
Do not restrict by viewbox when housenumber or postcode is available
2024-01-07 15:23:14 +01:00
Sarah Hoffmann
2592bf1954
Merge pull request #3290 from lonvia/near-vs-quaifier-words
...
Do not run near queries on qualifier words
2024-01-07 15:23:00 +01:00
Sarah Hoffmann
88d7ffa274
Merge pull request #3291 from lonvia/fix-timezone-handling
...
Fix timezone handling for timestamps from the database
2024-01-07 15:22:42 +01:00
Sarah Hoffmann
474d4230b8
fix timezone handling for timestamps from the database
...
SQLite is not timezone-aware, so make sure to convert to UTC
before inserting any data.
2024-01-07 11:37:40 +01:00
Sarah Hoffmann
10a5424a71
do not run near queries on qualifier words
...
There is too much potential for confusion (e.g. 'Rio Grande' read
as 'river near Grande') fir too little gain. Use near phrases
instead.
2024-01-07 11:33:11 +01:00
Sarah Hoffmann
7eb04f67e2
do not restrict by viewbox when housenumber or postcode is available
...
Fixes #3274 .
2024-01-07 11:29:26 +01:00
Marc Tobias
1d7e078a2c
check-database also checks database vs nominatim version
2024-01-06 20:56:56 +01:00
Sarah Hoffmann
f03ec3ea12
Merge pull request #3286 from lonvia/avoid-bind-parameters-in-lambdas
...
Avoid closure variables in lambda statements
2024-01-05 21:24:48 +01:00
Sarah Hoffmann
8e90fa3395
avoid closure variables in lambda statements
...
There is a bug in SQLAlchemy that assigns the wrong value to bind
parameters from closure variables when reusing lambda statements
that are later extended with other non-lambda expressions.
Thus either avoid lambda statements with closure variables or extending
them with non-lambda expressions.
2024-01-05 17:49:28 +01:00
Sarah Hoffmann
02af0a2c87
use correct SQLAlchemy pool for asynchronous connections
...
See https://github.com/sqlalchemy/sqlalchemy/issues/8771
2024-01-02 16:15:44 +01:00
Sarah Hoffmann
fa4e5513d1
API: avoid engine disposal on startup
2024-01-02 16:10:30 +01:00
Sarah Hoffmann
93afe5a7c3
update typing for latest changes in SQLAlchemy
2023-12-29 20:55:33 +01:00
Sarah Hoffmann
af85ad390f
Merge pull request #3273 from lonvia/search-with-sqlite
...
Add forward search capability for SQLite databases
2023-12-12 12:15:22 +01:00
Sarah Hoffmann
ab45db5360
add minimal documentation for the SQLite usage
2023-12-09 16:30:31 +01:00
Sarah Hoffmann
89094cf92e
error out when a SQLite database does not exist
...
Requires to mark the databse r/w when it is newly created in the
convert function.
2023-12-07 10:24:53 +01:00
Sarah Hoffmann
3f5484f48f
enable search for sqlite conversion by default
2023-12-07 09:33:42 +01:00
Sarah Hoffmann
ff06b64329
enable all BDD API tests for sqlite
2023-12-07 09:32:02 +01:00
Sarah Hoffmann
6d39563b87
enable all API tests for sqlite and port missing features
2023-12-07 09:32:02 +01:00
Sarah Hoffmann
0d840c8d4e
extend sqlite converter for search tables
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
381bd0b576
remove unused function
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
b5c61e0b5b
improve typing for @compiles constructs
...
The first parameter is in fact the self parameter referring to
the function class.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
df6eddebcd
void unnecessary aliases
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
b6c8c0e72b
factor out SQL for filtering by location
...
Also improves on the decision if an indexed is used or not.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
b06f5fddcb
simplify handling of SQL lookup code for search_name
...
Use function classes which can be instantiated directly.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
8791c6cb69
correctly close API objects during testing
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
615b166c68
clean up ST_DWithin and intersects() functions
...
A non-index version of ST_DWithin is not necessary. ST_Distance
can be used for that purpose. Index use for intersects can be
covered with a simple parameter.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
c41f2fed21
simplify weigh_search() function
...
Use JSON arrays which can have mixed types and therefore have
a more logical structure than separate arrays. Avoid JSON dicts
because of their verboseness.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
05e47fbb28
fix parameter formatting in sqlite debug output
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
1b7c8240ba
enable connection pools for sqlite
...
Connecting is reasonably expensive because the spatialite extension
needs to be loaded. Disable pooling for tests because there is some
memory leak when quickly opening and closing QueuePools with sqlite
connections.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
c4fd3ab97f
hide type differences between Postgres and Sqlite in custom types
...
Also define a custom set of operators in preparation of differences
in implementation.
2023-12-07 09:31:00 +01:00
Sarah Hoffmann
8c7140d92b
Merge pull request #3108 from mtmail/remove-legacy-wikipedia-tag-syntax
...
These days the OSM wikipedia tab no longer contains URLs
2023-12-07 09:24:32 +01:00
Sarah Hoffmann
3969ce0f55
Merge pull request #3268 from mtmail/wikipedia-file-path-warning
...
Improve error message when Wikipedia importance file is not found
2023-12-07 09:21:59 +01:00
Robbe Haesendonck
4f5f5ea8fc
Removed unnecessary check for --prepare-database flag
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
5f7cc91cf9
Connect using localhost instead of socket
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
424c1f0d41
Added changing permissions of nominatim-project dir
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
cff05394a1
Added osm-import to sudoers file for tokenizer setup
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
638b40c3ec
Fixing CI tests for install-no-superuser
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
53d2050dc5
Fixed typechecking error
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
97ac036df5
Added missing return types to functions
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
482f7fe3ba
CI tests: Removed creation of user www-data.
...
Removed creation of user www-data as it already exists
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
567c31ab6a
Fixed legacy import command
...
Check whether prepare-database is true, if so exit early
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
7d28fc35d1
Disabled pylint too-many-branches
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
c06f902398
Fixed setting tokenizer property
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
59ae63e6f5
Updated no-superuser install ci test
...
Added nominatim_database_webuser (www-data).
Set non-superuser password for importing
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
9c7d947fd1
Updated check to see if osm_file is set
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
58db0ad6d8
Fixed formatting
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
3b09c39dbf
Updated ci tests to reflect changes in Nominatim CLI
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
db917cb0d4
Made sure legacy import command still works
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
ba6cdd875d
Removed unused variable, fixed connection
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
d231ff60ed
Removed _is_complete_import check
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
c74904d075
Improved logic.
...
Fixed small oversight in mutually exclusiveness of arguments
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
22204050f2
Added new psql user for importing the data
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
667197a47e
Changed naming of flags.
...
Made sure legacy import is also still ok
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
e8b866aa88
Added check to see if hstore is loaded
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
e7b8e1a2c2
Fixed ci-tests, osm-file flag
...
Preparing database should work without osm-file
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
279b4fd6d2
Renamed flags
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
b7c83d3580
Fixed pylint warnings
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
d4018f2e3b
Added check for hstore extension
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
38369ca3cf
Fixed typo
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
cc0bdd34e9
Fixed linting errors
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
8e71ff329c
Added version check for PostGis and Postgres
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
b4e3d0ea44
Updated CI tests to check new import flags
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
992703b15e
Added --prepare-database flag
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
ba5ec80611
Added --no-superuser flag
...
To allow import into already existing databases.
Refs: #2719
2023-12-07 09:04:33 +01:00
marc tobias
1c1447e709
Improve error message when Wikipedia importance file is not found
2023-12-06 14:31:07 +01:00
Sarah Hoffmann
3c32c0354a
actions: pin pytest-asyncio version for Ubuntu 20
...
Newest versions are no longer compatible with older pytest.
2023-12-04 14:32:03 +01:00
Sarah Hoffmann
8a2c6067a2
skip lookup with full names when there are none
2023-12-01 12:11:58 +01:00
Sarah Hoffmann
d60a45715a
Merge pull request #3263 from lonvia/near-search-penalty-inheritance
...
More tweaks for Python frontend search
2023-11-29 14:02:24 +01:00
Sarah Hoffmann
3c7a28dab0
further restrict stop search criterion
2023-11-29 11:28:54 +01:00
Sarah Hoffmann
0c72a434e0
use restrict for housenumber lookups with few numbers
2023-11-29 11:28:54 +01:00
Sarah Hoffmann
32e7b59b1f
NearSearch needs to inherit penalty from inner search
2023-11-29 11:28:52 +01:00
Sarah Hoffmann
f448423727
Merge pull request #3262 from lonvia/fix-category-search
...
Fix use of category parameter for search() function
2023-11-28 20:02:36 +01:00
Sarah Hoffmann
b2319e52ff
correctly exclude streets with housenumber searches
...
Street result are not subject to the full filtering in the SQL
query, so recheck.
2023-11-28 17:53:37 +01:00
Sarah Hoffmann
25279d009a
add tests for interaction of category parameter with category terms
2023-11-28 16:56:08 +01:00
Sarah Hoffmann
3f72ca4bca
rename use of category as POI search to near_item
...
Use the term category only as a short-cut for "tuple of key and value".
2023-11-28 16:27:05 +01:00
Sarah Hoffmann
70dc4957dc
the category parameter in search should result in a qualifier
2023-11-28 12:01:49 +01:00
Sarah Hoffmann
d8ed565bce
Merge pull request #3260 from lonvia/improve-catgeory-search
...
Various improvements to search with special phrases for Python frontend
2023-11-27 12:02:11 +01:00
Sarah Hoffmann
a7f5c6c8f5
drop category tokens when they make up a full phrase
2023-11-26 20:58:50 +01:00
Sarah Hoffmann
a8b023e57e
restrict base results in near search by rank
...
This avoids in particular that roads or POIs are used as base
for the near search when a place result is present.
2023-11-26 17:41:29 +01:00
Sarah Hoffmann
47ca56f21b
deduplicate categories/qualifiers
2023-11-26 17:11:15 +01:00
Sarah Hoffmann
580a7b032f
order near searches by distance instead of importance
2023-11-26 16:48:04 +01:00
Sarah Hoffmann
8fcc2bb7f5
avoid duplicate lines during category search
2023-11-26 14:53:20 +01:00
Sarah Hoffmann
d6fe58f84e
fix polygon selection for classtable lookups
...
Polygons should be used preferably with higher address ranks
where the areas are smaller.
2023-11-25 21:01:27 +01:00
Sarah Hoffmann
2d54de09bb
Merge pull request #3257 from lonvia/slow-queries
...
Performance tweaks for search
2023-11-23 12:05:50 +01:00
Sarah Hoffmann
4e4d29f653
increase penalty for one-letter words
2023-11-23 10:51:58 +01:00
Sarah Hoffmann
195c13ee8a
more preference for name-only queries in search
2023-11-22 23:57:23 +01:00
Sarah Hoffmann
ac5ef64701
avoid index use when filtering by layer
2023-11-22 20:54:04 +01:00
Sarah Hoffmann
e7dc24c026
add timestamps to text logging
2023-11-22 17:38:32 +01:00
Sarah Hoffmann
155f26060d
avoid index on rank_address in near search
2023-11-22 17:33:17 +01:00
Sarah Hoffmann
a87fe8d8bf
exclude country-level searches with non-address layers
2023-11-22 17:01:41 +01:00
Sarah Hoffmann
158df6b2e8
Merge pull request #3252 from kumarUjjawal/patch-1
...
minor typo fix
2023-11-22 12:51:37 +01:00
Kumar Ujjawal
b8db76c925
minor typo fix
...
fixed a minor typo, from 'wit' to 'with'.
2023-11-20 17:23:42 +05:30
Sarah Hoffmann
fffdfc9b88
add report on newest vulnerability
2023-11-20 10:44:48 +01:00
Sarah Hoffmann
6478409b05
improve code to collect the PostGIS version
...
The SQL contained an unchecked string literal, which may in theory be
used to attack the database.
2023-11-16 11:14:29 +01:00
Sarah Hoffmann
ee556fd42e
Merge pull request #3248 from lonvia/fix-postcode-area-computation
...
PHP frontent: fix postcode area computation for address points
2023-11-15 22:10:21 +01:00
Sarah Hoffmann
9a1b8a67d6
adapt typing to newest version of SQLAlchemy
2023-11-15 19:59:26 +01:00
Sarah Hoffmann
383e3ccd25
php frontend: fix on-the-fly lookup of postcode areas
2023-11-15 17:45:12 +01:00
Sarah Hoffmann
b4ce1fb599
remove now unnecessary type igonre comment
2023-11-01 11:57:57 +01:00
Sarah Hoffmann
2bf8e62580
fix assertion on address list, it may be empty
...
Fixes #3237 .
2023-10-31 21:10:54 +01:00
Sarah Hoffmann
afb439b089
Merge pull request #3235 from lonvia/fix-python-deploy
...
Python frontend deployment: add systemd service for the socket
2023-10-25 14:54:13 +02:00
Sarah Hoffmann
78a87ad16b
python deployment: add systemd service for the socket
2023-10-25 11:31:42 +02:00
Sarah Hoffmann
5bf55a69a5
Merge pull request #3234 from lonvia/reduce-admin-style
...
Streamline admin style
2023-10-25 09:38:17 +02:00
Sarah Hoffmann
ca782e2f20
Merge pull request #3233 from lonvia/support-for-sqlite
...
Add support for SQLite DBs in frontend: reverse
2023-10-24 11:54:35 +02:00
Sarah Hoffmann
308de35802
further reduce admin style import to admin-only objects
2023-10-24 09:50:43 +02:00
Sarah Hoffmann
a9ac68a729
restrict geometry size for SQLite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
84d6b481ae
convert sqlite: add index on parent_place_id
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
613c8635a8
remove type info from SQLALchemy condition functions
...
A boolean type makes the SQLite dialect produce a costruct like
'func() = 1' in WHERE condition. While syntactically correct, it tends
to confuse the query planer.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
899a04ad26
make code work with Spatialite 4.3
...
Transfer is_address_point into SQLAlchemy function, so that
json.has_key() can use the older json_extract() function.
And work around broken Distance function.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d8dca2a3a9
enable BDD tests for sqlite databases
...
The database must currently be created by hand and the name handed
in via -DAPI_TEST_DB='sqlite:...'.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
8216899a9a
trim all coordinate output to 7 digits
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
b1d419f458
add indexing support for DWithin and intersects for sqlite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
0417946153
make reverse API work with sqlite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
1149578e8f
actions: enable sqlite testing
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
37488ee82b
try future annotations to resolve Generics compatibility
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
06bbd501fd
make status API work with sqlite incl. unit tests
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
07e6c5cf69
make details API work with sqlite incl. unit tests
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d0c91e4acf
make lookup call work with sqlite
...
Includes porting unit tests.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
114cdafe7e
add exporting of SQLite table
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
837bdecde8
add skeleton code for convert function
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d9d0e70e5b
streamline SQLAlchemy DB schema
...
Remove all information not strictly used by the frontend as well as
any index information. This will make it easier to create a SQLite
database from the schema.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
1255efba7f
remove unused code
2023-10-23 11:55:18 +02:00
Sarah Hoffmann
6ad397d4a9
Merge branch 'clean-deleted-relations' of https://github.com/lujoh/Nominatim into lujoh-clean-deleted-relations
2023-10-23 10:47:31 +02:00
Sarah Hoffmann
570ca22d71
Merge pull request #3228 from pawel-wroniszewski/fix/postcode-validation
...
Properly validate postcodes with country code
2023-10-23 10:35:42 +02:00
lujoh
418f381b49
made age a required argument for the -clean-deleted command
2023-10-20 15:31:55 -04:00
Paweł Wroniszewski
2cae37ccde
Revert country settings
2023-10-20 12:50:28 +02:00
lujoh
650fbc2563
added --clean deleted command to the documentation
2023-10-18 02:05:46 -04:00
lujoh
9ec26c60ff
adjusted tests for --clean-deleted-relations command
2023-10-17 23:03:37 -04:00
lujoh
06204dfcd8
moved sql function flush_deleted_places() to utils
2023-10-17 18:22:27 -04:00
Paweł Wroniszewski
fbe40e005d
Properly validate postcodes with country code
...
Include postcode pattern in postcode normalisation regex, instead of
removing it from postcode pattern in config.
It properly handles postcode validation and normalization when country code
is part of the postcode, e.g. for Isle of Man, Jersey, Anguilla, Andorra,
Cayman Islands and more.
Fixes #3227 .
2023-10-17 01:04:07 +02:00
lujoh
e9efef9095
added subcommand to clean deleted relations for issue # 2444
2023-10-16 11:30:58 -04:00
Sarah Hoffmann
95c3181a35
adapt typing for newer version of mypy
2023-10-16 17:03:48 +02:00
Sarah Hoffmann
12dbfb0777
Merge pull request #3222 from lonvia/fix-river-output
...
Make sure the place name always comes first in output
2023-10-10 11:20:12 +02:00
Sarah Hoffmann
b62dbd1f92
reduce influence of viewbox
...
Perfectly matching city names should still get priority.
2023-10-07 22:00:52 +02:00
Sarah Hoffmann
5011fde176
make sure the place name always comes first in output
...
Also deleted some now unused code.
2023-10-05 16:37:28 +02:00
Sarah Hoffmann
54cb9a33b1
Merge pull request #3212 from lonvia/more-tests
...
Add more unit tests for search
2023-10-05 16:36:53 +02:00
Sarah Hoffmann
f1fbcd863d
switch back meaning of reverse and search in warm
...
Also do'n try to warm up searches on reverse-only databases.
Fixes #3213 .
2023-10-04 15:19:24 +02:00
Sarah Hoffmann
b00b16aa3a
more unit tests for search
2023-09-27 15:00:05 +02:00
Sarah Hoffmann
0f19695225
Merge pull request #3211 from lonvia/replace-get-addressdata
...
Move get_addressdata() implementation to Python
2023-09-26 21:29:15 +02:00
Sarah Hoffmann
7fcbe13669
move get_addressdata() implementation to Python
...
The pgsql function get_addressdata() does a lookup of a lot of data
that is already available in Python.
2023-09-26 11:21:36 +02:00
Sarah Hoffmann
87c91ec5c4
Merge pull request #3206 from lonvia/rerank-by-locale
...
Reintroduce result reranking
2023-09-21 09:24:18 +02:00
Sarah Hoffmann
0e10916b07
adapt tests to improved search
2023-09-20 14:58:54 +02:00
Sarah Hoffmann
21df87dedc
filter duplicate results after DB query
2023-09-20 14:58:54 +02:00
Sarah Hoffmann
fd26310d6a
rerank results by query
...
The algorithm is similar to the PHP reranking and uses the terms from
the display name to check against the query terms. However instead of
exact matching it uses a per-word-edit-distance, so that it is less
strict when it comes to mismatching accents or other one letter
differences.
Country names get a higher penalty because they don't receive a
penalty during token matching right now.
This will work badly with the legacy tokenizer. Given that it is
marked for removal, it is simply not worth optimising for it.
2023-09-20 14:52:05 +02:00
Sarah Hoffmann
5762a5bc80
move localization into add_result_details
...
This means that the locale now needs to be handed in into the search
functions already. At least search needs them for reranking.
2023-09-19 11:17:04 +02:00
Sarah Hoffmann
8106e67f14
Merge pull request #3201 from lonvia/tweak-expected-count
...
Reduce expected count for multi-part words
2023-09-17 17:04:27 +02:00
Sarah Hoffmann
f029fb3c65
'fix' issues with recent changes to psycopg2 typing
...
Some of the changes just make the warnings go away. The typing info
is still incorrect on the stub side, as far as I can determine.
2023-09-17 15:09:34 +02:00
Sarah Hoffmann
44da684d1d
reduce expected count for multi-part words
...
Fixes #3196 .
2023-09-11 17:45:34 +02:00
Sarah Hoffmann
64c1a4fc8c
add changelog for 4.2.3
2023-09-07 10:07:16 +02:00
Sarah Hoffmann
ec47459410
prepare release 4.3.0
2023-09-06 20:08:28 +02:00
Sarah Hoffmann
c55c3657c3
reenable logging of details calls
2023-09-06 11:35:53 +02:00
Sarah Hoffmann
8b56b55761
restrict deduplication to results from placex
...
All other sources do not have deduplicatable entries.
2023-09-06 10:43:55 +02:00
Sarah Hoffmann
9056c9276f
add bbox output to lookup results
...
Fixes #3149 .
2023-09-06 10:27:03 +02:00
marc tobias
09ae312f09
documentation: fix a broken link, typos
2023-09-05 17:06:32 +02:00
Sarah Hoffmann
d6960c72e4
Merge pull request #3190 from lonvia/fix-internal-server-errors
...
Fix more failing queries
2023-09-05 17:00:31 +02:00
Sarah Hoffmann
b529e054cf
Merge pull request #3189 from lonvia/add-country-area-restriction
...
Implement NOMINATIM_SEARCH_WITHIN_COUNTRIES for Python frontend
2023-09-05 14:29:44 +02:00
Sarah Hoffmann
b4a4ca81d1
actions: update to checkout v4
2023-09-05 11:44:12 +02:00
Sarah Hoffmann
c284df2dc9
restrict range for interpolated housenumbers
...
Interpolations are only supported up to 2^32 by the database.
Limit to 8 digits, which is still more than should be needed.
2023-09-05 11:41:41 +02:00
Sarah Hoffmann
18b2a4c204
avoid interpreting integral numbers as coordinates
...
There are addresses of type '123 W 345 N, Reigh', where 'W 345 N' is
the actual name of the street.
2023-09-05 11:26:47 +02:00
Sarah Hoffmann
e1303fb592
Merge pull request #3188 from lonvia/update-osm2pgsql
...
Update osm2pgsql to 1.9.2
2023-09-05 10:44:32 +02:00
Sarah Hoffmann
bd25cf04ed
update osm2pgsql to 1.9.2
2023-09-04 14:53:46 +02:00
Sarah Hoffmann
ce1f4cbbdc
allow lower case OSM types in lookup query
2023-09-04 14:39:35 +02:00
Sarah Hoffmann
e0aea0f27a
Merge pull request #3186 from lonvia/tablespaces-for-flex
...
Make tablespace arguments work again for flex tables
2023-09-04 14:25:45 +02:00
Sarah Hoffmann
9848c4c56c
implement NOMINATIM_SEARCH_WITHIN_COUNTRIES setting
2023-09-04 14:10:36 +02:00
Sarah Hoffmann
cb8149f8ea
reenable tablespace arguments for flex tables
2023-09-04 10:45:52 +02:00
Sarah Hoffmann
0e74e82a38
add a shutdown handler for falcon server closing DB connections
2023-08-31 09:40:56 +02:00
Sarah Hoffmann
15e09f2b24
remove alias where it does not work with lambdas
...
Fixes #3177 .
2023-08-30 21:55:34 +02:00
Sarah Hoffmann
2de8256863
fix parameter name for layer filter
2023-08-30 09:57:46 +02:00
Sarah Hoffmann
aff43fb1a3
Merge pull request #3178 from lonvia/library-documentation
...
Update documentation for new Python frontend
2023-08-30 09:17:24 +02:00
Sarah Hoffmann
cafd8e2b1e
fix typos and grammar issues
2023-08-29 12:14:44 +02:00
Sarah Hoffmann
3794080327
rename documentation to 'Nominatim Manual'
2023-08-28 10:59:26 +02:00
Sarah Hoffmann
4e2683f068
adapt installation instruction for different frontends
2023-08-28 10:48:34 +02:00
Sarah Hoffmann
6e5f595d48
update API documentation
2023-08-28 10:31:58 +02:00
Sarah Hoffmann
2c24ba6d2d
add deployment documentation for Python frontend
2023-08-27 21:27:16 +02:00
Sarah Hoffmann
3bb27fbee6
update documentation for configuration
2023-08-27 16:08:06 +02:00
Sarah Hoffmann
ef1b52eee5
add getting started section for library docs
2023-08-27 14:42:04 +02:00
Sarah Hoffmann
f917fa67aa
switch to material theme
...
Needed for tabbed code blocks.
2023-08-25 22:47:07 +02:00
Sarah Hoffmann
386b4c82da
preliminary library reference finished
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
a987f22cfb
more library documentation
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
558c42ec83
finish configuration section
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
309ac46b98
restructure library documentation
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
399b04596e
initial configuration documentation
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
75513a23a8
docs: documentation of API classes
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
e672de036e
more adaptions for mkdocstrings griffin plugin
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
6533af6a91
add base framework for library reference
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
d3372e69ec
update to modern mkdocstrings python handler
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
f3809a52e8
Merge pull request #3174 from lonvia/osm2pgsql-update-fix
...
Be more precise on what is deleted on updates
2023-08-25 21:26:23 +02:00
Sarah Hoffmann
c5f5ab5363
be more strict about removal from place_to_be_deleted
...
If the type of a place is changed and then the same insert issued
again, the old data will effectively remain in the table.
Fixed #3168 .
2023-08-25 14:22:49 +02:00
Sarah Hoffmann
26dfb868e9
add test case for bad update
2023-08-25 14:22:49 +02:00
Sarah Hoffmann
d5b6042118
Merge pull request #3172 from lonvia/query-timeout
...
Introduce timeouts for queries
2023-08-25 10:00:22 +02:00
Sarah Hoffmann
1115705cbc
add additional timeout for entire request
2023-08-25 09:16:53 +02:00
Sarah Hoffmann
161d17d85b
use backwards-compatible asyncio timeout implementation
2023-08-25 08:50:03 +02:00
Sarah Hoffmann
5a2ebfcd4a
translate query timeouts into proper HTTP responses
...
Need to use a 503 here because a 408 (Request timeout) will motivate
browsers to immediately resent the request.
2023-08-25 08:50:03 +02:00
Sarah Hoffmann
06a974df36
add a timeout for DB queries
2023-08-25 08:50:03 +02:00
Sarah Hoffmann
2762c45569
apply adjusted counts only to final result
2023-08-24 21:37:02 +02:00
Sarah Hoffmann
fd85483ce3
Merge pull request #3169 from lonvia/tweak-search-with-frequent-names
...
Further tweak detection of queries that would return a massive amount of results
2023-08-24 14:22:35 +02:00
Sarah Hoffmann
0a2d0c3b5c
allow terms with frequent searches together with viewbox
2023-08-24 09:21:09 +02:00
Sarah Hoffmann
de7f9a4bd9
Merge pull request #3167 from lonvia/explicit-encoding
...
Send explicit charset in content-type when returning json
2023-08-24 08:53:11 +02:00
Sarah Hoffmann
c5836c8090
Merge pull request #3139 from mtmail/update-search-examples
...
Search.md - update XML and JSON example output
2023-08-23 23:41:30 +02:00
Sarah Hoffmann
dcdda314e2
further tweak search containing very frequent tokens
...
Excluding non-rare full names is not really possible because it makes
addresses with street names like 'main st' unsearchable. This tries to
leav all names in but refrain from ordering results by accuracy
when too many results are expected. This means that the DB will simply
get the first n results without any particular order.
2023-08-23 23:04:12 +02:00
Sarah Hoffmann
a9edd57fe2
send charset again in content-type when returning json
...
There are quite a few applications out there that will use some local
encoding when the charset is not explicitly given.
2023-08-23 20:55:57 +02:00
Sarah Hoffmann
cbd9fad94b
Merge pull request #3165 from lonvia/update-osm2pgsql
...
Update osm2pgsql to 1.9.1
2023-08-23 15:57:55 +02:00
Sarah Hoffmann
bc1009f8c2
vagrant scripts: add missing yaml library
2023-08-23 08:34:12 +02:00
Sarah Hoffmann
719b66e5ed
add new required json library for osm2pgsql
2023-08-23 00:24:31 +02:00
Sarah Hoffmann
5f09ba4e10
update osm2pgsql to 1.9.1
2023-08-23 00:24:31 +02:00
Sarah Hoffmann
517a0cb673
Merge pull request #3159 from lonvia/fix-name-lookup-for-housenames
...
Fix name lookup for housenames
2023-08-20 15:52:20 +02:00
Sarah Hoffmann
7c79b07817
fix parameter use for ST_Project
...
Before postgis 3.4 ST_Project required a geography as input and seemed
to have implicitly converted to geography. Since 3.4 geometry input
is supported but leads to a completely different result.
2023-08-20 13:52:03 +02:00
Sarah Hoffmann
23eed4ff2f
fix tag name for housename addresses in layer selection
...
Fixes #3156 .
2023-08-19 15:57:33 +02:00
Sarah Hoffmann
4559886d83
Merge pull request #3155 from lonvia/caching-of-transliterators
...
Cache ICU transliterators between calls
2023-08-16 22:55:54 +02:00
Sarah Hoffmann
bfc706a596
cache ICU transliterators and reuse them
2023-08-15 23:08:44 +02:00
Sarah Hoffmann
9805a461eb
Merge pull request #3150 from alfmarcua/allow_neg_id_details
...
Allow negative osm_id in details page by setting default parameter to 0
2023-08-14 11:41:42 +02:00
Sarah Hoffmann
bcf8433ba8
fix regression in default setting for details linkedplaces
2023-08-13 16:24:19 +02:00
Sarah Hoffmann
746dd057b9
prefer name-only searches more
2023-08-13 15:24:16 +02:00
Sarah Hoffmann
b710297d05
return bbox of full country for country searches
...
Fixes #3149 .
2023-08-13 14:37:28 +02:00
Sarah Hoffmann
0a8e8cec0f
fix application of label to wrong expression
2023-08-13 11:59:01 +02:00
Sarah Hoffmann
96e5a23727
avoid lambda SQL in connection with alias tables
2023-08-13 11:40:49 +02:00
Sarah Hoffmann
611b925368
use coalsce() instead of indexless postgis functions
...
ST_Intersects is deemed too expensive by the query planer which
leads to odd plans when index use is avoided.
2023-08-12 19:14:13 +02:00
Sarah Hoffmann
cab2a74740
do not use index when searching in large areas
...
This concerns viewboxes as well as radius search.
2023-08-12 16:12:44 +02:00
Sarah Hoffmann
fa3ac22a8f
adapt tests to changes in search
2023-08-12 16:12:31 +02:00
Sarah Hoffmann
95d1048789
take token_assignment penalty into account
...
Also computes the expected count differently when addresses are
involved. Address token counts do not bare a direct relation to
real counts.
2023-08-12 15:33:50 +02:00
Sarah Hoffmann
38b2b8a143
fix debug output for NearSearch
...
The search info is in a subsearch and was therefore not taken into
account.
2023-08-12 11:27:55 +02:00
Sarah Hoffmann
3d0bc85b4d
improve penalty for token-split words
...
The rematch penalty for partial words created by the transliteration
need to take into account that they are rematched against the full word.
That means that missing beginning and end should not get a significant
penalty.
2023-08-12 11:26:02 +02:00
alfmarcua
25a391070b
Allow negative osm_id in details page by setting default parameter to 0
2023-08-11 10:46:28 +02:00
Sarah Hoffmann
926c4a7d04
fix lookup polygon output
...
Fixes #3147 .
2023-08-08 21:31:25 +02:00
marc tobias
5683f55646
Search.md - update XML and JSON example output
2023-08-08 17:49:11 +02:00
Sarah Hoffmann
671f4e943e
Merge pull request #3146 from lonvia/forbid-mixed-queries
...
Do not allow to mix structured and unstructured search
2023-08-08 17:34:32 +02:00
Sarah Hoffmann
282c0da941
return an error when q is used together with structured parameters
2023-08-08 15:54:55 +02:00
Sarah Hoffmann
78648f1faf
remove lookup by address only
...
There are too many lookups where the address is very frequent,
even when many address parts are present.
2023-08-06 21:00:10 +02:00
Sarah Hoffmann
8d9b5e4775
allow oversized viewboxes again
...
This seems to be a rather regular thing when unconditionally sending
the current view and being zoomed out.
Fixes #3137 .
2023-08-06 17:50:35 +02:00
Sarah Hoffmann
996026e5ed
provide full URL in more field
...
This is a regression against the PHP version.
Fixes #3138 .
2023-08-06 17:50:02 +02:00
Sarah Hoffmann
2c7e1db5f6
remove SQL lambdas with IN expressions
...
The values of IN expressions are incorrectly cached.
2023-08-02 12:34:07 +02:00
Sarah Hoffmann
2171b38551
only print non-empty search tables
2023-08-02 09:25:47 +02:00
Sarah Hoffmann
afdbdb02a1
do not lookup by address vector when only few tokens are available
...
Names of countries and states are exceedingly rare in the word count
but are very frequent in the address. A short name has the danger
of producing too many results.
2023-08-02 09:25:47 +02:00
Sarah Hoffmann
8adeaa2c7e
fix regression with lat/lon in json output
...
lat, lon is returned as strings in the PHP output. Reproduce that in the
Python frontend.
See #3115 .
2023-08-01 14:27:43 +02:00
Sarah Hoffmann
d15f605129
allow OPTIONS method in starlette CORS middleware
...
If not allowed, then the middleware will return a 400 on pre-flight
CORS requests.
Fixes #3129 .
2023-08-01 11:12:36 +02:00
Sarah Hoffmann
252fe42612
Merge pull request #3122 from miku0/sanitizer-final
...
Adds sanitizer for Japanese addresses to correspond to block address
2023-08-01 10:38:58 +02:00
miku0
67e1c7dc72
Moved KANJI_MAP to icu-rules
2023-07-31 11:57:49 +00:00
Sarah Hoffmann
c29ffc38e6
Merge pull request #3128 from lonvia/fix-classtype-lookup
...
Fix query over classtype tables
2023-07-31 10:20:58 +02:00
miku0
4d61cc87cf
Add the test of reconbine_place
2023-07-31 02:39:56 +00:00
miku0
2350018106
Fixed cosmetic issues
2023-07-31 02:39:04 +00:00
Sarah Hoffmann
8fc3dd9457
fix query over classtype tables
...
The case statement prevented the index on the classtype tables
from being used. Move the case statement inside the geometry
function instead.
2023-07-30 23:51:36 +02:00
Sarah Hoffmann
d97ca9fcb2
Merge pull request #3127 from lonvia/file-logging
...
Add file logging for Python frontend
2023-07-30 21:22:48 +02:00
Sarah Hoffmann
e523da9e12
reintroduce file logging for Python frontend
2023-07-30 19:58:00 +02:00
miku0
67706cec4e
add @fail-legacy
2023-07-27 07:33:53 +00:00
miku0
fac8c32cda
Moved KANJI_MAP to global variable
2023-07-26 21:43:22 +00:00
Sarah Hoffmann
1c6f426363
Merge pull request #3125 from lonvia/warm-to-python
...
Port warm and export functions to Python
2023-07-26 22:37:37 +02:00
Sarah Hoffmann
8cba65809c
older version of Postgres cannot convert jsonb to int
2023-07-26 17:45:21 +02:00
Sarah Hoffmann
77ed4f98bb
older Python versions need a reference to the loop for a lock
2023-07-26 15:17:18 +02:00
miku0
848e5ac5de
Correction to PR's comment
2023-07-26 09:50:25 +00:00
Sarah Hoffmann
9448c5e16f
add tests for new arm and export Python functions
2023-07-26 11:09:52 +02:00
miku0
0722495434
add japanese sanitizer
2023-07-26 07:54:58 +00:00
Sarah Hoffmann
d545c6d73c
mostly remove php-cgi requirement
...
This is now only needed for BDD tests against the php API.
2023-07-26 00:10:11 +02:00
Sarah Hoffmann
f69fea4210
remove now unused run_api_script function
2023-07-25 22:45:29 +02:00
Sarah Hoffmann
4cd0a4ced4
remove now unused run_legacy_script()
2023-07-25 21:39:23 +02:00
Sarah Hoffmann
0804cc0cff
port export function to Python
...
Some of the parameters have been renoved as they don't make sense
anymore.
2023-07-25 21:39:23 +02:00
Sarah Hoffmann
faeee7528f
move warm script to python code
2023-07-25 21:39:23 +02:00
Sarah Hoffmann
261e0cfd5a
Merge pull request #3121 from lonvia/port-remaining-api-calls
...
Port remaining API endpoints to Python
2023-07-25 20:56:38 +02:00
Sarah Hoffmann
66ecb56cea
add tests for new endpoints
2023-07-25 10:57:19 +02:00
Sarah Hoffmann
79bd54f610
add /polygons endpoint to Python v1 API
2023-07-22 20:59:13 +02:00
Sarah Hoffmann
30cef4d5fd
add deletable endpoint
2023-07-22 17:21:24 +02:00
Sarah Hoffmann
8d52032263
remove debug print
2023-07-22 13:54:23 +02:00
Sarah Hoffmann
4a5786334b
Merge pull request #3117 from lonvia/fix-assorted-search-errors
...
More improvements to the Python search algorithm
2023-07-22 11:45:36 +02:00
Sarah Hoffmann
587698a6f3
disallow special housenumber search with a single frequent partial
2023-07-20 18:05:54 +02:00
Sarah Hoffmann
927d2cc824
do not split names from typed phrases
...
When phrases are typed, they should only contain exactly one term.
2023-07-17 20:09:08 +02:00
Sarah Hoffmann
7f9cb4e68d
split up get_assignment functon in more readable parts
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
d48ea4f22c
disallow address searches that start with a postcode
...
These are postcode searches and nothing else.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
412bd2ec20
block search queries with too many tokens
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
1c189060c2
simplify yield_lookups() function
...
Move creation of field lookups in separate functions to make the code
more readable.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
4a00a3c0f5
penalize name token splitting when phrases are used
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
8366e4ca83
penalize search with frequent partials
...
Avoid search against frequent partials if we have already looked for
the full name equivalents.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
283db76e45
avoid splitting of first token when a housenumber is present
...
This only covers the case of <poi name> <street name> <housenumber>
which is exceedingly rare.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
8a36ed4f6f
increase threshold for full name searches
...
They still should be preferrred over expensive partial name searches.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
d0f45155c8
fix search for housenumber names
...
The search still included a lookup of housenumbers in children which is
wrong.
2023-07-17 16:27:25 +02:00
Sarah Hoffmann
9fc235d670
Merge pull request #3112 from jenkin/fix-polgyon-polygon-typo
...
fix polgyon polygon typo
2023-07-17 14:20:14 +02:00
Alessio Cimarelli
42c549274f
fix polgyon polygon typo
2023-07-17 10:11:57 +02:00
Sarah Hoffmann
2e56182a7f
Merge pull request #3110 from lonvia/sql-lambda-queries
...
Use SQLAlchemy's lambda statements
2023-07-14 18:57:31 +02:00
Sarah Hoffmann
7932b1849b
selected lambdas for search
2023-07-14 15:43:29 +02:00
Sarah Hoffmann
886374d779
add lambdas for layer filters
2023-07-14 15:27:20 +02:00
Sarah Hoffmann
d42e2e391f
avoid forwarding variables via SQL
2023-07-14 15:27:16 +02:00
Sarah Hoffmann
f264eaeda2
make SQL statements in reverse lambda functions
...
Further improves internal caching of statements by SQLAlchemy.
2023-07-14 14:39:14 +02:00
Sarah Hoffmann
35fd74af6d
Merge pull request #3096 from alfmarcua/search-within-countries-parameter
...
Parameterise the search only within countries
2023-07-12 17:45:55 +02:00
alfmarcua
4b53cf1464
Split lookupInCountry in two functions and document NOMINATIM_SEARCH_WITHIN_COUNTRIES parameter
2023-07-12 13:53:23 +02:00
alfmarcua
26e78efbb9
Parameterise the search only within countries
2023-07-12 13:53:23 +02:00
Sarah Hoffmann
157f0b8a83
Merge pull request #3109 from lonvia/prepared-statements
...
Make prepared statements work with Python API
2023-07-10 11:45:29 +02:00
Sarah Hoffmann
d743cf308e
avoid index-use on rank parameters for reverse lookups
2023-07-09 22:49:31 +02:00
Sarah Hoffmann
f4cdcb995c
force a fixed pool size and make it configurable
2023-07-09 00:31:53 +02:00
Sarah Hoffmann
75139961a3
use constant expressions to select partial indexes in reverse
...
When expressions are generated with SQLAlchemy, any constants are
replaced with bind parameters. The bind parameters become parameters of
prepared statements. The result is that the query planner tends to
oversee that the partial indexes can be used.
2023-07-09 00:31:53 +02:00
Sarah Hoffmann
3e2dd59a94
remove disabling of prepared statements
...
Fixes for query planning with prepared statements to follow in
subsequent commits.
2023-07-08 15:59:15 +02:00
Sarah Hoffmann
c01386b5b4
Merge pull request #3107 from lonvia/performance-search
...
Assorted fixes to Python search code
2023-07-08 15:53:42 +02:00
Marc Tobias
f59a072aa6
These days the OSM wikipedia tab no longer contains URLs
2023-07-07 17:36:11 +02:00
Sarah Hoffmann
9cb8447673
increase minimum required SQLAlchemy version to 1.4.31
2023-07-06 14:15:51 +02:00
Sarah Hoffmann
e67355ab0e
make get_addressdata calls cachable
...
VALUEs() is not a cachable construct in SQLAlchemy, so use arrays
instead. Also add a special case for single results, the usual result
for reverse queries.
2023-07-06 12:16:57 +02:00
Sarah Hoffmann
9cb9b670d1
add support for postcompile literals in debug output
2023-07-06 12:16:57 +02:00
Sarah Hoffmann
3e725bb2db
fix SRID handling in Geometry type
2023-07-06 12:16:57 +02:00
Sarah Hoffmann
cc45930ef9
avoid lookup via partials on frequent words
...
Drops expensive searches via partials on terms like 'rue de'.
See #2979 .
2023-07-06 12:16:57 +02:00
Sarah Hoffmann
3266daa8fd
add a small penalty to lookups in address vectors
2023-07-04 16:54:42 +02:00
Sarah Hoffmann
ce17b0eeca
Merge pull request #3101 from lonvia/custom-geometry-type
...
Improve use of SQLAlchemy statement cache with search queries
2023-07-03 11:03:26 +02:00
Sarah Hoffmann
17a65d82bb
make types compatible with older Python versions
2023-07-02 23:06:42 +02:00
Sarah Hoffmann
cc7646665c
remove GeoAlchemy as dependency
2023-07-02 23:06:42 +02:00
Sarah Hoffmann
82216ebf8b
always run function update on migrations
...
This means that we can have migrations which require nothing but
an update of the functions.
2023-07-01 20:18:59 +02:00
Sarah Hoffmann
49e0d83d5d
fix linting issues
2023-07-01 20:18:59 +02:00
Sarah Hoffmann
673c3c7a55
replace regexp_match with generic op() functions
...
Works around a bug in SQLAlchemy where regexp_match creates an
unstable cache key.
2023-07-01 18:15:22 +02:00
Sarah Hoffmann
5135041405
replace CASE construct with plpgsql function
2023-07-01 18:15:22 +02:00
Sarah Hoffmann
42631b85c7
band-aid for SQLAlchemy 1.4
2023-07-01 18:03:07 +02:00
Sarah Hoffmann
9f6f12cfeb
move search to bind parameters
2023-07-01 18:03:07 +02:00
Sarah Hoffmann
6c4c9ec1f2
switch reverse() to new Geometry datatype
...
Also switches to using bind parameters for recurring parameters.
2023-07-01 18:03:07 +02:00
Sarah Hoffmann
4bb4db0668
introduce slim Geometry database type
2023-07-01 18:03:07 +02:00
Sarah Hoffmann
505fdd02ca
Merge pull request #3100 from lonvia/fix-name-merging-in-unnamed-boundaries
...
Fix merging of linked names into unnamed boundaries
2023-07-01 15:36:56 +02:00
Sarah Hoffmann
a873f260cf
fix merging of linked names into unnamed boundaries
...
The NULL value of the boundaries' name field was erasing all
content when used in SQL operations.
2023-06-30 22:14:11 +02:00
Sarah Hoffmann
b45f761227
Merge pull request #3099 from lonvia/determine-place-address-from-tokenizer
...
Use information from tokenizer to determine street vs. place address
2023-06-30 21:47:57 +02:00
Sarah Hoffmann
d7a3039c2a
also switch legacy tokenizer to new street/place choice behaviour
2023-06-30 17:03:17 +02:00
Sarah Hoffmann
6c5589c9d2
fix optional string representation or repr(PlaceName)
2023-06-30 11:10:44 +02:00
Sarah Hoffmann
645ea5a057
use information from tokenizer to determine street vs. place address
...
So far the SQL logic used the information from the address field
to determine if an address is attached to a street or place.
This changes the logic to use the information provided in the
token_info. This allows sanitizers to enforce a certain parenting
without changing the visible address information.
2023-06-30 11:08:25 +02:00
Sarah Hoffmann
2755ebe883
Merge pull request #3094 from lonvia/fix-failing-bdd-tests
...
Add BDD tests against Python frontend to CI
2023-06-22 22:28:31 +02:00
Sarah Hoffmann
4b829b5ff9
Merge pull request #3090 from mtmail/check-database-on-frozen-database
...
check-database on frozen db shouldnt recommend indexing
2023-06-22 20:11:30 +02:00
Sarah Hoffmann
ed19340af0
add python frontend tests to CI
2023-06-22 17:29:44 +02:00
Sarah Hoffmann
2d05ff0190
slightly adapt postcode tests
2023-06-22 16:51:59 +02:00
Sarah Hoffmann
0d338fa4c0
bdd: fix faking HTTP headers for python web frameworks
2023-06-22 14:00:33 +02:00
mtmail
15a66e7b7d
Merge branch 'osm-search:master' into check-database-on-frozen-database
2023-06-22 12:14:55 +02:00
Sarah Hoffmann
3a21999a17
move text normalization into extra function
2023-06-22 10:48:05 +02:00
Sarah Hoffmann
08dcd05d7b
Merge pull request #3093 from lonvia/remove-sanic
...
Remove support for Sanic
2023-06-22 09:55:32 +02:00
Marc Tobias
2337cc653b
check-database on frozen db shouldnt recommend indexing
2023-06-21 17:47:57 +02:00
Sarah Hoffmann
0deb9262c9
use in operator for enum tests
...
Fixes a complaint by mypy.
2023-06-21 15:30:40 +02:00
Sarah Hoffmann
9bc5be837b
remove useless check
...
Found by new mypy version.
2023-06-21 11:56:39 +02:00
Sarah Hoffmann
b79d5494f9
remove support for sanic framework
...
There is no performance gain over falcon or starlette but the special
structure of sanic makes it hard to have exchangable code
2023-06-21 10:53:57 +02:00
Sarah Hoffmann
ded2c5bf68
update project information for taginfo.json
2023-06-21 10:06:25 +02:00
Sarah Hoffmann
bd2c64876f
Merge pull request #3045 from biswajit-k/taginfo
...
Add script to generate taginfo project description
2023-06-21 10:01:40 +02:00
Sarah Hoffmann
7c66fef63f
Merge pull request #3091 from lonvia/fix-postcode-search
...
Assorted smaller fixes for Python-based search code
2023-06-20 16:13:20 +02:00
Sarah Hoffmann
4ad8818809
avoid fallback country lookup when places are excluded
2023-06-20 12:22:08 +02:00
Sarah Hoffmann
2f4342810d
allow empty parts in excluded_place_id
...
This worked before.
2023-06-20 11:56:43 +02:00
Sarah Hoffmann
36df56b093
fix header name for browser languages
2023-06-20 11:56:43 +02:00
Sarah Hoffmann
d0a1e8e311
tweak postcode search
...
Give a preference to left-right reading, i.e <postcode>,<address>
prefers a postcode search while <address>,<postcode> rather does
an address search.
Also exclude non-addressables, countries and state from results when a
postcode is contained in the query.
2023-06-20 11:56:43 +02:00
Sarah Hoffmann
1b50381852
use string representation when dumping variables
2023-06-20 10:15:51 +02:00
Sarah Hoffmann
3443d2c129
fix debug output for searches
...
Fields have been renamed.
2023-06-20 10:12:19 +02:00
Sarah Hoffmann
1f83efa8f2
Merge pull request #3086 from lonvia/close-connection-on-replication
...
Close database connections while waiting for the next update cycle
2023-06-19 15:48:00 +02:00
Sarah Hoffmann
a7bd39b62a
Merge pull request #3087 from lonvia/conditional-spgist
...
Disable SPGist for PostgreSQL < 11
2023-06-19 15:47:37 +02:00
Sarah Hoffmann
1177b30a60
Merge pull request #3085 from lonvia/allow-brackets-in-password
...
Do not fail php script generation when curly braces are present
2023-06-19 14:44:22 +02:00
Sarah Hoffmann
10e56e0de7
no longer recommend continuous update mode
2023-06-19 12:07:09 +02:00
Sarah Hoffmann
6f3339cc49
close DB connection when waiting for next update cycle
2023-06-19 12:02:51 +02:00
Sarah Hoffmann
771be0e056
do not fail php script generation when curly braces are present
...
Fixes #3084 .
2023-06-19 11:23:30 +02:00
Sarah Hoffmann
71ad4fc406
Add custom config to information required for bug reports
2023-06-18 09:27:55 +02:00
Sarah Hoffmann
6a5695d059
disable SPGist for PostgreSQL < 11
...
Before that version, an operator needed to be given.
2023-06-13 15:15:43 +02:00
Sarah Hoffmann
aaf0e7db06
add instructions for switching to user for install scripts
...
Fixes #3057 .
2023-06-13 14:12:56 +02:00
Sarah Hoffmann
7aa0aba382
remove Ubuntu 18 installation from TOC
...
Fixes #3072 .
2023-06-13 14:05:54 +02:00
Sarah Hoffmann
9af190a43c
Merge pull request #3073 from mtmail/vagrantfile-remove-ubuntu-18
...
Vagrantfile - remove Ubuntu 18
2023-06-13 12:31:10 +02:00
marc tobias
2e46bc0aea
Vagrantfile - remove Ubuntu 18
2023-05-30 00:22:18 +02:00
Sarah Hoffmann
a413aae8a3
Merge pull request #3067 from lonvia/python-search-api
...
Python implementation of Search API
2023-05-27 08:56:06 +02:00
Sarah Hoffmann
317cc5c544
make code backwards-compatible with older Python versions
2023-05-26 23:33:35 +02:00
Sarah Hoffmann
41bf162306
remove tests for old PHP cli commands
2023-05-26 17:36:05 +02:00
Sarah Hoffmann
43c27dffd2
fix new linting warning
2023-05-26 16:31:43 +02:00
Sarah Hoffmann
8f299838f7
fix various failing BDD tests
2023-05-26 15:08:48 +02:00
Sarah Hoffmann
146a0b29c0
add support for search by houenumber
2023-05-26 14:10:57 +02:00
Sarah Hoffmann
964bc7fbe0
ignore name rankings without variants
2023-05-26 13:53:34 +02:00
Sarah Hoffmann
75aa3cc9bd
properly close connections when shutting down starlette
2023-05-26 13:53:34 +02:00
Sarah Hoffmann
0843fefad3
fix geocodejson address assignment
...
The categories should be assigned the address part with the
highest address rank not lowest.
2023-05-26 11:43:11 +02:00
Sarah Hoffmann
371a780ef4
add server fronting for search endpoint
...
This also implements some of the quirks of free-text search of the
V1 API, in particular, search for categories and coordinates.
2023-05-26 11:40:45 +02:00
Sarah Hoffmann
c7db69a30c
add timestamps to HTML debug output
2023-05-26 09:05:44 +02:00
Sarah Hoffmann
b48cda7173
mingle names from linked places into results
2023-05-24 23:17:15 +02:00
Sarah Hoffmann
0608cf1476
switch CLI search command to python implementation
2023-05-24 22:54:54 +02:00
Sarah Hoffmann
f335e78d1e
make localisation of results explicit
...
Localisation was previously done as part of the formatting but might
also be useful on its own when working with the results directly.
2023-05-24 18:12:34 +02:00
Sarah Hoffmann
dcfb228c9a
add API functions for search functions
...
Search is now split into three functions: for free-text search,
for structured search and for search by category. Note that the
free-text search does not have as many hidden features like
coordinate search. Use the search parameters for that.
2023-05-24 18:05:43 +02:00
Sarah Hoffmann
dc99bbb0af
implement actual database searches
2023-05-24 13:52:31 +02:00
Sarah Hoffmann
c42273a4db
implement search builder
2023-05-23 11:23:44 +02:00
Sarah Hoffmann
3bf489cd7c
implement token assignment
2023-05-22 15:49:03 +02:00
Sarah Hoffmann
d8240f9ee4
add query analyser for legacy tokenizer
2023-05-22 11:07:14 +02:00
Sarah Hoffmann
2448cf2a14
add factory for query analyzer
2023-05-22 09:23:19 +02:00
Sarah Hoffmann
004883bdb1
query analyzer for ICU tokenizer
2023-05-22 08:46:19 +02:00
biswajit-k
11a1191ba0
add ci-test for taginfo file generation
2023-05-21 23:49:04 +05:30
Sarah Hoffmann
ff66595f7a
add data structure for tokenized query
2023-05-21 09:30:57 +02:00
biswajit-k
9de2a342e8
docs: add installation instruction for dkjson package
2023-05-19 23:22:42 +05:30
biswajit-k
562f8bc84a
Add script to generate taginfo project description
2023-05-19 18:02:06 +05:30
Sarah Hoffmann
d69411f414
Merge pull request #3064 from lonvia/clicmd-debug-output
...
Enable debug output on command line
2023-05-19 08:55:26 +02:00
Sarah Hoffmann
39ccb15880
enable debug output on command line
2023-05-18 22:37:46 +02:00
Sarah Hoffmann
d2c56f9f96
Merge pull request #3063 from lonvia/variable-parameters
...
Rework how search parameters are handed to the Python API
2023-05-18 22:27:18 +02:00
Sarah Hoffmann
7f1a0ce94a
fix use of subquery in reverse
2023-05-18 20:27:07 +02:00
Sarah Hoffmann
32dbf83747
move zoom_to_rank computation to extra file
2023-05-18 18:29:41 +02:00
Sarah Hoffmann
d9d8b9c526
add tests for parameter converter
2023-05-18 18:09:07 +02:00
Sarah Hoffmann
9036bf3398
Merge pull request #3062 from lonvia/enable-psycopg
...
Add support for psycopg 3 in the frontend
2023-05-18 18:07:11 +02:00
Sarah Hoffmann
bef5cea48e
switch API parameters to keyword arguments
...
This switches the input parameters for API calls to a generic
keyword argument catch-all which is then loaded into a dataclass
where the parameters are checked and forwarded to internal
function.
The dataclass gives more flexibility with the parameters and makes
it easier to reuse common parameters for the different API calls.
2023-05-18 17:42:23 +02:00
Sarah Hoffmann
84abf7c95a
actions: run tests against psycopg
2023-05-18 16:08:32 +02:00
Sarah Hoffmann
1f0e1bec0e
enable API use with psycopg 3
2023-05-18 16:08:32 +02:00
Sarah Hoffmann
8f88613a6b
Merge pull request #3050 from mtmail/tiger-check-if-database-frozen
...
when adding Tiger data, check first if database is in frozen state
2023-05-08 16:35:31 +02:00
Marc Tobias
e5f332bd71
when adding Tiger data, check first if database is in frozen state
2023-05-08 14:35:30 +02:00
Sarah Hoffmann
07589cfc34
Merge pull request #3054 from lonvia/add-amenity-to-documentation
...
Docs: reintroduce amenity parameter for structured search
2023-05-08 11:12:17 +02:00
Sarah Hoffmann
68e0306e62
docs: reintroduce amenity parameter for structured search
2023-05-08 10:24:12 +02:00
Sarah Hoffmann
5751686fdc
Merge pull request #3006 from biswajit-k/generalize-filter
...
generalize filter function for sanitizers
2023-04-11 19:20:08 +02:00
Sarah Hoffmann
2af20f8df8
Merge pull request #3030 from lonvia/interpolation-corner-cases
...
Fix a number of corner cases with interpolation splitting
2023-04-07 13:59:52 +02:00
Sarah Hoffmann
60c1301fca
fix a number of corner cases with interpolation splitting
...
Snapping a line to a point before splitting was meant to ensure
that the split point is really on the line. However, ST_Snap() does
not always behave well for this case. It may shorten the interpolation
line in some cases with the result that two points housenumbers
suddenly fall on the same point. It might also shorten the line down
to a single point which then makes ST_Split() crash.
Switch to a combination of ST_LineLocatePoint and ST_LineSubString
instead, which guarantees to keep the original geometry. Explicitly
handle the corner cases, where the split point falls on the beginning
or end of the line.
2023-04-06 16:54:00 +02:00
Sarah Hoffmann
b8a7319212
use place_to_be_deleted when force deleting objects
2023-04-04 11:09:17 +02:00
Sarah Hoffmann
6ef4d04b46
Merge pull request #3023 from lonvia/lookup-api
...
Python implementation of Lookup API
2023-04-03 16:20:47 +02:00
Sarah Hoffmann
1dce2b98b4
switch CLI lookup command to Python implementation
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
86c4897c9b
add lookup call to server glue
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
2237603677
add tests for new lookup API
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
6e81596609
rename lookup() API to details and add lookup call
...
The initial plan to serve /details and /lookup endpoints from
the same API call turned out to be impractical, so the API now
also has deparate functions for both.
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
4607c7ed04
python lookup: add function for simple lookups
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
63638eb447
python lookup: factor out finding in tables into own function
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
c92ac84679
Merge pull request #3021 from lonvia/readd-postalcode-relations
...
Flex style: reinstate postalcode relations
2023-04-03 12:11:49 +02:00
Sarah Hoffmann
ed9cd9f0e5
bdd: disable detail tests searching by place ID
...
Place IDs are not stable and cannot be used in tests.
2023-04-03 10:07:06 +02:00
Sarah Hoffmann
7d30dbebc5
flex style: reinstate postcode boundaries
...
Postcode boundaries don't have a name, so need to be imported
unconditionally.
2023-04-03 09:17:50 +02:00
biswajit-k
8f03c80ce8
generalize filter for sanitizers
2023-04-01 19:24:09 +05:30
Sarah Hoffmann
ee0366af88
Merge pull request #3019 from lonvia/add-data-postprocessing
...
Add postprocessing to add-data function
2023-03-31 22:19:46 +02:00
Sarah Hoffmann
683a3cb3ec
call osm2pgsql postprocessing flush_deleted_places() when adding data
2023-03-31 18:05:07 +02:00
Sarah Hoffmann
f8bca4fbcb
Merge pull request #3020 from lonvia/reverse-api
...
Python implementation of reverse
2023-03-31 18:01:50 +02:00
Sarah Hoffmann
1e2a1d9ce5
limit results for country lookup
2023-03-30 10:00:19 +02:00
Sarah Hoffmann
1feac2069b
add BDD tests for new layers parameter
2023-03-30 09:54:55 +02:00
Sarah Hoffmann
26ee6b6dde
python reverse: add support for point geometries in interpolations
2023-03-29 17:21:33 +02:00
Sarah Hoffmann
c150ca4889
add wsgi entry point for falcon server
2023-03-28 15:05:52 +02:00
Sarah Hoffmann
e717e349d0
add wsgi entry point for starlette
...
uvicorn needs a parameter-free function to start.
2023-03-28 15:03:00 +02:00
Sarah Hoffmann
e158017086
ignore broken data in interpolation table
2023-03-28 14:57:39 +02:00
Sarah Hoffmann
36d068871d
disable prepared statements
...
Prepared statements do not work well with the partial indexes that
Nominatim uses because all Python constants are replaced with
parameters. A query like:
placex.select().where(placex.c.rank_address.between(4, 25)
gets translated into a prepared query with two parameters:
SELECT * FROM placex WHERE rank_address BETWEEN %s and %s
And this does not work with a partial index of:
CREATE INDEX on placex(geometry) WHERE rank_address between 4 and 25
2023-03-28 14:53:45 +02:00
Sarah Hoffmann
6c67a4b500
switch reverse CLI command to Python implementation
2023-03-26 18:09:33 +02:00
Sarah Hoffmann
86b43dc605
make sure PHP and Python reverse code does the same
...
The only allowable difference is precision of coordinates. Python uses
a precision of 7 digits where possible, which corresponds to the
precision of OSM data.
Also fixes some smaller bugs found by the BDD tests.
2023-03-26 16:21:43 +02:00
Sarah Hoffmann
300921a93e
add server glue for reverse API call
2023-03-25 17:04:02 +01:00
Sarah Hoffmann
35b52c4656
add output formatters for ReverseResults
...
These formatters are written in a way that they can be reused for
search results later.
2023-03-25 15:45:03 +01:00
Sarah Hoffmann
878302a622
ignore NotImplementedErrors when compiling SQL
2023-03-24 11:16:02 +01:00
Sarah Hoffmann
55277738d4
factor out layer checks in reverse function
2023-03-24 10:08:01 +01:00
Sarah Hoffmann
2f54732500
python: implement reverse lookup function
...
The implementation follows for most part the PHP code but introduces an
additional layer parameter with which the kind of places to be returned
can be restricted. This replaces the hard-coded exclusion lists.
2023-03-23 22:38:37 +01:00
Sarah Hoffmann
41da298b18
add python implementation of reverse
...
This adds an additional layer parameter and slightly changes the
queries to do more efficient lookups for large area features.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
ebcf8c2b6b
api: make details parameter optional
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
1facfd019b
api: generalize error handling
...
Return a consistent error response which takes into account the chosen
content type. Also adds tests for V1 server glue.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
00e3a752c9
split SearchResult type
...
Use adapted types for the different result types. This makes it
easier to have adapted output formatting and means there are only
result fields that are filled.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
d03fd3f883
Merge pull request #3013 from mtmail/changelog-4-2-x
...
update ChangeLog to verison 4.2.2
2023-03-23 09:20:25 +01:00
marc tobias
fa3d13ac7e
update ChangeLog to verison 4.2.2
2023-03-22 23:45:59 +01:00
Sarah Hoffmann
434bd5a5bb
Merge pull request #3011 from lonvia/fix-flex-scripts
...
Fix extra tag handling in some flex scripts
2023-03-21 09:58:53 +01:00
Sarah Hoffmann
9aca389bda
Merge pull request #3010 from lonvia/adapt-zoom-for-reverse
...
Minor adjustments to reverse zoom translation
2023-03-21 08:56:25 +01:00
Sarah Hoffmann
69ce42b22c
remove more tags from full style
...
The full style should only save the necessary tags needed for
processing.
2023-03-20 21:42:24 +01:00
Sarah Hoffmann
114cc776be
fix handling of unused extra tags
...
The tags can only be moved to extra tags after the main tags have been
handled.
2023-03-20 21:20:27 +01:00
Sarah Hoffmann
5e5cff897f
minor adjustment to reverse zoom translation
...
Add a 'village' zoom level at 13 between town and neighbourhood
and a all locality-like objects for zoom 15. These zoom levels had
the same behaviour as the lower level so far. However, the distinction
for village and locality may be useful at times.
2023-03-20 20:47:42 +01:00
Sarah Hoffmann
a8bedb6ab9
Merge pull request #3003 from lonvia/rework-bdd-api-tests
...
Reorganize code around BDD API tests and extend reverse API tests
2023-03-10 10:01:24 +01:00
Sarah Hoffmann
81430bd3bd
bdd: be more fuzzy with coordinate comparisons
2023-03-09 22:37:45 +01:00
Sarah Hoffmann
93203f355a
avoid recent Python dialect
2023-03-09 20:57:43 +01:00
Sarah Hoffmann
b730d286ad
fix polygon simplification in reverse results
...
polygon_threshold has never really worked for reverse.
2023-03-09 20:24:07 +01:00
Sarah Hoffmann
3f2296e3ea
bdd: extend reverse API tests for format checks
...
Reorganise the API reverse tests and extend the checks for the
output format, testing for all expected fields.
2023-03-09 20:20:50 +01:00
Sarah Hoffmann
2b7eb4906a
bdd: add tests for valid debug output
2023-03-09 20:10:51 +01:00
Sarah Hoffmann
db1aa4d02e
bdd: replace old formatting strings
2023-03-09 19:49:55 +01:00
Sarah Hoffmann
ad88d7a3e0
bdd: more format checks for reverse XML
2023-03-09 19:40:24 +01:00
Sarah Hoffmann
e42c1c9c7a
bdd: new step variant 'result contains in field'
...
This replaces the + notation for recursing into result dictionaries.
2023-03-09 19:31:21 +01:00
Sarah Hoffmann
556bb2386d
bdd: factor out computation of result to-check lists
2023-03-09 18:01:45 +01:00
Sarah Hoffmann
1e58cef174
bdd: replace property_list construct with standard check functions
2023-03-09 17:56:28 +01:00
Sarah Hoffmann
01010e443f
bdd: remove special case for osm_type field
...
The fuzzy field check hide cover formatting errors. Use 'osm' when
only caring about the conent.
2023-03-09 17:44:34 +01:00
Sarah Hoffmann
da0a7a765e
bdd: reorganise field comparisons
...
Move comparision on Field values from assert_field() into a
comparator class. Replace BadRowValueAssert with a simpler
check_row() function.
2023-03-09 17:05:05 +01:00
Sarah Hoffmann
9769a0dcdb
bdd: use new check_for_attributes() function also in steps
2023-03-09 16:44:07 +01:00
Sarah Hoffmann
fbff4fa218
bdd: fully check correctness of geojson and geocodejson
...
Parse code now checks presence of all required fields and exports
all fields for inspection.
2023-03-09 16:36:46 +01:00
Sarah Hoffmann
d17ec56e54
bdd: remove OrderedDict
...
dicts are guaranteed to keep insertion order by since Python 3.7, making
use of ORderedDict mute.
2023-03-09 16:08:39 +01:00
Sarah Hoffmann
9a5f75dba7
Merge pull request #2993 from biswajit-k/delete-tags
...
Adds sanitizer for preventing certain tags to enter search index based on parameters
2023-03-09 14:31:45 +01:00
biswajit-k
ca149fb796
Adds sanitizer for preventing certain tags to enter search index based on parameters
...
fix: pylint error
added docs for delete tags sanitizer
fixed typos in docs and code comments
fix: python typechecking error
fixed rank address type
Revert "fixed typos in docs and code comments"
This reverts commit 6839eea755a87f557895f30524fb5c03dd983d60.
added default parameters and refactored code
added test for all parameters
2023-03-09 14:18:39 +05:30
Sarah Hoffmann
08f19e074b
Merge pull request #2999 from biswajit-k/fix-typos
...
fixed typos in docs and code comments
2023-03-08 08:55:27 +01:00
biswajit-k
36388cafe9
fixed typos in docs and code comments
2023-03-06 17:09:38 +05:30
Sarah Hoffmann
8191c747b9
add latest security incident
...
Also removes 3.6 which is no longer supported.
2023-02-22 11:24:04 +01:00
Sarah Hoffmann
d078763fa1
harmonize flags for PHP's htmlspecialchars
2023-02-20 16:46:53 +01:00
Sarah Hoffmann
412ead5f2d
adapt PHP tests for debug output
2023-02-20 16:23:28 +01:00
Sarah Hoffmann
513175ce23
properly encode special HTML characters in debug mode
2023-02-20 15:43:03 +01:00
Sarah Hoffmann
8db6dd995a
Merge pull request #2986 from mtmail/add-more-languages-from-osm-wiki
...
sp_wiki_loader: add more default languages
2023-02-20 11:12:08 +01:00
marc tobias
4be6970bd4
sp_wiki_loader: add more default languages
2023-02-18 13:54:48 +01:00
Sarah Hoffmann
fa681ce246
add timestamp to debug SQL output
2023-02-18 09:49:30 +01:00
Sarah Hoffmann
dd5cd97713
add warning for reverse index migration
2023-02-18 09:43:37 +01:00
Sarah Hoffmann
89d47d26f0
Merge pull request #2985 from lonvia/fix-place-rank-inheritance
...
Restrict place rank inheritance to address items
2023-02-18 09:35:19 +01:00
Sarah Hoffmann
d574ceb598
restrict place rank inheritance to address items
...
Place tags must have no influence on street- or POI-level
objects.
2023-02-17 16:25:26 +01:00
Sarah Hoffmann
92e2f5ca8e
Merge pull request #2983 from lonvia/improve-reverse-place-node-lookup
...
Improve reverse place node lookup
2023-02-17 15:51:55 +01:00
Sarah Hoffmann
f2bc792178
use reverse buffered index for search within country
2023-02-17 14:10:01 +01:00
Sarah Hoffmann
8ed096f938
speed up reverse lookup of place nodes
...
Add a special index that contains the place nodes buffered by their
respective area according to their search rank. This replaces the
maximum area search for place nodes and reduces drastically the number
of place nodes that need to be retrieved.
2023-02-17 14:10:01 +01:00
Sarah Hoffmann
3405dbf90e
Merge pull request #2981 from lonvia/add-point-wkb-decoder
...
Python frontend: add a WKB decoder for the Point class
2023-02-17 08:40:14 +01:00
Sarah Hoffmann
ee0c5e24bb
add a WKB decoder for the Point class
...
This allows to return point geometries from the database and makes
the SQL a bit simpler.
2023-02-16 17:29:56 +01:00
Sarah Hoffmann
b320f1c7e3
Merge pull request #2978 from lonvia/add-debug-view
...
Add debug view to Python API
2023-02-14 14:08:42 +01:00
Sarah Hoffmann
6c6b1c0606
add typing information for pygments to requirements
2023-02-14 11:58:08 +01:00
Sarah Hoffmann
a5f5add630
actions: use token to avoid rate limiting
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
8557105c40
add debug output for unit tests
...
This uses the debug output facility meant for pretty HTML output
to give us debugging output for the unit tests.
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
24e7ffb289
add HTML-formatted debug output to lookup
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
0b9bcfe01d
Merge pull request #2974 from bloom256/main-tag-in-reverse-lookup
...
Main tag information added to geocodejson in reverse geocoding
2023-02-11 11:01:11 +01:00
Sarah Hoffmann
1a0e8f810b
Merge pull request #2975 from bloom256/typo-fix
...
typo fixed
2023-02-11 11:00:15 +01:00
danil
7698f0672d
typo fixed
2023-02-08 00:21:58 +04:00
danil
da064ea702
Main tag information added to geocodejson in reverse geocoding
2023-02-08 00:19:49 +04:00
Sarah Hoffmann
0c65289a80
Merge pull request #2970 from lonvia/add-details-endpoint
...
Python implementation of details endpoint
2023-02-06 16:32:35 +01:00
Sarah Hoffmann
95c90a785f
actions: force PHPUnit 9
...
PHPUnit 10 is incompatible with our tests. Not worth adapting anymore.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
42c3754dcd
add tests for details result formatting and trim results
...
Values that are None are no longer included in the output to save
a bit of bandwidth.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
b742200442
expand details BDD tests
...
There are now minor differences in the output between PHP and
Python versions, so introduce specific tests.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
3ac70f7cc2
implement details endpoint in Python servers
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
104722a56a
switch details cli command to new Python implementation
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
1924beeb20
add lookup of postcdoe data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
70f6f9a711
add lookup of tiger data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
f1ceefe9a6
add lookup of address interpolations
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
e1fc1566f3
fix new linting issues from pylint 2.16
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
189f74a40d
add unit tests for lookup function
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
370c9b38c0
improve scaffolding for API unit tests
...
Use the static table definition to create the test database.
Add helper function to simplify filling the tables.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
df65c10360
add lookup() call to the library API
...
Currently only looks places up in placex.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
4573389da7
docs: fix internal links
...
Fixes #2968 .
2023-02-04 21:21:23 +01:00
Sarah Hoffmann
5c55c1d8a1
Merge pull request #2963 from lonvia/add-sqlalchemy-schema
...
Add table definitions for SQLAlchemy
2023-01-30 11:17:22 +01:00
Sarah Hoffmann
a1d4e53eb8
add pytest-asyncio as a requirement for testing
2023-01-30 09:36:17 +01:00
Sarah Hoffmann
16b6484c65
add property cache for API
...
This caches results from querying nominatim_properties.
2023-01-30 09:36:17 +01:00
Sarah Hoffmann
2156fd4909
adapt annotations for SQLAlchemy 2.x
...
It is not possible to produce type annotations that work with both
versions 1.4 and 2.0. So keep to the principle of only supporting
newest versions when it comes to mypy. This means that some types
may have to be string quoted to not cause issues when running with
SQLAlchemy 1.4.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
7f5fbe1dc7
add new geoalchemy requirement
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
2e9090d121
adapt status to use SQLAlchemy tables
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
23f2690c54
convert StatusResult to a dataclass
...
This gives us nice str() functions.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
5226cd2a0b
add SQLAlchemy table schema for Nominatim tables
...
Also defines an extended connection object that includes access to
the table definitions. Makes it easier to access the tables from
code that has been split off into separate modules.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
c7e8a82d68
Merge pull request #2958 from lonvia/streaming-json-writer
...
Introduce streaming json writer for JSON output
2023-01-25 17:36:23 +01:00
Sarah Hoffmann
77bec1261e
add streaming json writer for JSON output
2023-01-25 15:05:33 +01:00
Sarah Hoffmann
dfcb24061e
Merge pull request #2957 from lonvia/reorganise-api-module
...
Assorted improvements to the new api library module
2023-01-25 09:29:31 +01:00
Sarah Hoffmann
f85b0c6208
allow to add php-compatible endpoints
...
If the new setting NOMINATIM_SERVE_LEGACY_URLS is set, the servers
expose the endpoints also with the .php suffix to ensure backwards
compatibility.
2023-01-24 21:39:19 +01:00
Sarah Hoffmann
e490a30a4a
add support for CORS headers
...
Adds the additional dependency to sanic-cors for the Sanic server.
2023-01-24 21:39:19 +01:00
Sarah Hoffmann
654b652530
factor out common server implementation code
...
Most of the server implementation of V1 API now resides in
api.v1.server_glue. The webframeworks only supply some glue code
which is independent to changes in the API code.
2023-01-24 21:39:19 +01:00
Sarah Hoffmann
8f4426fbc8
reorganize code around result formatting
...
Code is now organized by api version. So formatting has moved to
the api.v1 module. Instead of holding a separate ResultFormatter
object per result format, simply move the functions to the
formater collector and hand in the requested format as a parameter.
Thus reorganized, the api.v1 module can export three simple functions
for result formatting which in turn makes the code that uses
the formatters much simpler.
2023-01-24 17:20:51 +01:00
Sarah Hoffmann
32c1e59622
reorganize api submodule
...
Use a directory for the submodule where the __init__ file contains
the public API. This makes it easier to separate public interface
from the internal implementation.
2023-01-24 13:28:04 +01:00
Sarah Hoffmann
e56957f047
api: delay setup of initial database connection
...
Defer database setup until the first call to a function. Needs an
additional lock because the setup still needs to be done sequentially.
2023-01-24 10:56:22 +01:00
Sarah Hoffmann
3cc357bffa
Merge pull request #2955 from lonvia/fix-importance-refresh
...
Fix importance recalculation
2023-01-23 09:07:43 +01:00
Sarah Hoffmann
388faa2c54
Merge pull request #2954 from lonvia/remove-comma-as-separator
...
Remove comma as name separator
2023-01-23 09:06:23 +01:00
Sarah Hoffmann
ce9ed993c8
fix importance recalculation
...
The signature of the compute_importance() function has changed.
2023-01-22 22:32:16 +01:00
Sarah Hoffmann
929a13d4cd
remove comma as name separator
...
Commas are most of the time used as a part of a name, not to
separate multiple names.
See also #2950 .
2023-01-22 22:29:36 +01:00
Sarah Hoffmann
56f0d678e3
exclude names ending in :wikipedia from indexing
...
The wikipedia prefix is used for referencing a wikipedia article
for the given tag, not the object, so not useful to search.
2023-01-21 11:16:08 +01:00
Sarah Hoffmann
02645277c8
fix typo in argument to details CLI command
...
Fixes #2951 .
2023-01-21 10:44:10 +01:00
Sarah Hoffmann
5f4e98e0d9
update Makefile in test directory
2023-01-09 20:49:33 +01:00
Sarah Hoffmann
e9e14834bc
Merge pull request #2940 from lonvia/remove-ubuntu-18-from-actions
...
Actions: use Ubuntu 20 image for testing old versions of dependent software
2023-01-05 20:16:19 +01:00
Sarah Hoffmann
5a57d6308e
increase minimum required version of PHP to 7.3
...
Other versions are not tested anymore.
2023-01-05 16:58:46 +01:00
Sarah Hoffmann
cb73d562d5
actions: move tests from Ubuntu 18 to 20
...
These are the tests that try to make sure old library version really
still work as expected. Increases PHP to 7.3 because 7.2 has errors.
2023-01-05 16:55:32 +01:00
Sarah Hoffmann
6c61690ef3
do not run osm2pgsql append with mutliple threads
...
As the updates modify the placex table, there may be deadlocks
when different objects want to forward modifications to the same
place (for example because they are both linked to it).
2023-01-05 11:34:56 +01:00
Sarah Hoffmann
bf1f6a997c
Merge pull request #2937 from lonvia/python-server-stub
...
Scaffolding for new Python-based search frontend
2023-01-03 14:26:33 +01:00
Sarah Hoffmann
90b29aa808
Merge pull request #2856 from t-tomek/patch-1
...
Update DB.php
2023-01-03 10:58:50 +01:00
Sarah Hoffmann
31d0468cd2
no type checking on old Ubuntu 18
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
38f467bae3
add event handler for default connection settings
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
5c7c4bb9a8
update versions for Python packages
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
9646ec4edd
drop official support for Ubuntu 18
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
c665796c52
drop support for Python 3.6
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
a72e2ecb3f
update dependencies for Actions
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
0c47558729
convert version to named tuple
...
Also return the new NominatimVersion rather than a string in the
status result.
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
93b9288c30
fix error message for non-existing database
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
9d31a67116
add unit tests for new Python API
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
cf19036ce6
docs: extend dependency documentation
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
7219ee6532
extend BDD API tests to query via Python frameworks
...
A new config option ENGINE allows to choose between php and any of the
supported Python engines.
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
d7bc846c3c
fix liniting issues and add type annotations
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
1adb0a9886
add support for starlette framework
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
8aa01c9c8e
add support for falcon as server framework
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
23dabad0b0
add sanic development server implementation
2023-01-03 10:02:53 +01:00
Sarah Hoffmann
45c675bd78
implement command line status call in Python
2023-01-03 10:02:35 +01:00
Sarah Hoffmann
860c6ecbcc
Merge pull request #2936 from lonvia/fix-query-for-index-use
...
Split query that deletes old objects from placex
2023-01-03 09:56:03 +01:00
Sarah Hoffmann
3f38091421
split query that deletes old objects from placex
...
placex only has partial indexes over OSM types, so the OSM type
needs to be hardcoded to ensure these indexes are used.
2023-01-02 17:25:38 +01:00
Sarah Hoffmann
7704b3fc7b
Merge pull request #2932 from lonvia/rework-flex-framework
...
Switch to osm2pgsql flex output
2022-12-29 17:23:38 +01:00
t-tomek
151b3c4021
Update DB.php
2022-12-27 08:34:20 +01:00
Sarah Hoffmann
610af95ed1
remove old import styles
2022-12-23 19:29:07 +01:00
Sarah Hoffmann
018ef5bd53
bdd: recreate project directory for every run
2022-12-23 18:36:41 +01:00
Sarah Hoffmann
200eae3bc0
add tests for examples in lua style documentation
...
And fix all the errors the tests have found.
2022-12-23 17:35:28 +01:00
Sarah Hoffmann
9321e425a4
add documentation for flex style
...
Includes minor adaptions to bring the code in line with the
documentation.
2022-12-23 11:10:40 +01:00
Sarah Hoffmann
9395c0dadc
Merge pull request #2931 from mtmail/vagrant-md-use-dotenv
...
VAGRANT.md - replace local.php settings with .env
2022-12-22 10:20:15 +01:00
marc tobias
a40065878b
VAGRANT.md - replace local.php settings with .env
2022-12-22 03:12:30 +01:00
t-tomek
e8d3c0a99a
Update DB.php
2022-12-21 19:56:24 +01:00
t-tomek
2e6ff1b750
Update DB.php
2022-12-21 16:32:33 +01:00
t-tomek
15f9e397dd
Update DB.php
2022-12-21 16:31:39 +01:00
t-tomek
87a109d0e9
Update DB.php
2022-12-21 16:30:55 +01:00
Sarah Hoffmann
f3ffbe167d
use canonical url for nominatim.org
2022-12-20 16:55:47 +01:00
Sarah Hoffmann
89a34e7508
adapt tests for new lua styles
2022-12-19 17:32:28 +01:00
Sarah Hoffmann
f6fc750f08
install new lua import scripts
2022-12-19 17:27:40 +01:00
Sarah Hoffmann
c32f686c62
switch to osm2pgsql flex style by default
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
2ca83efc36
flez: add other default styles
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
06796745ff
flex: hide compiled matchers
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
093d531509
flex: switch to functions for substyles
...
This gives us a bit more flexibility about the implementation
in the future.
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
a915815e4d
explicit export for functions in flex-base
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
de3c28104c
flex: add combining clean function
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
d9d13a6204
flex: simplify name handling
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
d1f5820711
flex: simplify address configuration
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
7592f8f189
update osm2pgsql (flex not building index)
2022-12-18 10:10:58 +01:00
Sarah Hoffmann
ffbb61713a
Merge pull request #2927 from lonvia/remove-forward-dependencies
...
Remove shortcut disabling forward dependencies
2022-12-17 15:59:09 +01:00
Sarah Hoffmann
6f51c1ba33
remove code that disables processing of forward dependencies
2022-12-11 19:35:58 +01:00
Sarah Hoffmann
cd861345b7
Merge pull request #2921 from lonvia/case-insensitive-utf8
...
Use grapheme_stripos instead of stripos in PHP code
2022-12-11 15:57:01 +01:00
Sarah Hoffmann
823502a40a
use grapheme_stripos instead of stripos in PHP code
...
The stripos() does not handle non-ASCII correctly.
2022-12-11 13:55:27 +01:00
Sarah Hoffmann
4efad0bb95
Merge pull request #2920 from lonvia/no-postcode-for-rivers
...
Do not assign postcodes to long linear features
2022-12-10 17:30:32 +01:00
Sarah Hoffmann
922352e215
do not assign postcodes to long linear features
...
This avoids a postcode in particular for waterway features and
long natural featues like ridges and valleys.
Fixes #2915 .
2022-12-10 14:53:08 +01:00
Frederik Ramm
8a0b2dc0be
Fix typo in NOMINATIM_LOG_FILE ( #2919 )
...
* fix typo in docs (NOMINATIM_LOG_FILE uses s not ms)
2022-12-08 17:34:54 +01:00
Sarah Hoffmann
7eced34e20
Merge pull request #2916 from lonvia/faq-postcodes
...
Add FAQ about finding bad postcodes
2022-12-08 08:42:10 +01:00
Sarah Hoffmann
64d00c1c8e
add FAQ about finding bad postcodes
2022-12-07 21:38:53 +01:00
Sarah Hoffmann
6d48798d45
Merge pull request #2913 from lonvia/remove-duplicate-spaces-in-transliteration
...
contract duplicate spaces in transliteration string
2022-12-02 19:43:07 +01:00
Sarah Hoffmann
0e186835b9
contract duplicate spaces in transliteration string
...
There are some pathological cases where an isolated letter may
be deleted because it is in itself meaningless. If this happens in
the middle of a sentence, then the transliteration contains two
consecutive spaces. Add a final rule to fix this.
See #2909 .
2022-12-02 10:15:02 +01:00
Sarah Hoffmann
b607eb9678
Merge pull request #2908 from n-timofeev/update-vagrantfile
...
Update Vagrantfile
2022-11-29 10:33:16 +01:00
n-timofeev
85a68f1e56
Update Vagrantfile
2022-11-29 11:12:10 +03:00
Sarah Hoffmann
45d13bc295
Merge pull request #2906 from lonvia/move-data-dirs-into-module
...
Reorganize how Nominatim finds its extra data and libraries
2022-11-28 08:44:29 +01:00
Sarah Hoffmann
2231401483
clean up uses of cli.nominatim()
...
They should not hand in data paths anymore.
2022-11-27 15:27:04 +01:00
Sarah Hoffmann
2abe9e6fd9
use data paths from new nominatim.paths
2022-11-27 12:15:41 +01:00
Sarah Hoffmann
20f56dfc77
introduce paths module which contains the data paths
...
This means that nominatim can find its data even when not called
from the command line tool.
2022-11-27 12:02:37 +01:00
Sarah Hoffmann
67664406da
Merge pull request #2905 from lonvia/remove-nominatim-tool-var
...
Remove NOMINATIM_NOMINATIM_TOOL variable
2022-11-26 20:24:58 +01:00
Sarah Hoffmann
0ed60d29cb
remove NOMINATIM_NOMINATIM_TOOL variable
...
This was used by the old PHP scripts to call the Python tool.
With the scripts now gone, the variable can be removed.
2022-11-26 16:40:20 +01:00
Sarah Hoffmann
04ee39467a
actions: install keys for postgres repo
2022-11-24 14:04:05 +01:00
Sarah Hoffmann
1f3edf6eba
prepare release 4.2.0
2022-11-24 10:43:29 +01:00
Sarah Hoffmann
a15c197547
add checklist for releases
2022-11-24 10:43:25 +01:00
Sarah Hoffmann
13dbeb75c7
Merge pull request #2903 from lonvia/migration-for-index-reorganization
...
Add migration for reorganization of pending indexes
2022-11-24 10:13:38 +01:00
Sarah Hoffmann
6aded60045
add migration for reorganization of pending indexes
...
Fixes #2900 .
2022-11-24 08:48:05 +01:00
Sarah Hoffmann
8dfdf64dd5
Merge pull request #2902 from lonvia/tiger-county-sanitizer
...
Tiger county sanitizer
2022-11-23 17:58:42 +01:00
Sarah Hoffmann
41e8bddaa9
remove BDD test for tiger:county
...
We no longer rely on the import to strip the tag.
2022-11-23 10:37:27 +01:00
Sarah Hoffmann
fd3dec8efe
add sanitizer for TIGER tags
...
Currently only takes over cleaning the tiger:county data. This was
done by the import until now.
2022-11-23 10:37:27 +01:00
Sarah Hoffmann
55ee08f42b
Merge pull request #2892 from lonvia/optional-forward-dependecies
...
Add experimental configuration switch for enabling forward dependencies
2022-11-21 16:57:45 +01:00
Sarah Hoffmann
b6ff697ff0
add experimental option for enabling forward dependencies
2022-11-21 14:48:00 +01:00
Sarah Hoffmann
925ac1e1b9
Merge pull request #2890 from lonvia/use-rank-search-for-reverse-polygon-match
...
Use rank search for reverse polygon match
2022-11-20 22:11:35 +01:00
Sarah Hoffmann
77acc1c2be
force use of geometry index for reverse polygon lookup
2022-11-20 20:22:44 +01:00
Sarah Hoffmann
ebe489c227
use rank_search for reverse polygon match
2022-11-20 20:22:23 +01:00
Sarah Hoffmann
9c152a030a
fix condition under which place_to_be_deleted is created
...
It is needed for updates, independently if reverse-only is set.
2022-11-19 21:53:14 +01:00
Sarah Hoffmann
b310c86c55
Merge pull request #2889 from lonvia/fix-interpolation-updates
...
Drop illegal values for addr:interpolation on update
2022-11-18 18:51:11 +01:00
Sarah Hoffmann
c9ff7d2130
drop illegal values for addr:interpolation on update
2022-11-18 17:26:56 +01:00
Sarah Hoffmann
52456230cc
Merge pull request #2887 from lonvia/lookup-linked-places
...
Add support for lookup of linked places
2022-11-17 13:35:53 +01:00
Sarah Hoffmann
4422533adb
Merge pull request #2886 from lonvia/closest-street-in-associated
...
Handle associatedStreet relations with multiple streets correctly
2022-11-17 07:29:25 +01:00
Sarah Hoffmann
c4b13f2b7f
add support for lookup of linked places
2022-11-16 21:34:45 +01:00
Sarah Hoffmann
4f05a03d13
handle associatedStreet relations with multiple streets
...
When a associatedStreet relation has multiple street members
always take the closest one. Avoid geometry operations for
the frequent case that there is only one street.
2022-11-16 17:25:51 +01:00
Sarah Hoffmann
7a2e586cce
Merge pull request #2884 from lonvia/tweak-special-term-penalties
...
Correctly handle special term + name combination
2022-11-15 19:29:55 +01:00
Sarah Hoffmann
98ce424650
Merge pull request #2885 from lonvia/remove-unused-countries
...
Remove dependent territories from country list
2022-11-15 19:29:39 +01:00
Sarah Hoffmann
3059a3da4e
correctly handle special term + name combination
...
Special terms with operator name usually appear in combination with the
name. The current penalties only took name + special term into account
not special term + name.
Fixes #2876 .
2022-11-15 11:55:40 +01:00
Sarah Hoffmann
d63d7cb9a8
remove dependent territories from country list
...
Removes territories of US, France, Australia and Netherlands from the
country list. These territories have their own country code (which is
why they are in the list in the first place) but are mapped as part of
the admin_level 2 relations for the respective parent countries.
Therefore they never had any places attached. In practical terms, the
change only affects the number of tables created.
2022-11-15 11:37:30 +01:00
Sarah Hoffmann
f3f542e864
Merge pull request #2881 from lonvia/more-update-tests-for-osm2pgsql
...
Experimental support for osm2pgsql flex output
2022-11-15 09:39:46 +01:00
Sarah Hoffmann
93ada250f7
bdd: add tests for osm2pgsql update of postcode nodes
2022-11-14 17:27:04 +01:00
Sarah Hoffmann
d8e3ba3b54
bdd: add osm2pgsql tests for updating interpolations
2022-11-14 16:57:31 +01:00
Sarah Hoffmann
a46348da38
bdd: test placex content when updating with osm2pgsql
2022-11-14 14:48:44 +01:00
Sarah Hoffmann
36cf0eb922
reorganize handling of place type changes
...
Always replace existing entries in place, never delete them because
a direct delete will cause conflicts.
2022-11-14 13:57:26 +01:00
Sarah Hoffmann
63a9bc94f7
fix country handling in flex style
...
If the country tag does not match a 2-letter code, it needs to
be dropped.
2022-11-10 15:52:13 +01:00
Sarah Hoffmann
2dafc4cf4f
remove tests that differ between lua and gazetteer versions
2022-11-10 15:51:55 +01:00
Sarah Hoffmann
68d09f9cad
node locations must be stable for osm2pgsql update tests
2022-11-10 11:11:45 +01:00
Sarah Hoffmann
b98d3d3f00
bdd: extend osm2pgsql update tests
...
Now also checks for correct indexing state of placex table.
2022-11-10 09:38:25 +01:00
Sarah Hoffmann
3683cf7ddc
optimise tag match function
2022-11-10 09:38:25 +01:00
Sarah Hoffmann
84e5e601e1
add lua requirements for vagrant scripts
2022-11-10 09:38:25 +01:00
Sarah Hoffmann
a1da149211
CI: require lua libraries
2022-11-10 09:38:25 +01:00
Sarah Hoffmann
74405e9684
add migration for place_to_be_deleted table
2022-11-10 09:38:25 +01:00
Sarah Hoffmann
2fac507453
change updates to handle delete/insert workflow
...
This makes Nominatim compatible with osm2pgsql's default update
modus operandi of deleting and reinserting data. Deletes are diverted
into a TODO table instead of executing them. When data is reinserted,
the corresponding entry in the TODO table is deleted. After updates are
finished, the remaining entries in the TODO table are executed, doing
the same work as the delete trigger did before.
The new behaviour also works against the gazetteer output with its
insert-only mechanism.
2022-11-10 09:38:23 +01:00
Sarah Hoffmann
51ed55cc32
initial flex import scripts
...
Only implements the extratags style for the moment. Tests pass
for the same behaviour as the gazetteer output. Updates still need
to be done.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
de2a3bd5f8
bdd tests: make import style configurable
...
The switch is for development. Tests are not guaranteed to still
work when run with anything but the 'extratags' style.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
981e9700be
add osm2pgsql gazetteer tests
...
This ports the gazetteer tests from osm2pgsql to BDD tests.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
b52ce4f9f2
Merge pull request #2869 from mtmail/improve-tiger-install-doc
...
Tiger install doc: add -refresh website- step
2022-11-09 20:48:39 +01:00
Sarah Hoffmann
64c591da7f
fix type issues with calls to pyosmium
2022-11-09 20:46:33 +01:00
Marc Tobias
2387648a85
Tiger install doc: add -refresh website- step
2022-11-09 17:33:31 +01:00
Sarah Hoffmann
846ecff0c5
Merge pull request #2871 from lonvia/fix-timeout-for-updates
...
Fix timeout for updates
2022-11-09 14:26:39 +01:00
Sarah Hoffmann
26a5b59c28
add types-requests dependency
2022-11-09 09:12:37 +01:00
Sarah Hoffmann
6ddb39fda3
respect socket timeout also in other replication functions
2022-11-09 09:12:37 +01:00
Sarah Hoffmann
1fdcec985a
fix timeout use for replication timeout
...
The timeout parameter is no longer taken into account since
pyosmium switched to the requests library. This adds the parameter
back.
2022-11-09 09:12:37 +01:00
Sarah Hoffmann
30f526c943
Merge pull request #2870 from mtmail/update-github-actions-to-node-16
...
update those github action packages still using node12
2022-11-08 17:24:53 +01:00
Marc Tobias
253127cb9f
update those github action packages still using node12
2022-11-08 15:16:55 +01:00
Sarah Hoffmann
3237ca587f
Merge pull request #2866 from lonvia/reverse-ignore-interpolations-without-parent
...
Ignore interpolations without parent on reverse search
2022-11-07 09:00:59 +01:00
Sarah Hoffmann
0dbc0ae6d5
ignore interpolations without parent on reverse search
...
If no parent can be found for an interpolation, there is most
likely a data error involved. So don' t show these interpolations
in reverse search results.
2022-11-05 22:16:09 +01:00
Sarah Hoffmann
7461ff4680
Merge pull request #2865 from Romeo-PHILLIPS/fix/documentation_status_code
...
Fix: documentation status code
2022-11-05 22:14:44 +01:00
Romeo
afc714e1d3
fix: format
2022-11-04 18:05:40 +01:00
Romeo
3bc0db8d91
fix: markup
2022-11-04 18:04:28 +01:00
Romeo
d573da5b2c
fix: 705 Status Code Documentation
2022-11-04 18:03:49 +01:00
Romeo
ecd5a3fdf9
fix: 705 Status Code Documenation
2022-11-04 17:59:36 +01:00
Sarah Hoffmann
543d63e7a9
Merge pull request #2862 from mtmail/remove-version-from-fpm-sock-file
...
Install scripts: remove version from /var/run/php-fpm filenames
2022-11-04 17:32:50 +01:00
Sarah Hoffmann
7a22ae6bf9
Merge pull request #2863 from lonvia/add-support-for-postgresql-15
...
Update CI tests to postgresql 15
2022-11-04 17:32:06 +01:00
Sarah Hoffmann
ebe23d6882
update CI tests to postgresql 15
2022-11-04 16:21:15 +01:00
marc tobias
33c805aee0
Install scripts: remove version from /var/run/php-fpm filenames
2022-11-04 14:22:11 +01:00
t-tomek
244b6fcef6
Update DB.php
...
Use SET instead of UPDATE queries to support read only databases
2022-11-02 14:11:52 +01:00
Sarah Hoffmann
616ff4ae25
actions: pin pyicu to 2.9
2022-10-24 14:21:44 +02:00
Sarah Hoffmann
e221eaa977
Merge pull request #2836 from mtmail/tiger2022
...
Documentation: remove year from TIGER filename, new 2022 data
2022-10-24 11:21:55 +02:00
Sarah Hoffmann
eed7abb839
Merge pull request #2838 from lonvia/update-osm2pgsql
...
Update osm2pgsql to latest 1.7.1 release
2022-10-05 18:59:13 +02:00
Sarah Hoffmann
5f6dcd36ed
fix flaky API test
...
The search 'landstr' produces many duplicates so that with
some bad luck 4 or less results may appear. Disable deduplication
to make it more predictable.
2022-10-05 15:16:14 +02:00
Sarah Hoffmann
f395054536
update osm2pgsql to 1.7.1
2022-10-04 21:16:57 +02:00
Sarah Hoffmann
afeafc8aa7
Merge pull request #2835 from lonvia/secondary-importance
...
Secondary importance
2022-10-04 16:25:47 +02:00
marc tobias
f1ece658f8
Documentation: remove year from TIGER filename
2022-10-04 14:19:36 +02:00
Sarah Hoffmann
b3abb355eb
docs: add customization hints for secondary importance
...
Removing the download links for now as the tile importance
is still too experimental.
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
5877b69d51
do not run unit test when postgis_raster is not available
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
5ec2c1b712
adapt unit tests to changed function names
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
0a73ed7d64
add secondary importance to API BDD tests
...
Also fixes a path issue during API test DB creation that could
never possibly have worked.
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
abf349fb0d
simplify use of secondary importance
...
The values in the raster are already normalized between 0 and 2**16,
so a simple conversion to [0, 1] will do.
Check for existance of secondary_importance table statically when
creating the SQL function. For that to work importance tables need
to be created before the functions.
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
3185fad918
load views as a SQL file and rename to 'secondary importance'
...
The only requirement for secondary importance is that a raster table
comes out of it. The generic name leaves open where the data comes
from.
2022-10-01 11:01:49 +02:00
Tareq Al-Ahdal
0ab0f0ea44
Integrated OSM views into importance computation
2022-10-01 11:01:49 +02:00
Tareq Al-Ahdal
ac467c7a2d
Enhanced the implementation of OSM views GeoTIFF import functionality
2022-10-01 11:01:49 +02:00
Tareq Al-Ahdal
c85b74497b
Initial implementation of GeoTIFF import functionality
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
3381a92d92
Merge pull request #2832 from lonvia/conditional-analyze-on-indexing
...
Only run analyze on indexing when work was done
2022-09-28 15:17:40 +02:00
Sarah Hoffmann
a2ee58d8a1
only run analyze on indexing when work was done
...
This speeds up processing when continuing indexing after it was
interrupted.
2022-09-28 10:22:54 +02:00
Sarah Hoffmann
051f3720ce
Merge pull request #2829 from lonvia/optimize-indexes
...
Further optimize indexes
2022-09-26 10:02:51 +02:00
Sarah Hoffmann
f017e1e9a1
make sure indexes are used
2022-09-25 14:09:45 +02:00
Sarah Hoffmann
33ba6896a8
further split up the big geometry index
...
Adds partial indexes for all geometry queries used during import.
A full index is not necessary anymore at that point. Still create
the index afterwards for use in queries.
Also adds documentation for all indexes on where they are used.
2022-09-21 16:21:41 +02:00
Sarah Hoffmann
f4d3ae6f70
consolidate indexes over geometry_sectors
...
The index over geometry_sectors are mainly used for ordering
the places which need indexing. That means they function effectively
as a TODO list. Consolodate them so that they always only contain
the places which are still to do. Also add the appropriate index
for the boundary indexing phase.
2022-09-21 10:38:58 +02:00
Sarah Hoffmann
860f3559a1
split up large osmid index on placex
...
This doesn't do anything in terms of lookup speeds but the resulting
indexes are quite a bit smaller.
2022-09-21 09:24:57 +02:00
Sarah Hoffmann
d8be8a7293
fix funding link
2022-09-19 15:39:58 +02:00
Sarah Hoffmann
9750a361c9
add Github Sponsering to funding page
2022-09-19 15:38:56 +02:00
Sarah Hoffmann
ed3dd81d04
run final index creation in parallel
2022-09-19 11:55:25 +02:00
Sarah Hoffmann
bef1aebf1c
add function for parallel execution of SQL scripts
2022-09-19 11:52:17 +02:00
Sarah Hoffmann
26688ba35d
add link to funding page
2022-09-19 10:30:58 +02:00
Sarah Hoffmann
a1158feeb8
Merge pull request #2818 from lonvia/better-geometry-index
...
Add index for lookup of addressable areas
2022-09-19 10:18:43 +02:00
Sarah Hoffmann
aef014a47d
add indexes for lookup of addressable areas
...
The generic geometry index has become to slow for that purpose.
2022-09-18 16:57:12 +02:00
Sarah Hoffmann
d6a0947e5a
update security policy for 4.1 version
2022-09-13 08:58:31 +02:00
Sarah Hoffmann
bc94318d83
mypy: fix new warnings due to external type updates
2022-09-05 17:39:35 +02:00
Sarah Hoffmann
d4c6e58b57
Merge pull request #2812 from mausch/patch-1
...
docs: fix links to rank docs
2022-09-05 17:27:09 +02:00
Mauricio Scheffer
66832cf0a5
docs: fix links to rank docs
2022-09-05 11:11:13 +01:00
Sarah Hoffmann
bcfe817212
Merge pull request #2799 from lonvia/fix-inclusions-with-extratags
...
Ignore irrelevant extra tags on address interpolations
2022-08-13 19:02:27 +02:00
Sarah Hoffmann
07d72f950b
Merge pull request #2739 from tareqpi/collect_os_info.sh
...
integration of host system information script into Nominatim CLI tool
2022-08-13 19:02:14 +02:00
Sarah Hoffmann
dddfa3a075
ignore irrelevant extra tags on address interpolations
...
When deciding if an address interpolation has address information, only
look for addr:street and addr:place. If they are not there go looking
for the address on the address nodes. Ignores irrelevant tags like
addr:inclusion.
Fixes #2797 .
2022-08-13 14:07:06 +02:00
Tareq Al-Ahdal
74019877a4
Added the feature of collecting host system information to the CI tests
2022-08-13 06:22:13 +08:00
Tareq Al-Ahdal
465d82a92f
Integrated 'collect_os_info.py' into Nominatim's CLI tool
2022-08-13 06:18:10 +08:00
Tareq Al-Ahdal
49f889bf09
Enhanced and refactored 'collect_os_info.py'
...
Changed the script to functional programming paradigm to remove the big number of local attributes to decrease memory usage when running it. Additional OS info are now included.
2022-08-13 06:13:05 +08:00
Tareq Al-Ahdal
5e477e3b5b
Merge remote-tracking branch 'upstream/master' into collect_os_info.sh
2022-08-13 05:53:39 +08:00
Sarah Hoffmann
67cfad6a2c
Merge pull request #2798 from lonvia/more-rank-change-fixes
...
Invalidations when boundaries and places change their rank
2022-08-12 11:42:03 +02:00
Sarah Hoffmann
487e81fe3c
more invalidations when boundary changes rank
...
When a boundary or place changes its address rank, all places where
it participates as address need to be potentially reindexed.
Also use the computed rank when testing place nodes against
boundaries. Boundaries are computed earlier.
Fixes #2794 .
2022-08-12 09:48:46 +02:00
Sarah Hoffmann
18f525ac54
Merge pull request #2793 from lonvia/increase-minimum-results
...
Fix minimum number of results that are searched for
2022-08-09 20:08:45 +02:00
Sarah Hoffmann
e0c184e097
fix base number of returned results
...
The intent was to always search for at least 10 results.
Improves on #882 .
2022-08-09 13:53:20 +02:00
Sarah Hoffmann
78716ab8b9
Merge pull request #2792 from lonvia/new-type-annotations
...
Adapt to new type annotations from typeshed
2022-08-09 13:52:20 +02:00
Sarah Hoffmann
8d082c13e0
adapt to new type annotations from typeshed
...
Some more functions frrom psycopg are now properly annotated.
No ignoring necessary anymore.
2022-08-09 11:06:54 +02:00
Sarah Hoffmann
196dc2a659
docs: add types-psutil requirement
2022-08-08 09:46:25 +02:00
Sarah Hoffmann
4fe797d704
remove mypy ignore for psutil.virtual_memory()
...
Now available in typeshed.
2022-08-08 09:44:45 +02:00
Sarah Hoffmann
3c188164ab
Merge pull request #2789 from lonvia/update-osm2pgsql
...
Update osm2pgsql (fixes admin_level parsing)
2022-08-08 09:15:58 +02:00
Sarah Hoffmann
5330370076
update osm2pgsql (fix admin_level parsing)
2022-08-07 18:34:47 +02:00
Sarah Hoffmann
eecc73ea1a
docs: fix dangling links
2022-08-05 15:29:43 +02:00
Sarah Hoffmann
8c73c0795e
docs: update links to vagrant instructions
2022-08-05 15:27:11 +02:00
Sarah Hoffmann
7d68aa8f04
prepare release 4.1.0
2022-08-05 14:33:11 +02:00
Sarah Hoffmann
a0cd96e05e
Merge pull request #2786 from lonvia/export-centroid-for-tokenizer
...
Export centroid to tokenizer
2022-08-01 11:38:24 +02:00
Sarah Hoffmann
b19c90b9a6
export centroid to tokenizer
...
May come in handy when developping sanitizers for an area smaller
than country size.
2022-07-31 22:10:58 +02:00
Sarah Hoffmann
e427712cb0
Merge pull request #2784 from lonvia/doscs-customizing-icu-tokenizer
...
Document the public API of sanitizers and token analysis modules
2022-07-31 19:15:50 +02:00
Sarah Hoffmann
9864b191b1
fix various typos
2022-07-31 17:10:35 +02:00
Sarah Hoffmann
e7574f119e
add simple examples of sanitizers and token analysis
2022-07-29 17:15:25 +02:00
Sarah Hoffmann
51b6d16dc6
overhaul the token analysis interface
...
The functional split betweenthe two functions is now that the
first one creates the ID that is used in the word table and
the second one creates the variants. There no longer is a
requirement that the ID is the normalized version. We might
later reintroduce the requirement that a normalized version be available
but it doesn't necessarily need to be through the ID.
The function that creates the ID now gets the full PlaceName. That way
it might take into account attributes that were set by the sanitizers.
Finally rename both functions to something more sane.
2022-07-29 15:14:11 +02:00
Sarah Hoffmann
34d27ed45c
move PlaceName into the generic data module
2022-07-29 11:42:20 +02:00
Sarah Hoffmann
094100bbf6
harmonize spelling
...
Stick with the American spelling of Analyze.
2022-07-29 10:52:01 +02:00
Sarah Hoffmann
c8873d34af
harmonize interface of token analysis module
...
The configure() function now receives a Transliterator object instead
of the ICU rules. This harmonizes the parameters with the create
function.
2022-07-29 10:43:07 +02:00
Sarah Hoffmann
f0d640961a
add documentation for custom token analysis
2022-07-29 09:41:28 +02:00
Sarah Hoffmann
3746befd88
add documentation for sanitizer interface
...
Also switches mkdocstrings to 0.18 with the rather unfortunate
consequence that now mkdocstrings-python-legacy is needed as well.
2022-07-28 22:00:29 +02:00
Sarah Hoffmann
a8b037669a
Merge pull request #2780 from lonvia/python-modules-in-project-directory
...
Support for external sanitizer and token analysis modules
2022-07-28 21:58:04 +02:00
Sarah Hoffmann
d819036daa
add support for external token analysis modules
2022-07-25 16:27:22 +02:00
Sarah Hoffmann
6d41046b15
add support for external sanitizer modules
2022-07-25 16:10:19 +02:00
Sarah Hoffmann
7b7203c149
add function for loading plugin modules
...
Loads modules for configurable code like tokenizers, sanitizers, etc.
Supports internal modules, external libraries and code from the
project directory.
2022-07-25 16:10:10 +02:00
Sarah Hoffmann
95d4061b2a
Merge pull request #2775 from lonvia/remove-centos-instructions
...
Remove vagrant scripts for CentOS
2022-07-25 10:29:32 +02:00
Sarah Hoffmann
375b57a96a
vagrant: remove proj dependency and only require php-cli
2022-07-24 10:24:18 +02:00
Sarah Hoffmann
12ace4329d
remove CentOS installation instructions
...
Fixes #2601 .
2022-07-24 10:22:22 +02:00
Sarah Hoffmann
09e0be0e39
Merge pull request #2774 from lonvia/parameter-arrays
...
Ignore URL parameters in array notation
2022-07-23 23:56:32 +02:00
Sarah Hoffmann
cd4bcea894
ignore API parameters in array notation
...
PHP automatically parses parameters in an array notation(foo[]) into
array types. Ignore these parameters as 'unknown'.
Fixes #2763 .
2022-07-23 10:51:44 +02:00
Sarah Hoffmann
1bee151fe3
Merge pull request #2772 from kianmeng/fix-typos
...
docs: fix typos
2022-07-20 17:13:30 +02:00
Kian-Meng Ang
f5e52e748f
docs: fix typos
2022-07-20 22:05:31 +08:00
Sarah Hoffmann
b7f6c7c76a
docs: slightly increase recommended hardware requirements
2022-07-20 10:16:23 +02:00
Sarah Hoffmann
bc7f6209d8
Merge pull request #2770 from lonvia/typed-python
...
Type annotations for Python code
2022-07-19 09:03:30 +02:00
Sarah Hoffmann
372a548c28
CI: remove installation of pip on Ubuntu 20
2022-07-18 12:19:04 +02:00
Sarah Hoffmann
5aad105c73
add explicit cast for fetchone
2022-07-18 10:18:51 +02:00
Sarah Hoffmann
f40c83d025
CIL use psutil type stubs
2022-07-18 09:55:58 +02:00
Sarah Hoffmann
83054af46f
remove typing_extensions requirement
...
The typing_extensions package is only necessary now when running mypy.
It won't be used at runtime anymore.
2022-07-18 09:55:58 +02:00
Sarah Hoffmann
cb81f11422
CI: make type checking strict
2022-07-18 09:55:58 +02:00
Sarah Hoffmann
a849f3c9ec
add type annotations for command line functions
2022-07-18 09:55:54 +02:00
Sarah Hoffmann
25d854dc5c
add type annotations for Tiger import function
2022-07-18 09:54:29 +02:00
Sarah Hoffmann
9963261d8d
add type annotations to special phrase importer
2022-07-18 09:54:29 +02:00
Sarah Hoffmann
459ab3bbdc
add type annotations to database check functions
2022-07-18 09:54:29 +02:00
Sarah Hoffmann
a21d4d3ac4
add type annotations for database import functions
2022-07-18 09:54:29 +02:00
Sarah Hoffmann
4da1f0da6f
add type annotations for migrations
2022-07-18 09:54:29 +02:00
Sarah Hoffmann
17bbe2637a
add type annotations to tool functions
2022-07-18 09:54:27 +02:00
Sarah Hoffmann
6c6bbe5747
add type annotations for ICU tokenizer
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
18b16e06ca
add type annotations for legacy tokenizer
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
e37cfc64d2
add type annotations to ICU tokenizer helper modules
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
77510f4a3b
add typing extensions for Ubuntu22.04
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
d35e3c25b6
add type annotations for token analysis
...
No annotations for ICU types yet.
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
62eedbb8f6
add type hints for sanitizers
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
5617bffe2f
add type annotations for indexer
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
8adab2c6ca
add typing information for postcode formatter
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
d0c44431d0
add typing information for place_info and country_info
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
282a61ce51
add typing information for utils submodule
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
7a1d22ff15
type annotations for non-blocking DB connection
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
0dff71a410
add type annotations for SQL preprocessor
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
26f30bff28
add type annotation to DB utils
...
As a cursor is needed as type, make this a public type.
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
e6775e713c
add typing information to DB properties
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
69f9122bef
add typing annotations for DB status module
...
Requires TypedDict which is only available from Python 3.8. Require
therefore typing_extensions to make the functions available for
earlier Python versions.
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
fc254fc744
adapt use of Connection in bdd tests to name change
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
845c43137a
add type annotations to freeze functions
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
aaf2b6032e
fix uses of config.get_path() to expect None
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
c4928c646d
define type for enivronment dictionaries
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
f12fe54d2b
restrict return type more
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
fc03c0266a
add type annotations to exec_utils
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
7b042de300
CI: install type info for psycopg2
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
681aad7e0d
avoid issues with Python < 3.9 and linting
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
f22fa992f7
move complex typing annotations to extra file
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
992e6f72cf
type annotations for DB utils
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
e6ee3c772c
type annotations for DB connection
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
9d716f0f7d
mypy: add psycopg2 typing info from typeshed
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
95ed95c616
add type annotations to config module
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
bf36f33e79
add type annotations for version.py
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
58ab8319b9
mypy: ignore dotenv library
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
a87cb77ce8
document use of mypy
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
2be45a35b4
CI: add mypy to tests
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
9b636fdc10
mypy: minimal annotations to enable a clean run
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
b1903f0fbf
Merge pull request #2761 from lonvia/repair-index-analysis
...
Repair `admin --analyse-indexing`
2022-07-18 09:38:08 +02:00
Sarah Hoffmann
00f5b78160
Merge pull request #2764 from otbutz/patch-4
...
Remove legacy Postgres options
2022-07-13 15:51:47 +02:00
otbutz
d58061473e
Remove legacy Postgres options
2022-07-12 09:49:10 +02:00
Sarah Hoffmann
33cb925f2e
Merge pull request #2691 from mtmail/ubuntu-22
...
Vagrant and CI tests for Ubuntu 22.04
2022-07-11 15:37:51 +02:00
marc tobias
c70ca7f57b
In tests for PHP 8 disable Just-in-time, it conflicts with tools that determine coverage
2022-07-09 22:03:48 +02:00
Marc Tobias
a6dab5e300
Vagrant and CI tests for Ubuntu 22.04
2022-07-09 22:03:48 +02:00
Sarah Hoffmann
7cafec0750
decode_json() always create arrays instead of objects
2022-07-09 09:10:21 +02:00
Sarah Hoffmann
4b12d52ef5
convert admin --analyse-indexing to new indexing method
...
A proper run of indexing requires the place information from the
analyzer. Add the pre-processing of place data, so the right
information is handed into the update function.
2022-07-07 16:20:08 +02:00
Sarah Hoffmann
300612c5a8
Merge pull request #2760 from lonvia/reorganize-data-classes
...
Code cleanup: move some common code into the data submodule
2022-07-07 16:12:11 +02:00
Sarah Hoffmann
856925d19b
remove analyze() from PlaceInfo class
...
The function creates circular dependencies.
2022-07-07 12:06:58 +02:00
Sarah Hoffmann
cbbcbb1fd7
move country_info into data submodule
2022-07-06 11:08:36 +02:00
Sarah Hoffmann
bce93d60bd
move PlaceInfo into data submodule
...
This data structure is shared between indexer and tokenizer.
2022-07-06 10:54:47 +02:00
Sarah Hoffmann
69e51aebab
test: avoid column names with upper-case letters
...
This may cause problems when the column names get quoted.
2022-07-05 09:12:55 +02:00
Sarah Hoffmann
8ac133f2ee
CI: remove unneed stuff to make space for DB
2022-07-03 16:42:57 +02:00
Sarah Hoffmann
67996929e0
Merge pull request #2706 from mtmail/php-fixes-php7-vs-php8
...
PHP 8 behaves slightly different with in_array and usort
2022-07-03 11:28:52 +02:00
Marc Tobias
ccf119206d
PHP 8 behaves slightly different with in_array and usort
2022-07-03 10:55:34 +02:00
Sarah Hoffmann
bc63f10057
fix syntax error with tablespaces
2022-06-30 09:19:16 +02:00
Sarah Hoffmann
6f15306766
docs: replace deprecated pages option
...
Fixes #2661 .
2022-06-29 20:30:28 +02:00
Sarah Hoffmann
161d83af5b
fix handling of zero importance
...
To avoid importance becoming zero and cancelling out other weights,
df008d99f5 introduced a minimum value
for importance. That broke importances for interpolated addresses,
which are less than zero.
Instead of setting a minimum, set zero importances to a very small
value.
Fixes #2753 .
2022-06-29 17:54:30 +02:00
Sarah Hoffmann
3bf3b894ea
Merge pull request #2757 from lonvia/filter-postcodes
...
Add filtering, normalisation and variants for postcodes
2022-06-24 21:09:41 +02:00
Sarah Hoffmann
536f08f33a
ignore 5+ postcodes in the US for now
...
Hierarchical postcodes need a different treatment.
2022-06-24 19:24:22 +02:00
Sarah Hoffmann
3dd7410bb7
bdd: correctly skip postcode tests for legacy
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
93d5be097a
bdd: do not expect legacy word table to be without empty tokens
...
It can happen for bogus names and this will not get fixed anymore.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
6eb9044353
adapt search algorithm to new postcode format in word
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
612d34930b
handle postcodes properly on word table updates
...
update_postcodes_from_db() needs to do the full postcode treatment
in order to derive the correct word table entries.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
5be320368c
add documentation for postcode customization
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
7f2ad4ac7e
fix linting issue
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
0f00f4968c
fix up BDD tests for postcode changes
...
Includes smaller code fixes found by the tests.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
37b2c6a830
port legacy tokenizer to new postcode handling
...
Also documents the changes to the SQL functions of the tokenizer.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
e86db3001f
fix postcode pattern for Mozambique
...
Optional groups are not implemented yet.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
7b6ec4fc6c
add tests for discarding bad postcodes
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
67dfa38e60
fix liniting problems
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
2eca9fc8af
cache postcode normalization
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
b5e5efc131
only add well-formatted postcodes to location table
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
80ea13437d
move postcode matcher in a separate file
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
bf86b45178
move postcode centroid computation to Python
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
4885fdf0f9
add class for online centroid computation
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
b7704833e4
icu: switch postcodes to using the pre-formatted one
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
ca7b46511d
introduce and use analyzer for postcodes
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
18864afa8a
postcodes: introduce a default pattern for countries without postcodes
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
5ba75df507
postcode: generate a generic form
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
9cf700e85d
add postcodes for most of the remaining countries
...
Now includes all postcodes that have optional parts.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
9172696324
postcodes: add support for optional spaces
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
49626ba709
add postcode formats with optional country code
...
If the country code is not part of the mandatory output, the
country code filter will do the correct handling.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
baee6f3de0
postcodes: strip leading country codes
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
28ab2f6048
add postcodes patterns without optional spaces
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
90d4d339db
initial postcode cleaner for simple patterns
...
Moves postcodes that are either in countries without a postcode
system or don't correspond to the local pattern for postcodes into
a field for a normal address part. Makes them searchable but not as
a special address. This has two consequences: they are no longer a
skippable part of the address and the postcodes cannot be searched
on their own.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
6e0014e138
add postcode patterns for numeric postcodes
...
Adds patterns for countries that have simple numeric-only postcodes.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
8080625747
remove postcodes from countries that don't have them
...
The postcodes will only be removed as a 'computed postcode' they
are still searchable for the given object.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
21fb501699
add info about countries without a postcode
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
0cd3a1b9bd
avoid near searches in very large areas
...
At some point the contains call becomes too expensive.
2022-06-23 23:42:09 +02:00
Sarah Hoffmann
8de483a45b
Merge pull request #2755 from Luflosi/fix-typo
...
Fix typo
2022-06-20 22:23:36 +02:00
Luflosi
3ea87169ac
Fix typo
2022-06-20 20:41:00 +02:00
Sarah Hoffmann
42d16d8296
Merge pull request #2751 from mtmail/issue-2750
...
Documentation fix: should be "nominatim refresh"
2022-06-20 10:21:06 +02:00
marc tobias
adf3ae004f
Documentation fix: should be "nominatim refresh"
2022-06-20 02:32:23 +02:00
Sarah Hoffmann
fced1172c4
Merge pull request #2746 from bgo-eiu/patch-2
...
Added additional languages for Pakistan in country settings
2022-06-18 09:40:47 +02:00
Sarah Hoffmann
299e98776e
Merge pull request #2749 from stefkiourk/patch-1
...
Typos and syntax on Reverse.md
2022-06-17 22:11:55 +02:00
Stef Ki
b803505402
Typos and syntax on Reverse.md
2022-06-17 21:01:38 +02:00
Sarah Hoffmann
8fb9795d04
Merge pull request #2748 from lonvia/bdd-grid-origin
...
BDD tests: remove support for scenes
2022-06-17 15:25:29 +02:00
Sarah Hoffmann
d8623d6818
bdd: remove support for scenes
...
Only keep support for the special point geometry 'country:xx'.
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
6c58a4c46c
bdd: move query tests from scene to grid description
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
19f67e167c
bdd: remove step for scene setup
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
00d8df6fc3
bdd: move update tests from scenes to grid descriptions
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
02068aec7f
bdd: move import tests from scenes to grid descriptions
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
3493d317e4
bdd: clear lof buffer after a successful import run
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
a2b486a5b0
bdd: allow to set an origin of the grid
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
3d0f8bdc39
Merge pull request #2745 from lonvia/city-in-city-fix
...
Improve hierarchy computation for place areas
2022-06-16 15:36:39 +02:00
bgo-eiu
04644102f2
added additional languages for pakistan in country settings
2022-06-16 06:26:44 -04:00
Sarah Hoffmann
f833cc80df
use default ranks when reorganising rank_address
...
When shifting address ranks, the evaluation is always done against
unshifted address ranks on import because the objects we compare against
have not been indexed yet. This changes for updates when the object have
been touched in the meantime. To ensure consistent behaviour across
imports and updates, always use the unshifted address ranks.
2022-06-16 11:20:23 +02:00
Sarah Hoffmann
df0142678a
improve address ordering with mixes of place and admin areas
...
Resolves a couple of situations where a mixed use of places areas and
administrative boundaries would result in a hierarchy that did not
properly respect the contains relation.
2022-06-16 10:44:16 +02:00
Sarah Hoffmann
800240550b
Merge pull request #2737 from lonvia/reset-linking-ranks
...
Fix rank inheritance from linked places
2022-06-06 09:29:32 +02:00
Sarah Hoffmann
15cf7dd416
add testcase for #2551
...
This test proves that places that are linked need to be reindexed.
2022-06-05 21:39:17 +02:00
Sarah Hoffmann
2c05fc858a
fix rank inheritance from linked places
...
When taking over the address rank from a linked place, it needs
to be the originally computed rank, not the one that might have
been adjusted in the meantime. The adjustment was made under the
assumption that the node is not linked.
2022-06-05 19:38:14 +02:00
Sarah Hoffmann
a024c7665c
Merge pull request #2736 from lonvia/reverse-interpolation-index-order
...
Change indexing order for interpolations and non-addressable objects
2022-06-03 10:42:54 +02:00
Sarah Hoffmann
cbb4749996
change indexing order for interpolations
...
Interpolations are now indexed after rank 30 objects. The housenumber
nodes no longer need information from the interpolations while the
interpolations can make use of precomputed postcodes.
2022-06-02 15:16:46 +02:00
Sarah Hoffmann
4b0d9f71e8
Merge pull request #2735 from lonvia/geocodejson-type-reverse
...
Also fix type output in geocodejson for reverse
2022-06-01 22:14:06 +02:00
Sarah Hoffmann
218c56f9a6
use getattr() instead of __getattr__
...
Makes the linter happy.
2022-06-01 21:26:13 +02:00
Sarah Hoffmann
a35eda3d2a
also fix type output in geocodejson for reverse
2022-06-01 20:46:08 +02:00
Sarah Hoffmann
8a0e3e2f3d
Merge pull request #2732 from lonvia/fix-ordering-address-parts
...
Fix order when searching for addr:* components
2022-05-31 20:26:05 +02:00
Sarah Hoffmann
12a3d51bcc
Merge pull request #2731 from lonvia/cleanup-special-phrases
...
Minor code reorganisation around special phrase parsing
2022-05-31 17:13:56 +02:00
Sarah Hoffmann
60367d95dd
Merge pull request #2730 from lonvia/exclude-inclusion-tag
...
Exclude addr:inclusion from search
2022-05-31 17:13:37 +02:00
Sarah Hoffmann
bd0e157b91
fix order when searching for addr:* components
...
When matching addr:* components the preference was given to
matches that do not intersect with the place.
2022-05-31 16:57:37 +02:00
Sarah Hoffmann
1821f68ca0
exclude addr:inclusion from search
2022-05-31 14:19:19 +02:00
Sarah Hoffmann
b5ac546275
CI: always use the latest version of pylint
...
This makes it easier to reproduce issues locally.
2022-05-31 09:12:26 +02:00
Sarah Hoffmann
46689df668
custom comparison for SpecialPhrase
...
Duplicate elemination only works when a custom hash/equal function
is implemented that is based on the members.
2022-05-30 16:30:41 +02:00
Sarah Hoffmann
e828d0d3f7
move quoting hack to wiki loader
...
The bad quotes around the type for special phrases
specifically occure in the Wiki pages, so it should be
removed by the loader and not in the generic SpecialPhrase
object.
2022-05-30 14:40:33 +02:00
Sarah Hoffmann
cce0e5ea38
convert special phrase loaders to generators
...
Generators simplify the code quite a bit compared to the previous
Iterator approach.
2022-05-30 14:12:46 +02:00
Sarah Hoffmann
042e314589
remove the language parameter in the SPWikiLoader
...
Languages must always be configured through config or environment.
Also use monkeypatched environment in tests.
2022-05-30 10:26:20 +02:00
Sarah Hoffmann
61d813bfef
add get_str_list() for config
...
Converts a config value written as a comma-sparated list into
a Python list of strings.
2022-05-29 13:53:50 +02:00
Sarah Hoffmann
ecee5cf801
Merge pull request #2728 from lonvia/allow-more-partials
...
Allow search for partials consisting of 3 or more words
2022-05-27 18:09:11 +02:00
Sarah Hoffmann
9e4e913bf7
allow search for partials consisting of 3 or more words
...
The search query builder currently rejects searches for partial
names only, when the partial terms are all very frequent to avoid
queries that return too many results.
This change slightly relaxes the condition to allow the search when
there are 3 or more partial terms. With so many terms the number
of matches should be managable.
2022-05-27 16:49:14 +02:00
Sarah Hoffmann
98fc528d8e
Merge pull request #2715 from otbutz/patch-2
...
Simplify apache rewrite rules
2022-05-24 14:40:28 +02:00
otbutz
d1cd2d1674
Change to regular regex group
2022-05-24 11:32:59 +02:00
Sarah Hoffmann
b593fe9c3e
Merge pull request #2718 from nslxndr/fix-log-endtime
...
Undefined offset in error log
2022-05-23 16:25:41 +02:00
Sarah Hoffmann
6ca6725f6e
Merge pull request #2722 from lonvia/fix-relinking-on-updates
...
Fix bug with keeping linking on updates
2022-05-23 11:36:20 +02:00
Sarah Hoffmann
1d203fdb3c
fix bug with keeping linking on updates
...
When moving the finding of linked places to the precomputation stage,
it was also moved before the statement where the linked_place_id was
removed from the linkee. The result was that the current linkee was
excluded when looking for a linked place on updates because it was
still linked to the boundary to be updated.
Fixed by allowing to either keep the linkage or change to an unlinked
place.
2022-05-23 10:55:10 +02:00
Sandor Nagy
3f30699131
correct end time computation
2022-05-20 23:11:00 +02:00
otbutz
22bd9c4993
Simplify apache rewrite rules
2022-05-20 10:15:28 +02:00
Sarah Hoffmann
4654701c10
Merge pull request #2713 from lonvia/remove-county-nodes-in-canada
...
Remove county nodes in Canada from addresses
2022-05-19 10:21:09 +02:00
Sarah Hoffmann
8a67ddcb2b
remove county nodes in Canada from addresses
...
Canada has complete coverage for administrative boundaries on
county level. Removing the county nodes from the addresses avoids error
due to a wide-spread doubling of place nodes for city counties.
2022-05-18 10:19:05 +02:00
Sarah Hoffmann
ab71f17c47
Merge pull request #2710 from lonvia/offline-import-mode
...
Assorted performance improvements for BDD tests
2022-05-12 11:08:29 +02:00
Sarah Hoffmann
f314abcfe1
bdd: restrict imports to four languages
...
This mainly restricts the number of country names that are loaded.
2022-05-11 16:40:53 +02:00
Sarah Hoffmann
2d1a22705f
Merge pull request #2709 from lonvia/less-strict-country-assignment
...
Be more strict with country assignments
2022-05-11 16:24:47 +02:00
Sarah Hoffmann
e74e577029
bdd: recreate functions on template DB
...
Avoids calling function refresh on every scenario. The content won't
change between runs.
2022-05-11 15:50:22 +02:00
Sarah Hoffmann
aa0ae610c6
avoid calling OSM servers during bdd tests
2022-05-11 15:33:01 +02:00
Sarah Hoffmann
dc6c4bf22e
add offline import mode
...
In offline mode no attempts are made to download data from the internet.
At the moment that only concerns the computation of the database date.
It contacts the main API to get the date.
2022-05-11 15:03:02 +02:00
Sarah Hoffmann
a7a5f0161f
Merge pull request #2708 from lonvia/use-format-literals
...
Assorted fixes for new pylint warnings
2022-05-11 14:29:56 +02:00
Sarah Hoffmann
739fe1c2c4
no longer allow fuzzy assignment of country
...
The fallback country boundaries already contain a sufficiently large
part of the water area, so there is no need to extend the country
assignment even more. Features outside countries should not show a
country in their address.
2022-05-11 11:54:25 +02:00
Sarah Hoffmann
3ba975466c
fix spacing
...
Some versions of pylint are oddly picky.
2022-05-11 10:36:09 +02:00
Sarah Hoffmann
d14a585cc9
pylint: disable no-self-use check
...
This checker encourages bad behaviour (namely changing the static
status of a function during inheritence) and will be made optional
in upcoming versions of pylint.
2022-05-11 10:25:00 +02:00
Sarah Hoffmann
7f7a7df3a2
solve assorted issue with newer pylint versions
...
Includes more use of 'with', adding encodings to open statements
and a couple of issues with parameter renaming.
2022-05-11 10:22:14 +02:00
Sarah Hoffmann
5d5f40a82f
use context management when processing Tiger data
2022-05-11 09:48:56 +02:00
Sarah Hoffmann
ae6b029543
remove redundant 'u' prefixes for unicode strings
2022-05-11 09:48:56 +02:00
Sarah Hoffmann
bb2bd76f91
pylint: avoid explicit use of format() function
...
Use psycopg2 SQL formatters for SQL and formatted string literals
everywhere else.
2022-05-11 09:48:56 +02:00
Sarah Hoffmann
4e1e166c6a
add a function to return a formatted version
...
Replaces the various repeated format strings throughout the code.
2022-05-11 09:01:24 +02:00
Sarah Hoffmann
5ff35d9984
Merge pull request #2707 from lonvia/make-icu-tokenizer-the-default
...
Make ICU tokenizer the default
2022-05-11 08:52:49 +02:00
Sarah Hoffmann
c6a426a885
no longer need postgresql-server-dev packages
2022-05-10 18:33:51 +02:00
Sarah Hoffmann
11103268e9
make legacy tokenizer tests the extra on CI
2022-05-10 18:33:34 +02:00
Sarah Hoffmann
b332b1ae23
Merge pull request #2704 from mtmail/migrate-phpunit-xml-schema
...
PHPUnit 9 changed configuration schema slightly
2022-05-10 17:44:34 +02:00
Sarah Hoffmann
7e70e5f503
always state encoding when opening files in text mode
...
Also applies to Path.write_text().
2022-05-10 15:36:29 +02:00
Marc Tobias
99fa23040a
PHPUnit 9 changed configuration schema slightly
2022-05-10 15:20:43 +02:00
Sarah Hoffmann
adeebec32a
switch tests to ICU tokenizer as default
2022-05-10 14:54:50 +02:00
Sarah Hoffmann
b93ef23d3f
add migration hint for the new tokenizer default
2022-05-10 12:07:21 +02:00
Sarah Hoffmann
4002bee0c1
make ICU the default tokenizer
2022-05-10 12:02:50 +02:00
Sarah Hoffmann
ed6fda6968
Merge pull request #2702 from lonvia/move-country-names-into-includes
...
Clean up country name settings
2022-05-10 09:21:16 +02:00
Sarah Hoffmann
2ae13c5583
Merge pull request #2695 from mtmail/git-commit-hash-to-version
...
add git commit hash to 'nominatim --version' output
2022-05-10 09:14:15 +02:00
Marc Tobias
821dabb138
add git commit hash to --version output
2022-05-09 23:56:13 +02:00
Sarah Hoffmann
9d468f6da0
support arbitrary prefixes in country name list
...
This means we can now get rid of the last special cases for names.
2022-05-09 11:55:26 +02:00
Sarah Hoffmann
3a8ddf736e
move country names into separate include files
2022-05-09 11:55:26 +02:00
Sarah Hoffmann
720c7b7519
Merge pull request #2696 from mtmail/norminatyn-typos
...
fix typos of name Nominatim
2022-05-05 10:04:55 +02:00
Marc Tobias
0de83c4a51
fix typos of name Nominatim
2022-05-05 01:04:47 +02:00
Sarah Hoffmann
8c073993ef
Merge pull request #2693 from mtmail/nominatim-cli-version
...
new "nominatim --version" global CLI argument
2022-05-04 09:14:35 +02:00
Marc Tobias
a79ab41782
new nominatim --version CLI argument
2022-05-04 01:33:25 +02:00
Sarah Hoffmann
f509526e5c
Merge pull request #2681 from lonvia/improve-geocodejson
...
Fix 'type' field in the geocodejson response
2022-05-02 16:05:02 +02:00
Sarah Hoffmann
896199c9d4
Merge pull request #2687 from lonvia/check-for-wikipedia
...
Add check for presence of wikipedia importance
2022-05-02 16:04:32 +02:00
Sarah Hoffmann
08672cdf0a
explicit cast for osm_type parameter in SQL needed
...
Otherwise PostgreSQL won't correctly pick up the index
condition.
2022-05-02 14:12:17 +02:00
Sarah Hoffmann
8163723e22
respect exclude_place_ids for housenumber search
2022-05-02 11:44:10 +02:00
Sarah Hoffmann
32a5f812a9
Merge pull request #2689 from lonvia/relations-in-associated-street
...
Accept any OSM type in street member of associatedStreet
2022-05-02 11:42:34 +02:00
Sarah Hoffmann
372874e89a
accept any OSM type in street member of associatedStreet
...
This is needed for pedestrian areas mapped as multipolygons
and consequently as relations. The lookup in placex guarantees
that the referenced OSM object is indeed a street.
Fixes #2669 .
2022-05-02 09:48:51 +02:00
Sarah Hoffmann
8ebb8ee304
Merge pull request #2686 from mtmail/ubuntu20-php-fpm-version
...
Install-on-Ubuntu-20.sh - correct php version
2022-04-29 14:16:44 +02:00
Sarah Hoffmann
3d58254462
skip wikipedia table test on reverse-only installations
...
Wikipedia importances are not imported on reverse-only imports.
2022-04-29 14:12:55 +02:00
Marc Tobias
95de411a81
Install-on-Ubuntu-20.sh - correct php-fpm version
2022-04-29 13:24:15 +02:00
Sarah Hoffmann
439d17569d
Merge pull request #2685 from lonvia/show-inherited-housenumber
...
Keep address parts inherited from surrounding buildings after indexing
2022-04-29 12:15:33 +02:00
Sarah Hoffmann
8bcdba1a14
add check for wikipedia importance data
...
Adds a new check level WARNING because missing wikipedia importances
are not necessarily an error. If the database is run for reverse
requests only, then it is fine to go without them.
2022-04-29 12:14:53 +02:00
Sarah Hoffmann
37e5f07d83
Merge pull request #2684 from lonvia/translit-keep-spacing-marks
...
ICU: better letter identification in normalization
2022-04-29 10:38:28 +02:00
Sarah Hoffmann
3c68b12176
keep inherited address parts after indexing
...
The inherited housenumber is needed for display output. We can't
take the one from the housenumber field because it is already
normalized. Remove the inherited address only when reindexing.
Fixes #2683 .
2022-04-28 21:38:00 +02:00
Sarah Hoffmann
63dc4b39bc
ICU: better letter identification in normalization
...
The Letter class does not include non-spacing marks that can also
have a consonant or vowel meaning, especially in Indian languages.
Use the alnum propoerty instead which includes them all. Also
include the vowel-canceling Virama, which is not a letter by itself
but changes the transliteration.
2022-04-28 18:23:17 +02:00
Sarah Hoffmann
0ea099bfd5
mention the breaking API change in the migratioin docs
2022-04-27 11:52:53 +02:00
Sarah Hoffmann
310776671b
adapt docs to geocodejson changes
2022-04-27 11:50:12 +02:00
Sarah Hoffmann
4b84de400b
geocodejson: add osm_key and osm_value fields
...
Return OSM main tag information in geocodejson. This is not part
of the official spec but can be useful to get more detailed information
of the object type. Brings the Nominatim output closer to what
Photon produces.
2022-04-27 10:58:25 +02:00
Sarah Hoffmann
8677da2a72
geocodejson: type should contain the general feature class
...
'type' so far contained the value of the OSM tag. That is rarely
helpful because it is not a restricted class of values. Change
this to contain the types as defined in the geocodejson spec,
which correspond to the address layer names.
2022-04-27 10:53:12 +02:00
Sarah Hoffmann
de828b723e
Merge pull request #2678 from lonvia/address-part-order
...
Change selection of primary address part for ways that cross boundaries
2022-04-22 20:32:10 +02:00
Sarah Hoffmann
a515761193
further tweaking of address distance
...
For point features, keep using the distance to centroid.
For area features, add a tie breaker for the case where the
center point falls on the boundary.
2022-04-22 14:32:19 +02:00
Sarah Hoffmann
784dad866f
change distance computation between place and address part
...
Instead of computing the distance to the centroid of the area
compute the distance of the area to the centroid of the feature.
This means we give preference to the area that covers the centroid.
It's still a heuristics but one that is a bit less random.
2022-04-22 14:32:09 +02:00
Sarah Hoffmann
403e6f7e5c
Merge pull request #2666 from lonvia/admin-command-for-forced-indexing
...
Admin command for forced indexing
2022-04-14 21:44:08 +02:00
Sarah Hoffmann
27f7c7fd88
add documentation for new refresh command
2022-04-14 15:10:24 +02:00
Sarah Hoffmann
4f59644cc2
add tests for new data invalidation functions
2022-04-14 14:52:13 +02:00
Sarah Hoffmann
c3f1d34b71
add new commands for forced invalidation before indexing
2022-04-14 11:05:43 +02:00
Sarah Hoffmann
f8f20899a3
recommend PostgreSQL 13+
...
See https://github.com/osm-search/Nominatim/discussions/2659 .
2022-04-14 09:21:25 +02:00
Sarah Hoffmann
a319b0a0b4
docs: different default for format on osm.org
...
Add a note that the format parameter is needed for
nominatim.openstreetmap.org for historical reasons.
2022-04-08 17:13:42 +02:00
Sarah Hoffmann
604ddc0f9d
Merge pull request #2660 from lonvia/pyosmium-contextmanager
...
Support using ReplicationServer as contextmanager
2022-04-08 17:07:33 +02:00
Sarah Hoffmann
126cabacb8
support new ReplicationServer as contextmanager
2022-04-07 17:58:04 +02:00
Sarah Hoffmann
f78ae969e9
Merge pull request #2466 from I70l0teN4ik/state-code
...
add ISO3166-2-lvl<admin_level> field to response address details
2022-04-07 16:39:50 +02:00
Artem Ziablytskyi
d1479072ae
fix bdd tests and docs
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
9a56e53d50
use ISO3166-2-lvl<admin_level> instead of typeLabel prefix
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
7899654675
proper instruction to import data
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
a79c1bda9b
Fix API docs and Vagrant instructions to import data
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
665fae8343
Fix API docs and Vagrant instructions to import data
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
6bee188f24
Change the key to <addresspart_type>-ISO3166-2 to support xml response correctly
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
82dbcbb12a
add <addresspart_type>:ISO3166-2 field to response address details
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
76c146f326
add state_code field to response address details
2022-04-07 16:37:51 +02:00
Sarah Hoffmann
fd4ab3f262
Merge pull request #2629 from tareqpi/country-names-yaml-configuration
...
Move default country names into yaml configuration
2022-04-04 09:04:25 +02:00
Tareq Al-Ahdal
cfbd3652ef
fix linting error
2022-04-02 00:14:18 +08:00
Tareq Al-Ahdal
e9c14979a4
remove the conversion to json for name
2022-04-01 22:54:14 +08:00
Tareq Al-Ahdal
e9f979b67b
'read_config' is no longer a fixture
...
add 'read_config' to test cases that need it
2022-04-01 22:52:17 +08:00
Tareq Al-Ahdal
a323b8f63a
test for loading special characters from country_settings.yaml
2022-04-01 21:58:57 +08:00
Tareq Al-Ahdal
9411c14fd2
fix reset country info before loading custom data
2022-04-01 21:55:34 +08:00
Tareq Al-Ahdal
8525e7542f
custom country config loads correctly
2022-04-01 21:46:56 +08:00
Sarah Hoffmann
7dabbc5462
Merge pull request #2655 from lonvia/migration-internal-country-name
...
Add migration for new country name handling in ICU tokenizer
2022-03-31 18:04:18 +02:00
Sarah Hoffmann
de18cd1523
add test for new table_has_column function
2022-03-31 15:55:20 +02:00
Sarah Hoffmann
36a1560117
add migration to mark internal country names
2022-03-31 15:55:20 +02:00
Tareq Al-Ahdal
b5f311d6bc
separate unit test function into three functions
2022-03-30 22:06:59 +08:00
Sarah Hoffmann
83dd4362aa
remove temporary file
2022-03-30 15:13:31 +02:00
Sarah Hoffmann
a71cab639b
Merge pull request #2650 from mtmail/update-lookup-examples
...
documentation: update example output of lookup endpoint
2022-03-28 20:21:45 +02:00
Marc Tobias
5e0155ae29
documentation: update example output of lookup endpoint
2022-03-28 16:41:10 +02:00
Tareq Al-Ahdal
afef83b1c6
fix edge case handling when 'names' is not there
2022-03-25 22:25:55 +08:00
Tareq Al-Ahdal
9db13aac72
Added unit tests for loading country info from yaml file
2022-03-25 22:22:44 +08:00
Tareq Al-Ahdal
9a1f891998
fix linting error
2022-03-24 13:27:24 +08:00
Tareq Al-Ahdal
7bb7ed468a
fix storing of escape sequences in database
2022-03-24 13:18:44 +08:00
Tareq Al-Ahdal
4fc61d260f
clean up
2022-03-24 13:16:59 +08:00
Tareq Al-Ahdal
1ceb6926b7
merge of insert query + modularity enhancements
2022-03-24 13:13:38 +08:00
Sarah Hoffmann
d33c82cb66
Merge pull request #2641 from lonvia/reinit-tokenizer-dir
...
Transparantly reinitialize tokenizer directory when necessary
2022-03-20 21:46:07 +01:00
Sarah Hoffmann
4c66c35ed6
reinit the tokenizer directory on website refresh
...
This means the project directory is usable again, once refresh --website
was run.
2022-03-20 17:49:22 +01:00
Sarah Hoffmann
54db1d8915
docs: copying project dir no longer necessary
2022-03-20 16:01:27 +01:00
Sarah Hoffmann
a0ed80d821
restore the tokenizer directory when missing
...
Automatically repopulate the tokenizer/ directory with the PHP stub
and the postgresql module, when the directory is missing. This allows
to switch working directories and in particular run the service
from a different maschine then where it was installed.
Users still need to make sure that .env files are set up correctly
or they will shoot themselves in the foot.
See #2515 .
2022-03-20 11:31:42 +01:00
Sarah Hoffmann
e65913d376
cache loaded configuration
...
Reading the YAML files is fairly expensive and slows down the BDD tests
significantly. Therefore cache the results from reading the file.
2022-03-20 11:30:03 +01:00
Sarah Hoffmann
2f266d946b
Merge pull request #2639 from lonvia/remove-operator
...
No longer use operator tag as a name
2022-03-18 16:42:18 +01:00
Tareq Al-Ahdal
b6ac4ad837
fix linting error
2022-03-18 21:05:47 +08:00
Sarah Hoffmann
42f0282f14
remove special case for operator names
...
The OSM data has been sufficiently cleaned up by now that
the operator no longer needs to be considered a name tag.
Use 'brand' as the searchable alternative.
2022-03-18 10:48:53 +01:00
Tareq Al-Ahdal
af739d2f57
modify logic of _include_key function
2022-03-18 06:52:16 +08:00
Tareq Al-Ahdal
fa2aca1cbc
adding prefix to keys is now more configurable
2022-03-18 06:20:00 +08:00
Tareq Al-Ahdal
943e5fe699
Revert the removal of new line at the end of the file
2022-03-18 06:07:48 +08:00
Tareq Al-Ahdal
d09670d208
modify logic to prepend 'name:' to keys'
2022-03-18 06:01:25 +08:00
Tareq Al-Ahdal
83b4b8d9c1
reattach 'name:' prefix to keys
2022-03-18 05:46:23 +08:00
Tareq Al-Ahdal
d32a7c1888
initialize an empty dictionary for nested name key
2022-03-18 02:50:33 +08:00
Tareq Al-Ahdal
d0c1b73fb3
remove duplicate values
2022-03-18 02:43:42 +08:00
Tareq Al-Ahdal
90ac15748e
fix comment
2022-03-18 02:38:04 +08:00
Tareq Al-Ahdal
6be2077d92
Merge branch 'master' into country-names-yaml-configuration
2022-03-18 02:36:12 +08:00
Tareq Al-Ahdal
456d439e97
Reformatting of country keys
2022-03-18 02:23:11 +08:00
Sarah Hoffmann
2723553593
Merge pull request #2637 from lonvia/keep-linked-place-names
...
Introduce separation of names from linked places
2022-03-17 16:39:30 +01:00
Sarah Hoffmann
23de4c7aca
adapt ParameterParser tests to new key list
2022-03-17 11:45:05 +01:00
Sarah Hoffmann
ce14964943
fix linting
2022-03-17 11:05:32 +01:00
Sarah Hoffmann
e133476c35
merge linked names correctly into namedetails
...
Convert the '_place_*' entries back to normal entries before
returning them in the 'namedetails' section. If the name field is
duplicated, kept the '_place_*' notation. This preserves the previous
behaviour before _place_ names were introduces but adds the additional
names from the linked place for reference.
2022-03-17 11:02:02 +01:00
Sarah Hoffmann
524dc64ab7
make sure outputs take into account linked place names
2022-03-16 21:44:52 +01:00
Sarah Hoffmann
17da5f45be
fix return code for PHP exceptions
...
These have returned a 0 until now.
2022-03-16 21:44:02 +01:00
Sarah Hoffmann
42cd021d04
save differing linked polace names in extra fields
...
This keeps the names tracable and ensures that all names are searchable
when they differ. Do not keep names when they are exactly the same
to save some space. Linked names are cleaned out before relinking.
2022-03-16 16:38:52 +01:00
Sarah Hoffmann
433d2f4c7d
Merge pull request #2633 from lonvia/fix-reverse-single-interpolation-point
...
Correctly handle single-point interpolations in reverse
2022-03-16 14:22:59 +01:00
Sarah Hoffmann
be8f5778a1
use https protocol for cloning from github
...
Does not need authentication.
2022-03-16 12:05:58 +01:00
Sarah Hoffmann
ef98a85b05
correctly handle single-point interpolations in reverse
...
Lookup in location_property_osmline needs to be special cased
for startnumber = endnumber. Also adds tests for the case.
Fixes #2680 .
2022-03-16 11:19:09 +01:00
Tareq Al-Ahdal
b4bd4ff67d
fix linting error
2022-03-15 19:14:04 +08:00
Sarah Hoffmann
930a5cd12a
Merge pull request #2632 from nslxndr/fix-log-typo
...
Fix typo in log message on replication initialisation
2022-03-15 11:01:57 +01:00
Sandor Nagy
7e3701b64a
Fix typo in log message on replication initialisation
2022-03-15 07:50:47 +01:00
Tareq Al-Ahdal
165d17f7f7
reintroduce 'name:' prefix to country name keys
2022-03-13 18:58:27 +08:00
Tareq Al-Ahdal
3939cb614e
Remove country.sql from CMakeLists.txt
2022-03-13 18:56:19 +08:00
Tareq Al-Ahdal
377cf36be3
modify data import logic to load country names from yaml
2022-03-12 15:20:57 +08:00
Tareq Al-Ahdal
8b6652a40b
move default country names into yaml configuration
2022-03-12 15:17:01 +08:00
Sarah Hoffmann
479d726774
Merge pull request #2627 from mtmail/location-of-osm2pgsql
...
documentation: clarify osm2pgsql isnt in project directory by default
2022-03-10 15:39:10 +01:00
Marc Tobias
1fcc9717bb
documentation: clarify osm2pgsql isnt in project directory by default
2022-03-10 14:16:12 +01:00
Sarah Hoffmann
c35b3ea5c7
Merge pull request #2621 from lonvia/housenumber-analyzer
...
Introduce optional token analysis for housenumbers
2022-03-01 15:19:07 +01:00
Sarah Hoffmann
15beeef6ce
do not expand records in select list
...
An expression of the form 'SELECT (func()).*' will be expanded
by Postgresql _before_ execution with the result that the function
will be called as many times as there are fields in the record.
This is not what we want. The function call needs to go into
the FROM clause instead.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
92bc3cd0a7
fix linting issue
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
0a9f971e44
add tests for new analyzed housenumbers
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
4a3bbd0319
adapt housenumber cleanup to new word table structure
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
89e1446131
bdd: disable some housenumber tests for legacy
...
Optional spaces in housenumbers are not supported by legacy tokenizer,
so disable those tests.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
b694a97edf
add documentation for housenumber analyzer
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
13ed184efd
housenumber analyzer: avoid creating too many variants
...
Housenumber fields with lots of text are likely bad data. So is
data with many changes from letter to digit. Exclude them from adding
optional spaces.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
f03a05f6bb
add new analyser for houenumbers
...
This analyser makes spaces optional.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
a6903651fc
add framework for analysing housenumbers
...
This lays the groundwork for adding variants for housenumbers.
When analysis is enabled, then the 'word' field in the word table
is used as usual, so that variants can be created. There will be
only one analyser allowed which must have the fixed name
'@housenumber'.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
b8c544cc98
icu: move token deduplication into TokenInfo
...
Puts collection into one common place.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
243725aae1
icu: move housenumber token computation out of TokenInfo
...
This was the last function to use the cache. There is a more clean
separation of responsibility now.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
0bb59b2e22
handle unknown analyzer
...
When changing something in the default configuration of the sanatizers
that refers to an analyzer that is not yet loaded, there shouldn't be
any errors.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
837d44391c
move generation of normalized token form to analyzer
...
This gives the analyzer more flexibility in choosing the normalized
form. In particular, an analyzer creating different variants can choose
the variant that will be used as the canonical form.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
691ec08586
Merge pull request #2614 from lonvia/reorganise-country-names
...
Reorganise handling of country names imported from OSM
2022-02-25 09:46:20 +01:00
Sarah Hoffmann
5425394654
add migration to add new derived_names column
2022-02-24 20:50:33 +01:00
Sarah Hoffmann
1d82569f6d
add tests for country updates
2022-02-24 16:18:49 +01:00
Sarah Hoffmann
f74228830d
bdd: run full import on tests
...
This uncovered a couple of outdated/wrong tests which have been
fixed, too.
2022-02-24 14:27:51 +01:00
Sarah Hoffmann
a9e3329c39
country_name: use separate columns for names from OSM
...
This allows us to distinguish between base names and imported ones
and consiquently removing imported ones if necessary.
2022-02-23 09:23:06 +01:00
Sarah Hoffmann
a3e4e8e5cd
delete unused country name tokens
2022-02-23 09:23:06 +01:00
Sarah Hoffmann
898febcec5
update supported versions
2022-02-23 09:22:17 +01:00
Sarah Hoffmann
855909b4e9
add 'healthcare' as main tag
...
Given that the tag is most of the time duplicated by an amenity
tag which is already imported, only import it as a fallback when
there is no name.
Fixes #2609 .
2022-02-21 11:52:17 +01:00
Sarah Hoffmann
85d65a2fd2
create idx_place_interpolations for import already
...
It is needed to look up if a node is part of an interpolation.
Fixes #2608 .
2022-02-18 11:11:22 +01:00
Sarah Hoffmann
cd9b0c9a20
Merge pull request #2603 from lonvia/one-step-housenumber-search
...
One step housenumber search
2022-02-10 17:27:56 +01:00
Sarah Hoffmann
0e11ca9b76
add test that interpolations are found by odd/even
2022-02-10 11:23:51 +01:00
Sarah Hoffmann
fd38dd02ce
make sure step is taken into account for interpolations
2022-02-09 21:42:28 +01:00
Sarah Hoffmann
474418f03c
include houseumber search in name query
...
The name query already looks for the existence of housenumbers and
may as well retrive them. Saves up to threee additional lookups.
It also means that we can lift the restriction on looking
for existance of housenumbers for simple queries only.
2022-02-08 22:35:12 +01:00
Sarah Hoffmann
6b9fea6f1a
disable debug message in interpolation processing
2022-02-07 23:30:25 +01:00
Sarah Hoffmann
02894ca4a4
Merge pull request #2602 from lonvia/filter-bad-housenumbers
...
Handle mistagged housenumbers like names
2022-02-07 16:27:04 +01:00
Sarah Hoffmann
7d19209fa1
liniting: disable too-many-ancestors
...
This is triggered by UserDict which is meant of deriving.
2022-02-07 11:49:18 +01:00
Sarah Hoffmann
a6b4e8ff67
add tests for housenumber-as-name feature
2022-02-07 11:45:12 +01:00
Sarah Hoffmann
38c3ef3da0
add tests for get_string_list()
...
Renaming test file for sanitizer config because pytest requires
unique names for test files.
2022-02-07 11:22:24 +01:00
Sarah Hoffmann
610f2cc254
sanitizer: move helpers into a configuration class
2022-02-07 10:48:00 +01:00
Sarah Hoffmann
a79a3210e6
implement is-a-name option for housenumbers
2022-02-07 09:27:11 +01:00
Sarah Hoffmann
39ede26b5c
Merge pull request #2598 from geofabrik/doc-update-systemd-timer
...
Document how to set up systemd timers for --once updates
2022-02-06 10:24:48 +01:00
Sarah Hoffmann
c3f206733f
really remove CentOS from CI
2022-02-05 16:07:12 +01:00
Sarah Hoffmann
69481d1590
remove CentOS from CI
...
The CentOS docker image no longer works after CentOS8 went EOL.
See #2601 for discussion.
2022-02-05 15:14:47 +01:00
Sarah Hoffmann
6877668cab
Merge pull request #2599 from StephanGeorg/patch-1
...
Fixed link
2022-02-03 09:45:59 +01:00
Stephan Georg
dc520bd156
Fixed link
2022-02-03 09:39:03 +01:00
Amanda McCann
bc4a343502
Document how to set up systemd timers for --once updates
2022-02-01 17:01:45 +01:00
Sarah Hoffmann
fbc8884693
restrict change propagation to interpolation lines
...
Also means that Postgresql will use the right index for the query.
2022-01-28 11:05:37 +01:00
Sarah Hoffmann
c50c534d19
Merge pull request #2597 from lonvia/reorganise-interpolations
...
Reorganise interpolation code
2022-01-28 08:40:08 +01:00
Sarah Hoffmann
45627b485f
Merge pull request #2596 from lonvia/remove-codecov
...
Remove codecov
2022-01-27 17:11:17 +01:00
Sarah Hoffmann
b6fa121f53
remove tests for closest housenumber function
2022-01-27 16:21:45 +01:00
Sarah Hoffmann
9b31ffaa9f
php unit tests don't work on ubuntu 18
2022-01-27 15:18:23 +01:00
Sarah Hoffmann
39e300640e
remove codecov
...
Causes more trouble than doing good.
2022-01-27 15:17:33 +01:00
Sarah Hoffmann
2ffc1537e7
raise PostgreSQL requirement to 9.6
...
The new code uses the open-ended array notation which is only
available sind psql 9.6.
2022-01-27 15:15:56 +01:00
Sarah Hoffmann
64abc90d30
use new tiger step column for queries
2022-01-27 14:08:08 +01:00
Sarah Hoffmann
788505095e
add step column to tiger data table
...
This replaces the interpolationtype column.
2022-01-27 11:54:12 +01:00
Sarah Hoffmann
98432395c3
add migration for upcoming change to tiger tables
2022-01-27 11:48:27 +01:00
Sarah Hoffmann
6b89624f33
adapt frontend to new interpolation table layout
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
4b28b4fed4
adapt BDD tests for new interpolation style
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
fea4dbba50
inherit tags from interpolation not parent
...
Nodes on an interpolation now only get the address tags of
interpolations and then compute their own parent from that. They no
longer inherit the parent directly.
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
83d2c440d5
add migration for new interpolation table layout
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
e6d855b954
add migration for new lookup index
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
9f64c34f1a
optimize indexes for interpolation lines
...
Do not index 'inactive' rows (with startnumber is null) where possible.
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
638ed15ada
improve handling von updates on nodes in interpolations
...
Use the same update mechanism as for updates on the interpolations
themselves. Updates must solely happen in place_insert as this is
the place where actual changes of the data happen.
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
c0d8b95f67
update interpolations instead of deleting and recreating
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
c65938d53c
Merge pull request #2595 from nslxndr/fix-doc-typos
...
Fix typos in UI doc
2022-01-26 23:08:41 +01:00
Sandor Nagy
2e3f3a55f1
Fix typos in UI doc
2022-01-26 21:39:20 +01:00
Sarah Hoffmann
cdd0f78bc6
Merge pull request #2594 from lonvia/update-osm2pgsql
...
Update to osm2pgsql 1.6.0
2022-01-25 12:11:57 +01:00
Sarah Hoffmann
9fac20ceef
update to osm2pgsql 1.6.0
2022-01-24 16:55:52 +01:00
Sarah Hoffmann
38bd08d25f
Merge pull request #2591 from lonvia/cleanup-place-insert
...
Reorganise code of place_insert() trigger
2022-01-24 15:58:23 +01:00
Sarah Hoffmann
b44493e7f2
reorganise place_insert trigger
...
Code cleanup and formatting as well as minor improvements, in
particular removal of unnecessary code.
2022-01-24 09:12:50 +01:00
Sarah Hoffmann
f6ec8d2e33
Merge pull request #2589 from lonvia/clean-housenumbers
...
Add command for cleaning up word table
2022-01-21 10:17:58 +01:00
Sarah Hoffmann
c170d323d9
add tests for cleaning housenumbers
2022-01-20 23:47:20 +01:00
Sarah Hoffmann
3ce123ab69
do not clean housenumbers in reverse-only mode
2022-01-20 20:21:13 +01:00
Sarah Hoffmann
d8b7a51ab6
add actual removal of housenumber tokens
2022-01-20 20:18:15 +01:00
Sarah Hoffmann
344a2bfc1a
add new command for cleaning word tokens
...
Just pulls outdated housenumbers for the moment.
2022-01-20 20:05:15 +01:00
Sarah Hoffmann
86588419fb
Merge pull request #2588 from lonvia/housenumber-sanitizer
...
Move housenumber parsing into sanitizer
2022-01-20 17:44:24 +01:00
Sarah Hoffmann
d09db09849
adapt ICU tets to new housenumber sanitizer
...
Restrict tests to making sure that handing in multiple housenumbers
works.
2022-01-20 16:05:49 +01:00
Sarah Hoffmann
1e5a8561c0
fix linting issues
2022-01-20 16:00:23 +01:00
Sarah Hoffmann
f3c9578bca
complete documentation for new clean-houseunubmers sanatizer
2022-01-20 15:49:32 +01:00
Sarah Hoffmann
3741afa6dc
generalize filter-kind parameter for sanatizers
...
Now behaves the same for tag_analyzer_by_language and
clean_housenumbers. Adds tests.
2022-01-20 15:42:42 +01:00
Sarah Hoffmann
560a006892
add pytest config
...
We are using custom marks now which need to be registered to avoid
warnings.
2022-01-20 15:38:02 +01:00
Sarah Hoffmann
4774e45218
clean_housenumbers: make kinds and delimiters configurable
...
Also adds unit tests for various options.
2022-01-20 12:07:12 +01:00
Sarah Hoffmann
206ee87188
factor out housenumber splitting into sanitizer
2022-01-19 17:27:50 +01:00
Sarah Hoffmann
a7e048484b
Merge pull request #2585 from lonvia/name-mutations
...
Introduce character mutations to token analysis
2022-01-19 17:09:36 +01:00
Sarah Hoffmann
d6b5f2f5da
docs: add pointer to caddy deployment discussion
2022-01-19 15:28:01 +01:00
Sarah Hoffmann
3df560ea38
fix linting error
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
adbaf700cd
move parsing of mutation config to setup phase
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
4a41bff3ab
add documentation for new mutation feature
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
b453b0ea95
introduce mutation variants to generic token analyser
...
Mutations are regular-expression-based replacements that are applied
after variants have been computed. They are meant to be used for
variations on character level.
Add spelling variations for German umlauts.
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
0192a7af96
move variant configuration reading in separate file
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
630ad38a67
refactor variant production to use generators
2022-01-18 11:09:21 +01:00
Sarah Hoffmann
21156fc2a2
Merge pull request #2578 from lonvia/iso-3166-2
...
Make ISO3166-2 references searchable
2022-01-13 14:54:35 +01:00
Sarah Hoffmann
fa99f5bc03
Merge pull request #2579 from geofabrik/doc-update-typo
...
Fix typo in name of service. The rest of the docs call it nominatim-updateS
2022-01-13 14:01:57 +01:00
Amanda McCann
09aa1e7af4
Fix typo in name of service. The rest of the docs call it nominatim-updateS
2022-01-13 13:14:17 +01:00
Sarah Hoffmann
2034ed387b
make ISO3166-2 references searchable
2022-01-13 09:44:42 +01:00
Sarah Hoffmann
d6140d6d54
Merge pull request #2571 from lonvia/ukrainian-apostrophe
...
Consider "modifier letter apostrophe" to be punctuation
2022-01-11 09:41:07 +01:00
Sarah Hoffmann
fb54bd3fcf
consider "modifier letter apostrophe" to be punctuation
...
While technically being a letter, the apostrophe is often replaced
with a normal apostrophe in writing which is a punctuation mark.
This makes sure that the modifier letter apostrophe yields the same
normalization results and thus is really interchangable.
Only has an effect after the next reimport.
Fixes #2569 .
2022-01-10 17:40:03 +01:00
Sarah Hoffmann
a486ee347a
Merge pull request #2570 from woodpeck/patch-3
...
Fix typos
2022-01-10 14:21:48 +01:00
Frederik Ramm
5fb3582b31
Fix typos
2022-01-10 13:38:53 +01:00
Sarah Hoffmann
8b0b9db31e
Merge pull request #2565 from lonvia/swap-wordset-order
...
Swap order of query interpretation
2022-01-06 09:02:46 +01:00
Sarah Hoffmann
f9889f81d6
swap order of query interpretation
...
A forward interpretation of the form 'street, city, country' is
much more frequent than the reverse form 'country, city, street'.
Thus swap the order of interpretations that the forward order comes
first.
2022-01-05 15:21:14 +01:00
Sarah Hoffmann
efafa52719
Merge pull request #2562 from lonvia/copyright-headers
...
Add consistent copyright headers
2022-01-04 23:10:37 +01:00
Micah David Cochran
8bda59fbe7
made collect_os_info script in Python
2022-01-03 14:57:01 -06:00
Sarah Hoffmann
c3788d765e
add consistent SPDX copyright headers
2022-01-03 16:23:58 +01:00
Sarah Hoffmann
e407558f76
Merge pull request #2559 from lonvia/disable-jit-in-queries
...
Disable JIT and parallel workers on search frontend
2022-01-03 15:13:57 +01:00
Sarah Hoffmann
042df4198a
disable JIT and parallel workers on search frontend
...
Bad query planning now also interferes with queries for search and
reverse.
2021-12-22 10:47:54 +01:00
Sarah Hoffmann
ab6f35d83a
Merge pull request #2553 from lonvia/revert-street-matching-to-full-names
...
Revert street matching to full names
2021-12-14 15:52:34 +01:00
Micah David Cochran
f20d85738f
add utils/collect_os_info.sh script
2021-12-13 11:26:09 -06:00
Sarah Hoffmann
f9b56a8581
correctly match abbreviated addr:street
...
This only works when addr:street is abbreviated and the street
name isn't. It does not work the other way around.
2021-12-08 21:58:43 +01:00
Sarah Hoffmann
fedc8ed474
Merge pull request #2542 from lonvia/update-phpunit
...
Update PHPUnit use to 9.5
2021-12-07 15:44:45 +01:00
Sarah Hoffmann
79aeb31088
restrict PHPUnit to 9.5 version
...
There are so many breaking changes with PHPUnit that it is
impossible to give any other guarantees.
2021-12-07 14:49:31 +01:00
Sarah Hoffmann
04857d32cd
enable PHPUnit 9 for coverage
...
A couple of functions have been renamed.
2021-12-07 12:07:17 +01:00
Sarah Hoffmann
109cdce92c
php unit: replace deprecated regex assert
...
The regEx assertion has been renamed in PHPUnit 9.5
and causes deprecation warnings.
2021-12-07 11:34:21 +01:00
Sarah Hoffmann
b7554d9ed8
php unit: don't enforce a name on the test database
...
Also gets rid of a PHPUnit deprecation warning.
2021-12-07 11:31:45 +01:00
Sarah Hoffmann
6106f1a32e
php test: class must be called like the file
2021-12-07 11:20:38 +01:00
Sarah Hoffmann
f2a8307bb6
disable codecov
...
Not working.
2021-12-07 11:13:30 +01:00
Sarah Hoffmann
470ee7aef9
Merge pull request #2540 from lonvia/remove-support-for-centos7
...
Remove installation instructions for CentOS 7
2021-12-07 09:17:29 +01:00
Sarah Hoffmann
aefca48e78
remove installation instructions for CentOS 7
...
This ends official support for CentOS 7.
2021-12-06 16:05:27 +01:00
Sarah Hoffmann
5e792078b3
remove some odd varaints of addr:street from the styles
...
Some import has added names in partial tags which confuse the
street name matching.
2021-12-06 15:17:00 +01:00
Sarah Hoffmann
7f7d2fd5b3
skip most addr: tags with suffixes
...
Only one addr: tag can be processed currently, so make
sure it is the one without suffixes to not get odd data.
addr:street is the exception because it uses a different
matching mechanism.
2021-12-06 14:55:10 +01:00
Sarah Hoffmann
5e435b41ba
ICU: matching any street name will do again
2021-12-06 14:26:08 +01:00
Sarah Hoffmann
44cfce1ca4
revert to using full names for street name matching
...
Using partial names turned out to not work well because there are
often similarly named streets next to each other. It also
prevents us from being able to take into account all addr:street:*
tags.
This change gets all the full term tokens for the addr:street tags
from the DB. As they are used for matching only, we can assume that
the term must already be there or there will be no match. This
avoid creating unused full name tags.
2021-12-06 11:38:38 +01:00
Sarah Hoffmann
bb175cc958
Merge pull request #2539 from lonvia/clean-up-python-tests
...
Restructure and extend python unit tests
2021-12-03 17:08:25 +01:00
Sarah Hoffmann
5a9fb6eaf7
specify text type in test SQL
...
Older version of postgres fail otherwise.
2021-12-03 13:56:23 +01:00
Sarah Hoffmann
54d35ddfe9
split cli tests by subcommand and extend coverage
2021-12-02 23:45:48 +01:00
Sarah Hoffmann
7beccb7997
remove unnecessary pass statements
2021-12-02 15:54:24 +01:00
Sarah Hoffmann
14a78f55cd
more unit tests for tokenizers
2021-12-02 15:46:36 +01:00
Sarah Hoffmann
7617a9316e
extend API unit tests
2021-12-01 20:48:29 +01:00
Sarah Hoffmann
a52ed366e4
add tests for migration
2021-12-01 20:27:40 +01:00
Sarah Hoffmann
7be164e2a5
more testing for refresh functions
2021-12-01 14:58:54 +01:00
Sarah Hoffmann
a24f25c0d8
more tests for exec utilities
2021-12-01 14:23:51 +01:00
Sarah Hoffmann
993b238a41
add more tests for database import
2021-12-01 11:54:58 +01:00
Sarah Hoffmann
bbbfc8201c
add tests for adding additional data
...
Also adds checks that parameters for osm2pgsql are set
as expected.
2021-12-01 11:22:46 +01:00
Sarah Hoffmann
6f03a4d6ce
add tests for flatten_config_file and other than yaml formats
2021-12-01 10:24:11 +01:00
Sarah Hoffmann
c8958a22d2
tests: add fixture for making test project directory
2021-11-30 18:01:46 +01:00
Sarah Hoffmann
37afa2180b
generalize fixtures for cli tests
2021-11-30 14:07:39 +01:00
Sarah Hoffmann
b2df8e478a
python test: move single-use fixtures to subdirectories
2021-11-30 12:03:16 +01:00
Sarah Hoffmann
50fccb52be
remove unused test files
2021-11-30 11:44:10 +01:00
Sarah Hoffmann
b90e719da5
organise python tests in subdirectories
...
The directories follow the same structure as the modules in
nominatim/.
2021-11-30 11:22:26 +01:00
Sarah Hoffmann
97f1723181
Merge pull request #2530 from lonvia/declassify-highway
...
Change default rank for highway objects to 30
2021-11-25 08:41:25 +01:00
Sarah Hoffmann
80e0a3cce4
change default rank for highway objects to 30
...
The highway key is being used more and more for non-ways these
days. This clashes with Nominatim's assumption that essentially
everything that has a highway tag can be used as the street part
of the address.
Change the default rank of highway objects to 30 to avoid this.
Only the known values for streets keep the rank 26 and are now
listed explicitly.
2021-11-24 22:10:40 +01:00
Sarah Hoffmann
79effae933
Merge pull request #2529 from lonvia/sort-street-results-by-tiger-housenumber
...
Take tiger housenumber into account when ranking street results
2021-11-24 16:23:41 +01:00
Sarah Hoffmann
810056349f
add migration for inclusive housenumber Tiger index
2021-11-24 12:03:20 +01:00
Sarah Hoffmann
b1d490ea53
add index for Tiger housenumber queries
2021-11-24 11:10:20 +01:00
Sarah Hoffmann
345637290b
take Tiger housenumbers into account when ranking street results
...
Queries with a housenumber need to rank streets higher that
have the requested housenumber attached. We already do that for
ordinary housenumber objects and for interpolations. This
adds support for Tiger housenumbers as well.
Fixes #2501 .
2021-11-24 11:10:20 +01:00
Sarah Hoffmann
9628df3031
Merge pull request #2528 from lonvia/allow-french-extra-housenumbers
...
Don't penalize French 'bis' housenumbers
2021-11-21 10:53:20 +01:00
Sarah Hoffmann
423f338d04
Merge pull request #2526 from lonvia/docs-moving-database
...
Add a section about moving the database to another machine
2021-11-19 21:14:53 +01:00
Sarah Hoffmann
3a2597e5c4
don't penalize French 'bis' housenumbers
...
House numbers of the form '9 bis' are usual in France. So
be a bit more lenient before adding penalties to house numbers
with letters in them.
Fixes #2527 .
2021-11-19 21:12:17 +01:00
Sarah Hoffmann
641f261495
Merge pull request #2525 from lonvia/fix-replication-indexer
...
Fix instantiation of indexer for replication
2021-11-19 16:16:30 +01:00
Sarah Hoffmann
5884a6e7a6
add a section about moving the database to another machine
2021-11-19 16:11:32 +01:00
Sarah Hoffmann
10e979e841
only instantiate indexer once for replication
...
Also makes sure that indexer object exists everywhere were needed.
See #2518 .
2021-11-19 14:48:58 +01:00
Sarah Hoffmann
8dc1441635
Merge pull request #2517 from lonvia/transliteration-special-chars
...
ICU: avoid non-alphanumerical characters in transliteration
2021-11-11 07:42:42 +01:00
Sarah Hoffmann
c79dcfad9a
make sure housenumbers are properly quoted
2021-11-10 20:44:28 +01:00
Sarah Hoffmann
1886952666
avoid special characters in word tokens
...
Transliteration should only consist of ASCII letters
and numbers. Avoid any other characters.
2021-11-10 17:14:13 +01:00
Sarah Hoffmann
7326b246b7
Merge pull request #2516 from lonvia/test-for-website-dir
...
Better error reporting when API script does not exist
2021-11-10 13:27:09 +01:00
Sarah Hoffmann
345c812e43
better error reporting when API script does not exist
...
Check if the API script exists on the expected location before
running php-cli. This way we can add a useful hint about the
project directory.
Fixes #2513 .
2021-11-10 11:58:20 +01:00
Sarah Hoffmann
fd4ba3989e
Merge pull request #2511 from lonvia/fix-combination-error-needs-address
...
Fix boolean combination of NeedsAddress flag
2021-11-06 12:11:55 +01:00
Sarah Hoffmann
e2d2571ad0
fix combination of NeedsAddress flag
...
When dealing with multiple partial terms, only keep the
flag, when all partial terms are so frequent as to need
an address.
Fixes #2510 .
2021-11-05 22:18:37 +01:00
Sarah Hoffmann
d479a0585d
prepare release 4.0.0
2021-11-02 20:27:55 +01:00
Sarah Hoffmann
addfae31b6
fix typo
2021-11-02 11:09:17 +01:00
Sarah Hoffmann
ccf61db726
Merge pull request #2502 from lonvia/improve-development-documentation
...
Extend developer's documentation
2021-11-01 16:12:23 +01:00
Sarah Hoffmann
5b86b2078a
docs: add overview over indexing
2021-11-01 11:04:03 +01:00
Sarah Hoffmann
a069479340
docs: section about database layout
...
Replaces the import description which basically was
table layout only now.
2021-10-29 12:03:22 +02:00
Sarah Hoffmann
d11bf9288e
Merge pull request #2498 from lonvia/ordering-for-unlisted-place-results
...
Include unlisted places in ordering by housenumber
2021-10-28 15:28:47 +02:00
Sarah Hoffmann
86eeb4d2ed
Merge pull request #2497 from lonvia/docs-maintenance
...
docs: add new maintenance section
2021-10-28 11:33:34 +02:00
Sarah Hoffmann
2275fe59ab
include unlisted places in ordering by housenumber
...
When ordering results by the fact that they have a housenumber,
also take cases into account where the housenumber is on the
place itself. This may happen when the search includes the name
of the place and the housenumber or for addr:place addresses
where the place is unlisted.
2021-10-28 11:27:31 +02:00
Sarah Hoffmann
48be8c33ba
docs: add new maintenance section
...
currently used for postcode updates, word count updates and
deleted relations.
2021-10-28 09:22:37 +02:00
Sarah Hoffmann
d3d07128b2
Merge pull request #2495 from lonvia/fix-normalization-in-php
...
ICU: use correct normalization during search
2021-10-27 14:40:42 +02:00
Sarah Hoffmann
37eeccbf4c
ICU: use normalization from config in PHP
...
The TERM_NORMALIZATION config option is no longer applicable.
That was already documented but not yet implemented.
2021-10-27 11:32:44 +02:00
Sarah Hoffmann
1722fc537f
bdd: add tests for non-latin scripts
2021-10-26 17:29:03 +02:00
Sarah Hoffmann
b240b182cb
Merge pull request #2493 from lonvia/handle-frequent-partials
...
Tune search queries with frequent partial words
2021-10-26 17:00:43 +02:00
Sarah Hoffmann
c0f347fc8c
adapt BDD tests to stricter partial search
2021-10-26 15:52:57 +02:00
Sarah Hoffmann
53dbe58ada
do not count words when in reverse-only mode
2021-10-26 12:00:13 +02:00
Sarah Hoffmann
2c4b798f9b
further refactor setup to keep function small
2021-10-26 12:00:13 +02:00
Sarah Hoffmann
1cf14a8e94
searches for house numbers must have an address
2021-10-26 12:00:13 +02:00
Sarah Hoffmann
4864bf1509
disallow search for partials without address
...
Very frequent partial terms take too long to look up and
do not return any valuable results unless the search is
further narrowed down by an address.
2021-10-26 12:00:13 +02:00
Sarah Hoffmann
9934421442
make word count computation part of the import
...
Accurate word counts are now essential when using
the ICU tokenizer and don't hurt for the legacy one.
Adds about an hour import time.
2021-10-26 12:00:13 +02:00
Sarah Hoffmann
d7267c1603
actions: move ICU tests into its own run
2021-10-26 11:59:13 +02:00
Sarah Hoffmann
5c778c6d32
Merge pull request #2486 from lonvia/fix-special-phrases
...
Fix parsing of operator in special phrases
2021-10-25 21:45:08 +02:00
Sarah Hoffmann
85797acf1e
ICU: add an index over word_ids
...
Needed for keyword lookup in the details response.
2021-10-25 21:33:27 +02:00
Sarah Hoffmann
c4f5c11a4e
be case-insensitve about special phrase operator
2021-10-25 19:51:20 +02:00
Sarah Hoffmann
5a1c3dbea3
fix parsing of operator in special phrases
...
Because of unstripped input, the operators wouldn't match.
2021-10-25 19:46:30 +02:00
Sarah Hoffmann
8e439d3dd9
Merge pull request #2484 from lonvia/fix-index-use
...
Reverse: add index hints
2021-10-25 17:20:42 +02:00
Sarah Hoffmann
9ebf921c53
Merge pull request #2483 from lonvia/fix-warming
...
Fix warming for ICU tokenizer
2021-10-25 16:21:36 +02:00
Sarah Hoffmann
7bd9094aaa
reverse: add index hints
...
The fairly complex where condition of idx_placex_geometry_placenode
won't always be matched by the query planner if the condition
part doesn't appear verbatim in the query.
Fixes #2480 .
2021-10-25 15:01:03 +02:00
Sarah Hoffmann
16cc395f78
fix warming for ICU tokenizer
...
Running the warm-up search requests requires querying
the most frequent words. This must be done via the tokenizer
to honor the different formats of the word table.
2021-10-25 13:08:16 +02:00
Sarah Hoffmann
13e7398566
allow relative paths for log files
2021-10-25 10:26:05 +02:00
Sarah Hoffmann
8b90ee4364
Merge pull request #2476 from lonvia/harmonize-configuration-file-settings
...
Standardize handling of file names in configuration values
2021-10-24 10:57:48 +02:00
Sarah Hoffmann
1098ab732f
allow relative paths for flatnode file
2021-10-22 17:32:51 +02:00
Sarah Hoffmann
507fdd4f40
switch IMPORT_STYLE to use generic file search
...
Allows relative paths wrt project directory.
2021-10-22 16:49:57 +02:00
Sarah Hoffmann
0ae8d7ac08
have ADDRESS_LEVEL_CONFIG use load_sub_configuration
...
This means that relative paths now are looked up in the
project directory.
2021-10-22 16:36:52 +02:00
Sarah Hoffmann
c77df2d1eb
replace NOMINATIM_PHRASE_CONFIG with command line option
2021-10-22 14:41:14 +02:00
Sarah Hoffmann
cefae021db
doc: clarify relative paths for tokenizer config
2021-10-21 16:38:06 +02:00
Sarah Hoffmann
771aee8cd8
Merge pull request #2475 from lonvia/catchup-mode
...
Add catch-up mode to replication and extend documentation for updating
2021-10-21 16:21:58 +02:00
Sarah Hoffmann
2d13d8b3b6
extend documentation for updating database
...
Explains the different modes and adds hints for
setting up a systemd job.
2021-10-21 12:14:47 +02:00
Sarah Hoffmann
c1fa70639b
add new replication mode catch-up
...
This mode gets updates until the server reports no new diffs
anymore.
Also adds additional indexing, when the main indexing step left
a couple of objects to process. This happens only when the
next update is expected to be more than 40min away.
2021-10-20 22:05:15 +02:00
Sarah Hoffmann
12643c5986
run Tiger import with parallel threads per default
2021-10-19 15:00:26 +02:00
Sarah Hoffmann
a0f5613a23
Merge pull request #2472 from lonvia/word-count-computation
...
Fix word count computation for ICU tokenizer
2021-10-19 14:58:57 +02:00
Sarah Hoffmann
824562357b
adapt tests for new word count mechanism
2021-10-19 12:03:48 +02:00
Sarah Hoffmann
ec7184c533
icu: no longer precompute terms
...
The ICU analyzer no longer drops frequent partials, so it is no
longer necessary to know the frequencies in advance.
2021-10-19 11:52:28 +02:00
Sarah Hoffmann
e8e2502e2f
make word recount a tokenizer-specific function
2021-10-19 11:21:16 +02:00
Sarah Hoffmann
c86cfefc48
Merge pull request #2471 from lonvia/update-install-rules
...
Reorganise, update and extend documentation
2021-10-19 09:11:16 +02:00
Sarah Hoffmann
2635fe8b4c
docs: fix more links
2021-10-18 17:26:14 +02:00
Sarah Hoffmann
632436d54d
docs: refer to our new Settings chapter in the import instruchtions
2021-10-18 17:02:52 +02:00
Sarah Hoffmann
74be6828dd
check and fix all liks in documentation
2021-10-18 16:53:24 +02:00
Sarah Hoffmann
f4acfed48f
add extended documentation of settings
2021-10-18 16:30:52 +02:00
Sarah Hoffmann
91e1c1bea8
docs: update overview pages
2021-10-18 09:04:06 +02:00
Sarah Hoffmann
bbb9a41ea4
docs: move place ranking into customization part
2021-10-18 09:04:06 +02:00
Sarah Hoffmann
f6418887b2
docs: nominatim-ui has a new place for custom config
2021-10-18 09:04:06 +02:00
Sarah Hoffmann
a3f8a097a1
docs: move import style description to customize section
2021-10-18 09:04:06 +02:00
Sarah Hoffmann
751563644f
docs: make customization chapter a separate section
2021-10-18 09:04:01 +02:00
Sarah Hoffmann
e52b801cd0
fix typo
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
445a6428a6
docs: remove the development warning for ICU tokenizer
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
d59b26dad7
docs: add a warning about using --no-updates with TIGER data
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
47417d1871
update and extend man page
...
Provide extended descriptions for most subcommands.
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
381aecb952
rename manual directory to man
...
Avoids confusion between 'docs' and 'manual'.
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
45344575c6
add munin scipts and ICU subrules to installation
2021-10-18 09:03:07 +02:00
Sarah Hoffmann
83381625bd
Merge pull request #2469 from lonvia/fix-tablespace-assignment
...
Fix template expressions for tablespaces
2021-10-15 18:20:43 +02:00
Sarah Hoffmann
552fb16cb2
fix template expressions for tablespaces
2021-10-15 15:11:09 +02:00
Sarah Hoffmann
75c631f080
Merge pull request #2450 from mtmail/tiger-data-2021
...
US TIGER data 2021 released
2021-10-11 19:22:15 +02:00
Sarah Hoffmann
e2464fdf62
Merge pull request #2465 from lonvia/use-spgist-index
...
Use SP-GIST for building index
2021-10-11 10:48:44 +02:00
Sarah Hoffmann
9ff98073db
remove outdated country_languages.php
2021-10-10 21:58:43 +02:00
Sarah Hoffmann
98ee5def37
add recommendation for Postgis 3+
2021-10-10 21:55:38 +02:00
Sarah Hoffmann
3649487f5e
use SP-GIST index for building index where available
...
Point-in-polygon queries are much faster with a SP-GIST geometry
index, so use that for the index used to check if a housenumber
is inside a building.
Only available with Postgis 3. There is an automatic fallback to
GIST for Postgis 2.
2021-10-10 21:55:38 +02:00
Sarah Hoffmann
4b007ae740
Merge pull request #2460 from lonvia/multiple-analyzers
...
Add support for multiple token analyzers
2021-10-09 14:41:09 +02:00
Sarah Hoffmann
6c79a60e19
add documentation for new configuration of ICU tokenizer
2021-10-07 11:55:53 +02:00
Sarah Hoffmann
2a94bfc703
fix argument description for check_database
2021-10-07 09:49:13 +02:00
Sarah Hoffmann
299934fd2a
reorganize and complete tests around generic token analysis
2021-10-06 17:03:37 +02:00
Sarah Hoffmann
b18d042832
add tests for sanitizer tagging language
2021-10-06 12:29:25 +02:00
Sarah Hoffmann
97a10ec218
apply variants by languages
...
Adds a tagger for names by language so that the analyzer of that
language is used. Thus variants are now only applied to names
in the specific language and only tag name tags, no longer to
reference-like tags.
2021-10-06 11:09:54 +02:00
Sarah Hoffmann
d35400a7d7
use analyser provided in the 'analyzer' property
...
Implements per-name choice of analyzer. If a non-default
analyzer is choosen, then the 'word' identifier is extended
with the name of the ana;yzer, so that we still have unique
items.
2021-10-05 14:10:32 +02:00
Sarah Hoffmann
92f6ec2328
remove support for properties on variants
...
Those are not going to be used in the near future, so no need to
carry that code around just now.
2021-10-05 10:29:36 +02:00
Sarah Hoffmann
9ba2019470
precompute replacements while loading configuration
2021-10-05 10:20:08 +02:00
Sarah Hoffmann
c171d88194
move parsing of token analysis config to analyzer
...
Adds a second callback for the analyzer which is responsible
for parsing the configuration rules and converting it to
whatever format necessary. This way, each analyzer implementation
can define its own configuration rules.
2021-10-04 18:31:58 +02:00
Sarah Hoffmann
7cfcbacfc7
make token analyzers configurable modules
...
Adds a mandatory section 'analyzer' to the token-analysis entries
which define, which analyser to use. Currently there is exactly
one, generic, which implements the former ICUNameProcessor.
2021-10-04 17:37:34 +02:00
Sarah Hoffmann
52847b61a3
extend ICU config to accomodate multiple analysers
...
Adds parsing of multiple variant lists from the configuration.
Every entry except one must have a unique 'id' paramter to
distinguish the entries. The entry without id is considered
the default. Currently only the list without an id is used
for analysis.
2021-10-04 16:40:28 +02:00
Sarah Hoffmann
5a36559834
move flatten_config_list into config module
...
For general usage by other modules.
2021-10-04 11:56:54 +02:00
Sarah Hoffmann
19d4e047f6
Merge pull request #2458 from lonvia/add-tokenizer-preprocessing
...
Add a "sanitation" step for name and address tags before token processing
2021-10-01 21:53:34 +02:00
Sarah Hoffmann
6b348d43c6
replace test variable for PG env tests
...
'tty' was removed in PG14 and causes an error.
2021-10-01 12:27:24 +02:00
Sarah Hoffmann
732cd27d2e
add unit tests for new sanatizer functions
2021-10-01 12:27:24 +02:00
Sarah Hoffmann
8171fe4571
introduce sanitizer step before token analysis
...
Sanatizer functions allow to transform name and address tags before
they are handed to the tokenizer. Theses transformations are visible
only for the tokenizer and thus only have an influence on the
search terms and address match terms for a place.
Currently two sanitizers are implemented which are responsible for
splitting names with multiple values and removing bracket additions.
Both was previously hard-coded in the tokenizer.
2021-10-01 12:27:24 +02:00
Sarah Hoffmann
16daa57e47
unify ICUNameProcessorRules and ICURuleLoader
...
There is no need for the additional layer of indirection that
the ICUNameProcessorRules class adds. The ICURuleLoader can
fill the database properties directly.
2021-10-01 12:27:24 +02:00
Sarah Hoffmann
5e5addcdbf
fix typo
2021-09-29 14:16:09 +02:00
Sarah Hoffmann
be65c8303f
export more data for the tokenizer name preparation
...
Adds class, type, country and rank to the exported information
and removes the rather odd hack for countries. Whether a place
represents a country boundary can now be computed by the tokenizer.
2021-09-29 11:54:14 +02:00
Sarah Hoffmann
231250f2eb
add wrapper class for place data passed to tokenizer
...
This is mostly for convenience and documentation purposes.
2021-09-29 11:54:07 +02:00
Sarah Hoffmann
d44a428b74
Merge pull request #2455 from lonvia/adjust-address-levels-slovakia
...
Adjust address levels for boundaries in Slovakia
2021-09-28 11:21:08 +02:00
Sarah Hoffmann
40f9d52ad8
Merge pull request #2454 from lonvia/sort-out-token-assignment-in-sql
...
ICU tokenizer: switch match method to using partial terms
2021-09-28 09:45:15 +02:00
Sarah Hoffmann
7f3b05c179
adjust address levels for boundaries in Slovakia
...
Levels choosen according to OSM wiki. Mainly moves admin_level 6
to county level and admin_level 8 to city/town level. Higher
levels are adjusted accordingly.
Fixes #2453 .
2021-09-27 23:32:11 +02:00
Sarah Hoffmann
09c9fad6c3
adapt tests to new ICU address token handling
2021-09-27 17:36:23 +02:00
Sarah Hoffmann
bb18479d5b
remove unused parameter
2021-09-27 14:58:43 +02:00
Sarah Hoffmann
779ea8ac62
Merge pull request #2452 from lonvia/update-houses-on-street-name-change
...
Force update of surrounding houses when street or place name changes
2021-09-27 14:55:50 +02:00
Sarah Hoffmann
bd7c7ddad0
icu tokenizer: switch to matching against partial names
...
When matching address parts from addr:* tags against place names,
the address names where so far converted to full names and compared
those to the place names. This can become problematic with the new
ICU tokenizer once we introduce creation of different variants
depending on the place name context. It wouldn't be clear which
variant to produce to get a match, so we would have to create all of
them. To work around this issue, switch to using the partial terms
for matching. This introduces a larger fuzziness between matches but
that shouldn't be a problem because matching is always geographically
restricted.
The search terms created for address parts have a different problem:
they are already created before we even know if they are going to be
used. This can lead to spurious entries in the word table, which slows
down searching. This problem can also be circumvented by using only
partial terms for the search terms. In terms of searching that means
that the address terms would not get the full-word boost, but given
that the case where an address part does not exist as an OSM object
should be the exception, this is likely acceptable.
2021-09-27 11:36:19 +02:00
Sarah Hoffmann
c6fdcf9b0d
adapt documentation for SQL tokenizer interface
2021-09-27 11:36:19 +02:00
Sarah Hoffmann
59fe74ddf6
move name matching into tokenizer module
...
Instead of requesting the match tokens from the tokenizer
when looking for parent streets/places and address parts,
hand in the saved tokens and ask if they match. This gives
the tokenizer more freedom to decide how name matching
should be done.
2021-09-27 11:36:19 +02:00
Sarah Hoffmann
6d7c067461
force update on rank30 children when place name changes
...
Name changes may have an effect on parenting. Don't update
surrounding rank30 objects with addr:place tags as this is
potentially too expensive.
2021-09-27 11:04:17 +02:00
Sarah Hoffmann
316205e455
force update of surrounding houses when street name changes
...
When the street changes its name then this may cause changes
in the parenting of rank-30 objects with an addr:street
tag.
Fixes #2242 .
2021-09-27 10:22:41 +02:00
marc tobias
834ae0a93f
US TIGER data 2021 released
2021-09-25 00:05:17 +02:00
Sarah Hoffmann
d562f11298
slightly increase radius to look for postcodes
2021-09-24 23:56:42 +02:00
Sarah Hoffmann
972628c751
Merge pull request #2449 from lonvia/address-ranking-spain
...
Adjust address ranks for Spain
2021-09-24 22:48:21 +02:00
Sarah Hoffmann
09b1db63f4
adjust address ranks for Spain
...
Adjusts levels for boundaries according to the list on
https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative
* no admin_level 5, so drop that from addresses
* admin_level 6 has the province
* admin_level 7 has the county when it exists
Also reranks place=province so that it matches up with
admin_level 6 and introduces place=civil_parish which
is used as a place node for some admin_level=9 boundaries
in Galicia.
2021-09-24 18:39:44 +02:00
Sarah Hoffmann
e9d54f752c
Merge pull request #2447 from lonvia/fix-dynamic-address-assignment
...
Fix dynamic assignment of address parts
2021-09-19 15:57:28 +02:00
Sarah Hoffmann
c335025167
CI: install locale for CentOS
2021-09-19 13:49:11 +02:00
Sarah Hoffmann
2b2109c89a
Remove the installation warning
...
Installation has become a lot easier.
2021-09-19 13:01:32 +02:00
Sarah Hoffmann
56124546a6
fix dynamic assignment of address parts
...
A boolean check for dynamic changes of address parts is not
sufficient. The order of choice should be:
1. an addr:* part matches the name
2. the address part surrounds the object
3. the address part was declared as isaddress
The implementation uses a slightly different ordering
to avoid geometry checks unless strictly necessary (isaddress
is false and no matching address).
See #2446 .
2021-09-19 12:34:39 +02:00
Sarah Hoffmann
336258ecf8
Merge pull request #2440 from lonvia/generic-config-loader
...
Add generic loader for YAML configuration files
2021-09-04 17:41:15 +02:00
Sarah Hoffmann
b894d2c04a
fix indent
2021-09-04 10:30:35 +02:00
Sarah Hoffmann
8e1d4818ac
use yaml config loader for country info
2021-09-04 00:22:55 +02:00
Sarah Hoffmann
28c98584c1
add tests for generic YAML config reader
2021-09-03 22:31:30 +02:00
Sarah Hoffmann
1c42780bb5
introduce generic YAML config loader
...
Adds a function to the Configuration class to load a YAML
file. This means that searching for the file is generalised
and works the same now for all configuration files. Changes
the search logic, so that it is always possible to have a
custom version of the configuration file in the project
directory.
Move ICU tokenizer to use new load function.
2021-09-03 18:20:07 +02:00
Sarah Hoffmann
18554dfed7
Merge pull request #2437 from lonvia/tweak-ranking-searches
...
Some more tweaks for search interpretation
2021-09-03 14:16:23 +02:00
Sarah Hoffmann
2e493fec46
Merge pull request #2436 from lonvia/country-configuration
...
Move configuration of default languages into a configuration file
2021-09-03 08:55:36 +02:00
Sarah Hoffmann
98c2e08add
reduce penalty for special searches by name
...
Additional penalty for special terms with operator None
should only go to near searches. To reduce the number
of produced searches, restrict the none operator to
appear only in conjunction with the name.
2021-09-03 08:50:38 +02:00
Sarah Hoffmann
94d3dee369
further increase penalty on housenumbers without numbers
...
Make the penality dependent on the length of the token:
no penalty for one letter house numbers and increasing one
for more letters.
2021-09-02 18:11:49 +02:00
Sarah Hoffmann
7e7dd769fd
remove language and partition from name import
2021-09-02 14:41:11 +02:00
Sarah Hoffmann
79da96b369
read partition and languages from config file
2021-09-02 14:41:11 +02:00
Sarah Hoffmann
78fcabade8
move country name generation to country_info module
2021-09-02 14:41:11 +02:00
Sarah Hoffmann
284645f505
move generation of country tables in own module
2021-09-02 14:41:11 +02:00
Sarah Hoffmann
0b349761a8
add country configuration
...
The new configuration saves the default language(s) originally
maintained in the OSM wiki as well as the partition information.
2021-09-02 14:41:11 +02:00
Sarah Hoffmann
d18794931a
Merge pull request #2435 from lonvia/simplified-to-traditional-chinese
...
icu: normalise simplified to traditional chinese
2021-08-31 15:29:26 +02:00
Sarah Hoffmann
b7d4ff3201
icu: normalise simplified to traditional chinese
...
The conversion is unambigious in most cases, so that the
information loss is minimal.
2021-08-31 11:18:34 +02:00
Sarah Hoffmann
4c6d674e03
Merge pull request #2434 from lonvia/vagrant-scripts-in-actions
...
Test installation instructions via CI
2021-08-29 10:11:59 +02:00
Sarah Hoffmann
2c97af8021
CI: use packaged source also for test runs
2021-08-24 10:10:01 +02:00
Sarah Hoffmann
832f75a55e
CI: unify jobs for different vagrant scripts
2021-08-24 10:10:01 +02:00
Sarah Hoffmann
4e77969545
add workflow for centos 8
2021-08-24 10:10:01 +02:00
Sarah Hoffmann
6ebbbfee61
CI: use vagrant scripts for import tests
...
Use vanilla docker images of Ubuntu and leave the setup
to the vagrant scripts. Then do the usual import tests.
Also fixes a couple of issues found with the scripts
2021-08-24 10:10:01 +02:00
Sarah Hoffmann
0fabeefc3e
Merge pull request #2432 from Mastercuber/patch-1
...
Added postcode
2021-08-22 09:32:31 +02:00
Mastercuber
c70d72f06b
Added postcode
...
Added postcode to the list of addressdetails
2021-08-22 02:52:41 +02:00
Sarah Hoffmann
cc141bf1a5
Add link to fixthemap to issue template
2021-08-21 20:36:16 +02:00
Sarah Hoffmann
199532c802
Merge pull request #2429 from lonvia/place-name-to-admin-boundary
...
Indexing: move linking of places to the preparation stage
2021-08-21 10:21:39 +02:00
Sarah Hoffmann
28ee3d0949
move linking of places to the preparation stage
...
Linked places may bring in extra names. These names need to be
processed by the tokenizer. That means that the linking needs
to be done before the data is handed to the tokenizer. Move finding
the linked place into the preparation stage and update the name
fields. Everything else is still done in the indexing stage.
2021-08-20 22:44:17 +02:00
Sarah Hoffmann
925195725d
Merge pull request #2428 from lonvia/rename-icu-tokenizer
...
Rename legacy_icu tokenizer to icu tokenizer
2021-08-18 15:02:19 +02:00
Sarah Hoffmann
f6d22df76e
adapt CI workflow to new tokenizer name
2021-08-18 09:08:20 +02:00
Sarah Hoffmann
118858a55e
rename legacy_icu tokenizer to icu tokenizer
...
The new icu tokenizer is now no longer compatible with the old
legacy tokenizer in terms of data structures. Therefore there
is also no longer a need to refer to the legacy tokenizer in the
name.
2021-08-17 23:11:47 +02:00
Sarah Hoffmann
656c1291b1
Merge pull request #2427 from lonvia/remove-us-states-special-casing
...
Move US state hack into legacy tokenizer
2021-08-17 21:55:32 +02:00
Sarah Hoffmann
f00b8dd1c3
move special hack for US states to legacy tokenizer
...
The hack for IL, AL and LA is only needed because these abbreviations
are removed by the legacy tokenizer as a stop word. There is no need
to keep the hack for future tokenizers. Move it therefore to the
token extraction function.
2021-08-17 14:28:55 +02:00
Sarah Hoffmann
5f2b9e317a
add tests for US state hacks
...
IL, AS and LA are replaced with the US state in Geocode because
the old tokenizer would simply remove the abbreviations otherwise.
2021-08-17 10:49:07 +02:00
Sarah Hoffmann
4ae5ba7fc4
Merge pull request #2425 from lonvia/tokenizer-documentation
...
Introduce official Tokenizer API
2021-08-17 09:38:03 +02:00
Sarah Hoffmann
3656eed9ad
add mkdocstrings requirement for building docs
...
mkdocstrings also needs access to the Python sources, so set
a PYTHONPATH accordingly. This makes running mkdocs directly
a bit awkward, therefore add a `make serve-doc` target.
2021-08-16 11:51:49 +02:00
Sarah Hoffmann
2e82a6ce03
docs: extend explanation of query phrase
2021-08-16 11:51:49 +02:00
Sarah Hoffmann
c4b8a3b768
add documentation for PHP part of tokenizer
2021-08-16 11:51:49 +02:00
Sarah Hoffmann
1147b83b22
php: make word list a first-class object
...
This separates the logic of creating word sets from the Phrase
class. A tokenizer may now derived the word sets any way they
like. The SimpleWordList class provides a standard implementation
for splitting phrases on spaces.
2021-08-16 11:51:49 +02:00
Sarah Hoffmann
0fb8eade13
remove country restriction from tokenizer
...
Restricting tokens due to the search context is better done in
the generic search part instead of repeating the same test in
every tokenizer implementation.
2021-08-16 11:41:54 +02:00
Sarah Hoffmann
78d11fe628
document tokenizer SQL interface
2021-08-16 11:41:54 +02:00
Sarah Hoffmann
90b40fc3e6
define formal public Python interface for tokenizer
...
This introduces an abstract class for the Tokenizer/Analyzer
for documentation purposes.
2021-08-16 11:41:54 +02:00
Sarah Hoffmann
e25e268e2e
docs: querying and tokenizers
2021-08-16 08:59:44 +02:00
Sarah Hoffmann
68bff31cc9
docs: add developer doc page for Tokenizer
2021-08-16 08:58:56 +02:00
Sarah Hoffmann
31d9545702
Merge pull request #2424 from lonvia/multi-country-import
...
Update instructions for importing multiple regions
2021-08-16 08:48:28 +02:00
Sarah Hoffmann
e449071a35
Merge pull request #2423 from hummeltech/patch-1
...
Fix old paths for `phpcs` when using `make test`
2021-08-15 22:00:50 +02:00
Sarah Hoffmann
23e3724abb
ignore words without id for status
2021-08-15 21:59:36 +02:00
Sarah Hoffmann
75a5c7013f
split up large setup function
2021-08-15 12:24:13 +02:00
Sarah Hoffmann
56d24085f9
port multi-region update scripts to nominatim tool
...
Also updates the documentation. For the simple case of just
importing multiple regions, provide simplified instructions
that use the new multi-file import feature.
Fixes #2365 .
2021-08-14 23:55:48 +02:00
Sarah Hoffmann
95b82af42a
update osm2pgsql to 1.5.1
2021-08-14 22:46:35 +02:00
Sarah Hoffmann
87dedde5d6
allow multiple files for the import command
...
The files are forwarded to osm2pgsql which is now able to merge
them correctly.
2021-08-14 21:42:21 +02:00
David Hummel
8b6489c60e
Fix old paths for phpcs when using make test
...
These paths no longer exist since db3ced17bb , they are now all located under `lib-php`
2021-08-12 13:34:18 -07:00
Sarah Hoffmann
bf4f05fff3
Merge pull request #2413 from osm-search/helm-chart
...
Installation docs - link to Kubernetes install project
2021-08-08 11:09:36 +02:00
mtmail
b0aaa25f0d
Installation docs - link to Kubernetes install project
...
As reported by @robjuz in https://github.com/osm-search/Nominatim/discussions/2412
2021-08-03 12:02:35 +02:00
Sarah Hoffmann
c3ddc7579a
Merge pull request #2408 from lonvia/icu-change-word-table-layout
...
Change table layout of word table for ICU tokenizer
2021-07-28 14:28:49 +02:00
Sarah Hoffmann
fdff579188
php: force use of global Exception class
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
d48793c22c
fix Python linitin errors
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
001b2aa9f9
fix linitin issues in PHP
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
1db098c05d
reinstate word column in icu word table
...
Postgresql is very bad at creating statistics for jsonb
columns. The result is that the query planer tends to
use JIT for queries with a where over 'info' even when
there is an index.
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
324b1b5575
bdd tests: do not query word table directly
...
The BDD tests cannot make assumptions about the structure of the
word table anymore because it depends on the tokenizer. Use more
abstract descriptions instead that ask for specific kinds of
tokens.
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
e42878eeda
adapt unit test for new word table
...
Requires a second wrapper class for the word table with the new
layout. This class is interface-compatible, so that later when
the ICU tokenizer becomes the default, all tests that depend on
behaviour of the default tokenizer can be switched to the other
wrapper.
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
eb6814d74e
convert word info column to json before copying
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
6ad35aca4a
adapt special terms lookup to new word table
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
70f154be8b
switch word tokens to new word table layout
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
4342b28882
switch special phrases to new word table format
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
5394b1fa1b
switch postcode tokens to new word table layout
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
5ab0a63fd6
switch housenumber tokens to new word table layout
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
1618aba5f2
switch country name tokens to new word table layout
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
8377528952
new word table layout for icu tokenizer
...
The table now directly reflects the different token types.
Extra information is saved in a json structure that may be
dynamically extended in the future without affecting the
table layout.
2021-07-28 11:31:47 +02:00
Sarah Hoffmann
34dcf02dee
fix typos in tokenizer docs
2021-07-28 11:28:49 +02:00
Sarah Hoffmann
5d7d7f15d9
Merge pull request #2401 from lonvia/port-add-data-to-python
...
Port add-data functions from PHP to Python
2021-07-26 12:38:56 +02:00
Sarah Hoffmann
0c023fb4d2
adapt cli tests to Python port for add-data
2021-07-26 10:41:37 +02:00
Sarah Hoffmann
1bd068d42d
remove unused update script
2021-07-26 10:41:37 +02:00
Sarah Hoffmann
e42349c963
replace add-data function with native Python code
2021-07-26 10:41:37 +02:00
Sarah Hoffmann
878835e4bd
move add-data subcommand into a separate file
2021-07-25 18:14:12 +02:00
Sarah Hoffmann
8096a1d67f
fix parameters for TokenWord creation
2021-07-20 10:21:40 +02:00
Sarah Hoffmann
e16c5d5f70
Merge pull request #2397 from lonvia/increase-minimum-required-versions
...
Increase minimum required PostgreSQL version to 9.5
2021-07-19 14:28:02 +02:00
Sarah Hoffmann
2c8242c8df
remove special code for pre9.5 postgresql
...
9.5 is now the minimum requirement.
2021-07-19 10:24:57 +02:00
Sarah Hoffmann
e7d6f89aca
increase minimum version for PostgreSQL to 9.5
...
This is the minimum version we can test with the CI.
With 9.5 there is also complete support for jsonb available.
2021-07-19 10:21:19 +02:00
Sarah Hoffmann
379f5db516
require Python 3.6 also in CMakeFile
...
This had been forgotten when increasing the minimum Python version.
2021-07-19 10:14:14 +02:00
Sarah Hoffmann
ee32315378
Merge pull request #2396 from lonvia/partial-word-token
...
Reorganise code that build the SearchDescription
2021-07-19 09:42:37 +02:00
Sarah Hoffmann
cca912af4e
make all Token menbers private
2021-07-18 22:54:55 +02:00
Sarah Hoffmann
86ea077092
merge marking rare name with adding name token
...
Only name tokens can be rare, so this should be the same
function.
2021-07-18 16:52:37 +02:00
Sarah Hoffmann
5d6aabc457
add documentation for public interface of SearchDescription
2021-07-18 16:10:42 +02:00
Sarah Hoffmann
b14ce959d9
factor out check if a token fits current search
...
Saves allocating an empty array.
2021-07-17 22:01:35 +02:00
Sarah Hoffmann
a48ebd9b47
move SearchDescription building into tokens
...
Moving the logic for extending the SearchDescription into the
token classes splits up the code and makes it more readable.
More importantly: it allows tokenizer to define custom token
classes in the future.
2021-07-17 20:24:33 +02:00
Sarah Hoffmann
3cd85eaaf1
remove Token from explicit input for SearchDescription extension
...
The token string is only required by the PartialToken type, so
it can simply save the token string internally. No need to pass
it to every type.
Also moves the check for multi-word partials to the token loader
code in the tokenizer. Multi-word partials can only happen with
the legacy tokenizer and when the database was loaded with an
older version of Nominatim. No need to keep the check for
everybody.
2021-07-17 18:18:31 +02:00
Sarah Hoffmann
ec3f6c9c42
factor out query position
...
Moves token and phrase position and phrase type into a separate
class that is handed in when assembling the search description.
This drastically reduces the number of parameters for the function
to extend the search descriptions and gives us more flexibility
in the future for more complex positional analysis.
2021-07-15 14:12:59 +02:00
Sarah Hoffmann
143ff14466
remove special status of partial tokens
...
Full-word tokens are no longer marked by a space at the
beginning of the token. Use the new Partial token category
instead. This removes a couple of special casing, we don't
really need.
The word table still has the space for compatibility reasons,
so the tokenizer code needs to get rid of it when loading the
tokens.
2021-07-14 22:17:17 +02:00
Sarah Hoffmann
6070c3d1d5
introduce a separate token type for partials
...
This means that the leading space can be removed as a partial
word indicator.
2021-07-13 16:57:12 +02:00
Sarah Hoffmann
bc8b2d4ae0
Merge pull request #2393 from lonvia/fix-flake8-issues
...
Fix flake8 issues
2021-07-13 16:46:12 +02:00
Sarah Hoffmann
14f777da18
use psycopg's SQL quoting where possible
...
Use the SQL formatting supplied with psycopg whenever the
query needs to be put together from snippets.
2021-07-12 22:05:22 +02:00
Sarah Hoffmann
6f6681ce67
add helper function for execute_values
...
Make psycopg2's convenience function accessible through
the cursor.
2021-07-12 21:08:20 +02:00
Sarah Hoffmann
06602b4ec0
provide wrapper function for DROP TABLE
...
Use psycopg2 formatting to ensure correct quoting.
2021-07-12 20:32:46 +02:00
Sarah Hoffmann
cf98cff2a1
more formatting fixes
...
Found by flake8.
2021-07-12 17:45:42 +02:00
Sarah Hoffmann
b4fec57b6d
Merge pull request #2391 from lonvia/fix-sonar-issues
...
Fix bugs and code smells found by Sonarqube
2021-07-12 17:14:59 +02:00
Sarah Hoffmann
f8b5a63de3
factor out connection reset code
2021-07-12 14:58:44 +02:00
Sarah Hoffmann
568316f07c
simplify analyse function
2021-07-12 14:47:50 +02:00
Sarah Hoffmann
daa597b300
split up variant computation for better readability
2021-07-12 14:43:50 +02:00
Sarah Hoffmann
47adb2a3fc
reorganise process_place function
...
Move address processing into its own function as it is
rather extensive.
2021-07-12 11:57:55 +02:00
Sarah Hoffmann
fff0012249
simplify website setup code
...
Use formaat strings and move variable quoting code into extra
function.
2021-07-12 11:41:05 +02:00
Sarah Hoffmann
d5a1883b62
avoid repeated patterns for table name
2021-07-12 11:33:09 +02:00
Sarah Hoffmann
a08ef43e40
simplify if statements
2021-07-12 11:28:47 +02:00
Sarah Hoffmann
bc5e15996a
convert single case switch to if statement
2021-07-12 11:28:47 +02:00
Sarah Hoffmann
128ca800cd
avoid local variable assignment
2021-07-11 23:22:53 +02:00
Sarah Hoffmann
000d133af6
fix more missing braces on one-liners
2021-07-11 23:22:53 +02:00
Sarah Hoffmann
1e40d65aa9
remove dead code
2021-07-11 23:22:53 +02:00
Sarah Hoffmann
bffbe68ec3
do not intermix params with and without default
2021-07-11 23:22:53 +02:00
Sarah Hoffmann
58b10074ad
directly return data in function
...
The temporary variable is not necessary.
2021-07-11 19:24:04 +02:00
Sarah Hoffmann
d933ead2b5
remove unnecessayly nested ifs
...
Found by Sonarqube.
2021-07-11 19:11:37 +02:00
Sarah Hoffmann
1cdc30c5e8
remove unused functions
...
The functions were necessary for the transitory code
to Python and are no longer used.
2021-07-11 19:10:04 +02:00
Sarah Hoffmann
3661f7a321
avoid multiple returns of same value
...
Found by Sonarqube.
2021-07-11 18:23:42 +02:00
Sarah Hoffmann
27af9b102c
always use brackets on if statements
...
This adds bracket around all one-line if statements that did
not have them yet.
2021-07-10 17:04:46 +02:00
Sarah Hoffmann
500c61685b
remove unused variables
...
As reported by sonarqube.
2021-07-09 16:36:42 +02:00
Sarah Hoffmann
106d960f84
fix bad use of echo in PHP output
2021-07-09 12:50:35 +02:00
Sarah Hoffmann
322fa19ceb
Merge pull request #2390 from lonvia/responsible-disclosure
...
Add security issue disclosure policy
2021-07-09 12:32:37 +02:00
Sarah Hoffmann
5bea0b6086
add security issue disclosure policy
2021-07-09 11:36:59 +02:00
Sarah Hoffmann
a5970d7548
Merge pull request #2384 from lonvia/actions-add-icu-tokenizer
...
CI: run tests on Ubuntu 18
2021-07-07 14:39:53 +02:00
Sarah Hoffmann
c216144dd1
add missing pyyaml requirement
2021-07-07 11:29:33 +02:00
Sarah Hoffmann
42e08da7ca
enable PHP 7.2 for Ubuntu 18 CI
2021-07-07 11:29:33 +02:00
Sarah Hoffmann
a2edbbf78a
cannot use capture_output in subprocess.run
...
Only available since Python 3.7.
2021-07-06 22:57:42 +02:00
Sarah Hoffmann
1e86dc1d93
remove default parameter for namedtuple
...
This is only available in Python 3.7.
2021-07-06 22:57:42 +02:00
Sarah Hoffmann
54f295be52
CI: run tests on older Ubuntu version as well
2021-07-06 22:57:42 +02:00
Sarah Hoffmann
8bc3c0a07c
Merge pull request #2382 from lonvia/remove-json-config
...
Remove outdated ICU tokenizer JSON config
2021-07-05 12:34:34 +02:00
Sarah Hoffmann
d75bc20174
Merge pull request #2383 from lonvia/remove-more-names
...
Exclude name:etymology and name:signed
2021-07-05 12:34:16 +02:00
Sarah Hoffmann
fd8751658f
exclude name:etymology and name:signed
...
name:etymology contains a description of the name origin and is
thus more informative than search-worthy.
name:signed basically indicates that the feature does not have
a name.
2021-07-05 11:04:16 +02:00
Sarah Hoffmann
4db5a1a0b8
remove outdated ICU tokenizer JSON config
2021-07-05 11:01:35 +02:00
Sarah Hoffmann
4c52777ef0
Merge pull request #2371 from lonvia/increase-python-version
...
Increase minimum required Python version to 3.6
2021-07-05 10:32:38 +02:00
Sarah Hoffmann
d4c7bf20a2
Merge pull request #2381 from lonvia/reorganise-abbreviations
...
Reorganise abbreviation handling
2021-07-05 10:32:16 +02:00
Sarah Hoffmann
affe1300d9
add warning about experimental nature of ICU tokenizer
2021-07-04 10:44:58 +02:00
Sarah Hoffmann
62d5984b1b
limit the number of variants that can be produced
2021-07-04 10:28:28 +02:00
Sarah Hoffmann
c32551b4e0
restrict partial word counting to names of reasoanble length
...
The partial word count does not split names to save a bit of time.
The result is that it might enounter unreasonably long names
which in truth consist of multiple words. No accurate statistics
are needed so simply restrict the count to words shorter than
75 characters.
2021-07-04 10:28:28 +02:00
Sarah Hoffmann
e85f7e7aa9
fix subsequent replacements
...
Two replacement words directly following each other did not
work as expected because each expects a space at the
beginning/end while there was only one space available.
Also forbit composing a word after a space was added in the
end by a previous replacement.
2021-07-04 10:28:28 +02:00
Sarah Hoffmann
7b0f6b7905
leave ICU variant properties empty for now
...
Saving unused properties causes unnecessary duplicates.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
0894ce9dc3
import abbreviations from OSM Wiki
...
Replaces the variant rules with a slightly cleaned-up
version of the abbreviation lists at
https://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
4fd2e961b6
improve normalization
...
Make sure all special symbols are removed during normalization already.
Those won't be interpreted in any way because they are unlikely to be
searched for.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
b9fbfeff67
only consider partials in multi-words for initial count
...
This ensures that it is less likely that we exclude meaningful
words like 'hauptstrasse' just because they are frequent.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
5dd24b3ef0
add documentation for ICU tokenizer configuration
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
62828fc5c1
switch to a more flexible variant description format
...
The new format combines compound splitting and abbreviation.
It also allows to restrict rules to additional conditions
(like language or region). This latter ability is not used
yet.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
a6aa6360e0
use yaml tag syntax to mark include files
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
c4f6c06f44
add dependency on datrie
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
0d80a9b897
tests for composing decomposed suffixes
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
f70930b1a0
make compund decomposition pure import feature
...
Compound decomposition now creates a full name variant on
import just like abbreviations. This simplifies query time
normalization and opens a path for changing abbreviation
and compund decomposition lists for an existing database.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
9ff4f66f55
complete tests for icu tokenizer
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
32ca631b74
fix full term token in special phrases
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
2e81084f35
complete tests for rule loader
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
a0a7b05c9f
correctly quote strings when copying in data
...
Encapsulate the copy string in a class that ensures that
copy lines are written with correct quoting.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
2f6e4edcdb
update unit tests for adapted abbreviation code
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
1bd9f455fc
add abbreviations from legacy tokenizer
...
These abbreviations are not a perfect fit anymore because
abbreviation replacement is now applied before transliteration.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
2e3c5d4c5b
adapt tests for ICU tokenizer
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
8413075249
move abbreviation computation into import phase
...
This adds precomputation of abbreviated terms for names and removes
abbreviation of terms in the query. Basic import works but still
needs some thorough testing as well as speed improvements during
import.
New dependency for python library datrie.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
6ba00e6aee
icu tokenizer: move transliteration rules in separate file
...
The tokenizer configuration has become difficult to handle
due to the additional manual transliteration rules. Allow
to have a separate rule file that is given to the ICU library
as is.
2021-07-04 10:28:20 +02:00
Sarah Hoffmann
de4fac33dc
docs: nominatim-ui should be installed from the release
...
The development version does not provide the pre-packaged
dist directory anymore.
2021-07-03 21:16:52 +02:00
Sarah Hoffmann
c9984669a7
Merge pull request #2373 from lonvia/tweak-search-cost
...
Further tweaking of search cost
2021-06-26 16:21:08 +02:00
Sarah Hoffmann
63755c31ff
remove penalty for full words in address
...
Now that mutli-word partials no longer exist, multi-word full
words need to be used to search in addresses and therefore no
longer should have a penalty.
Also changes the condition when a full word is included into
the address. It is no longer relevant if an equivalent partial
exists but only if the term consists of more than one word.
2021-06-26 11:37:15 +02:00
Sarah Hoffmann
161f5f5cee
adjust penalty for housenumber-in-name searches
...
When searching for house numbers in the name (for place-only
terms) then the same penalties need to apply as for the
regular house number search.
Change the code to first compute the penalties and then create
the new search variants.
2021-06-26 11:37:15 +02:00
Sarah Hoffmann
c7073a1fc0
increase minimum Python to 3.6
...
Python 3.6 introduces formatted string literals and
flag enums as well as a much faster dict implementation.
These changes make the code so much simpler as to warrant
dropping Python 3.5 support.
Affected distributions are Ubuntu 16.04 and Debian Stretch.
2021-06-21 18:37:37 +02:00
Sarah Hoffmann
e7b4fc70e7
make sure old data gets deleted on place type change
...
When changing from some other place type to place=postcode
make sure that the old place type entry in the place table
is deleted.
2021-06-18 10:58:41 +02:00
Sarah Hoffmann
457982e1d2
update postcode in place if it already exists
2021-06-18 00:28:52 +02:00
Sarah Hoffmann
aa558e6080
Merge pull request #2369 from lonvia/exclude-poi-from-housenumber-search
...
Do not return POIs when dropping house number in query
2021-06-17 15:30:05 +02:00
Sarah Hoffmann
fe11d3cbbd
do not return POIs when dropping house number in query
...
We've previously added searching through rank 30 in a house
number search to enable searches for house number+name.
This had the unintended side effect that rank 30 objects
are also returned in s search that dropped the house number
from the query. This is wrong because POIs cannot function
as a parent to a house number.
This fix drops all rank 30 objects from the results for a
house number search if they do not match the requested house
number.
2021-06-17 14:21:20 +02:00
Sarah Hoffmann
1ce223a83b
Merge pull request #2360 from AntoJvlt/postcodes-place-table
...
Use place instead of placex to compute postcodes
2021-06-16 11:45:07 +02:00
AntoJvlt
3676310efe
Improved performance of the postcodes query and some code cleaning
2021-06-12 15:46:08 +02:00
AntoJvlt
ddf866c4c7
Always delete old placex entry for type=postcode when inserting a new one into the place table
2021-06-12 15:35:51 +02:00
AntoJvlt
9e07a197e9
Handle postcode type change in place insert trigger
2021-06-09 09:31:32 +02:00
AntoJvlt
1c175e3a67
Clean and update tests for postcodes
2021-06-09 09:31:32 +02:00
AntoJvlt
47fb7cd3a8
Use place_exists() into can_compute() for postcodes
2021-06-09 09:31:32 +02:00
AntoJvlt
e879814e43
Update tests for postcodes
2021-06-09 09:31:32 +02:00
AntoJvlt
a4733eed90
Use place instead of placex to compute postcodes
2021-06-09 09:31:32 +02:00
Sarah Hoffmann
38fbc4fcbb
do not fail CI on codecov errors
...
The CodeCove upload depends on unreliable external code.
2021-06-08 10:42:14 +02:00
Sarah Hoffmann
c6fe91bfa5
Merge pull request #2359 from lonvia/switch-bdd-tests-to-api-search
...
Remove deprecated commandline query function
2021-06-06 18:29:51 +02:00
Sarah Hoffmann
7383f05e45
remove deprecated query interface
...
Searches can now be done via the thin API wrapper.
2021-06-06 15:28:21 +02:00
Sarah Hoffmann
3aac51c81f
switch BDD tests to always use search API
2021-06-06 15:27:52 +02:00
Sarah Hoffmann
f0a7850edf
Merge pull request #2358 from AntoJvlt/documentation-update
...
Update documentation
2021-06-04 23:54:37 +02:00
AntoJvlt
4336ca69c7
Update documentation
2021-06-03 18:39:40 +02:00
Sarah Hoffmann
4bca5e838b
Merge pull request #2357 from lonvia/legacy-tokenizer-fix-word-entries
...
Fix insertion of special terms and countries into word table
2021-06-02 20:58:14 +02:00
Sarah Hoffmann
bc981d0261
fix insertion of special terms and countries into word table
...
Special terms need to be prefixed by a space because they are
full terms.
For countries avoid duplicate entries of word tokens.
Adds tests for adding country terms.
2021-06-02 20:22:39 +02:00
Sarah Hoffmann
b1d33e6b49
Merge pull request #2356 from lonvia/freeze-after-import
...
Call freeze after running and non-updateable import
2021-06-02 16:25:26 +02:00
Sarah Hoffmann
38d442edf6
docs: reload SQL when migrating to 3.6
...
SQL functions must always be reloaded when updating the software.
All other updates included the instruction as part of some other
migration. From 3.7 on it will happen as part of the migration
command.
Fixes #2335 .
2021-06-02 16:11:29 +02:00
Sarah Hoffmann
72625dc72a
call freeze after running and non-updateable import
...
Some of the tables will have already been removed but
the tables for indexing are still there and should be
dropped.
2021-06-02 11:08:48 +02:00
Sarah Hoffmann
cc2f152d70
commit changes to replication log table
...
Fixes #2350 .
2021-05-26 11:47:08 +02:00
Sarah Hoffmann
f74dc38766
always compute guessed postcode for POIs from centroid
...
When guessing postcodes from the area, only postcodes within
that area are accepted. For POIs that is usually not what we
want as the postcode would have to be within a house for
example.
Fixes #2301 .
2021-05-26 11:15:13 +02:00
Sarah Hoffmann
7d9665d8d2
Merge pull request #2349 from lonvia/fix-website-refresh
...
Only initialise tokenizer for refresh functions where needed
2021-05-25 20:43:44 +02:00
Sarah Hoffmann
a0e85cc17c
only initialise tokenizer for refresh functions where needed
...
Fixes #2347 .
2021-05-25 19:16:22 +02:00
Sarah Hoffmann
29b02f9e56
Merge pull request #2346 from lonvia/words-vs-tokens
...
Cleanup use of partial words in legacy tokenizers
2021-05-24 17:41:38 +02:00
Sarah Hoffmann
24c986c842
add tests for new full name computation with ICU
2021-05-24 10:41:42 +02:00
Sarah Hoffmann
4f4d15c28a
reorganize keyword creation for legacy tokenizer
...
- only save partial words without internal spaces
- consider comma and semicolon a separator of full words
- consider parts before an opening bracket a full word
(but not the part after the bracket)
Fixes #244 .
2021-05-24 10:41:42 +02:00
Sarah Hoffmann
fa3e48c59f
use make_keywords for place search terms also
...
Ensures that place indeed uses the same search names as other
names.
2021-05-23 23:08:11 +02:00
Sarah Hoffmann
02f6afa51b
always ignore multi term partials in search
...
Partial terms should only ever consist of one word. Ignore
any other, they are a leftover from inefficient word index
builts.
2021-05-23 22:13:03 +02:00
Sarah Hoffmann
10143e0ac7
Merge pull request #2342 from lonvia/icu-tokenizer-ci
...
Add BDD tests with icu tokenizer to CI runs
2021-05-22 10:36:35 +02:00
Sarah Hoffmann
8f3429939f
CI: run BDD tests with legacy_icu tokenizer
2021-05-21 23:18:45 +02:00
Sarah Hoffmann
00094c43d1
enable Tiger BDD API test for legacy_icu
2021-05-21 22:39:56 +02:00
Sarah Hoffmann
8bf15fa691
Merge pull request #2341 from lonvia/cleanup-python-tests
...
Cleanup and linting of python tests
2021-05-20 17:30:30 +02:00
Sarah Hoffmann
63dc503b8d
Merge pull request #2337 from mogita/fix/invalid-query-string
...
fix: add the missing question mark
2021-05-20 10:26:23 +02:00
Sarah Hoffmann
430c316e45
test: fix linting errors
2021-05-19 23:07:39 +02:00
Sarah Hoffmann
01f5a9ff84
test: more use of table_factory
2021-05-19 17:37:03 +02:00
Sarah Hoffmann
af52eed0dd
test: avoid use of tempfile module
...
Use the tmp_path fixture instead which provides automatic
cleanup.
2021-05-19 16:43:26 +02:00
Sarah Hoffmann
f93d0fa957
test: use src_dir fixture instead of self-computed paths
2021-05-19 16:03:54 +02:00
Sarah Hoffmann
c06a1d007a
test: replace raw execute() with fixture code where possible
2021-05-19 12:11:04 +02:00
Sarah Hoffmann
65bd749918
test: use table_rows() and execute_values() where possible
...
Some uses of scalar() could also be replaced with convenience
functions from the word table mock.
2021-05-19 10:51:10 +02:00
Sarah Hoffmann
510eb53f53
test: move Testingcursor into separate class
...
Also adds more convenience functions: counting with a where
statement and a wrapper to execute_values().
2021-05-19 10:30:36 +02:00
mogita
507543a482
fix: add the missing question mark
2021-05-19 13:35:15 +08:00
Sarah Hoffmann
16bb007135
Merge pull request #2336 from lonvia/do-not-mask-error-when-loading-tokenizer
...
Do not hide errors when importing tokenizer
2021-05-18 23:00:10 +02:00
Sarah Hoffmann
1ffb6bd5d0
Merge pull request #2321 from AntoJvlt/csv-import-special-phrases
...
CSV import for special phrases and loader refactoring
2021-05-18 22:58:25 +02:00
AntoJvlt
799a4c9ab6
Documentation update and small code fixes
2021-05-18 22:35:21 +02:00
Sarah Hoffmann
b2722650d4
do not hide errors when importing tokenizer
...
Explicitly check for the tokenizer source file to check that
the name is correct. We can't use the import error for that
because it hides other import errors like a missing
library.
Fixes #2327 .
2021-05-18 16:28:21 +02:00
Sarah Hoffmann
54b06d7abc
Merge pull request #2332 from lonvia/fix-keyword-details
...
Always use object type for details keywords
2021-05-18 11:30:58 +02:00
Sarah Hoffmann
fef1bbb1a7
always use object type for details keywords
...
When name and address is empty, the keywords field in the response
of the details API would be an array because that is what PHP's
json_encode defaults to with empty array(). This default can only
be changed globally per json_encode call and that might cause
unintended colleteral damage. Work around the issue by making
name and address an empty array instead of keywords.
Fixes #2329 .
2021-05-17 16:36:32 +02:00
AntoJvlt
3206bf59df
Resolve conflicts
2021-05-17 13:52:35 +02:00
AntoJvlt
a33f2c0f5b
Special phrases documentation updated
2021-05-17 13:25:16 +02:00
AntoJvlt
8b8dfc46eb
Added --no-replace command for special phrases importation and added corresponding tests
2021-05-17 13:25:06 +02:00
AntoJvlt
06aab389ed
Code cleaning and SPLoader deleted
2021-05-16 16:59:12 +02:00
AntoJvlt
fb0ebb5bf0
Add tests for the new SPWikiLoader and SPCsvLoader
2021-05-16 16:10:06 +02:00
Sarah Hoffmann
925726222f
Merge pull request #2323 from darkshredder/disable-search-reverse-only
...
Feat: Disabled search API for --reverse-only imports
2021-05-14 10:40:22 +02:00
Sarah Hoffmann
550e7edb64
Merge pull request #2328 from lonvia/convert-tiger-to-csv
...
Switch external Tiger data to CSV format
2021-05-14 09:58:50 +02:00
Sarah Hoffmann
2992dea5c8
install default settings for legacy_icu tokenizer
2021-05-14 09:44:10 +02:00
Sarah Hoffmann
e76e4bd964
adapt documentation to use Tiger CSV dump
2021-05-14 00:02:50 +02:00
Sarah Hoffmann
7d621389ee
adapt tests to new TIGER CSV format
2021-05-14 00:02:50 +02:00
Sarah Hoffmann
35efe3b41c
use tokenizer during Tiger data import
...
This also changes the required import format to CSV.
2021-05-14 00:02:50 +02:00
Darkshredder
e5ffc59cd5
feat: Added reverse-only-search validation
2021-05-14 02:36:21 +05:30
Sarah Hoffmann
d7f9d2bde9
Merge pull request #2326 from lonvia/wokerpool-for-tiger-data
...
Use WorkerPool when importing Tiger data
2021-05-13 22:09:56 +02:00
Sarah Hoffmann
5feece64c1
use WorkerPool for Tiger data import
...
Requires adding an option that SQL errors are ignored.
2021-05-13 20:36:50 +02:00
Sarah Hoffmann
b9a09129fa
move WorkerPool into db module
...
The pool is independent of the indexer and may also be used
by other parts of the software.
2021-05-13 17:11:17 +02:00
Sarah Hoffmann
96e6bbe3a1
Merge pull request #2325 from lonvia/do-not-precompute-postcodes
...
Do not preload postcodes in the legacy tokenizer
2021-05-13 17:00:29 +02:00
Frederik Ramm
fe39185894
Add array_key_last function for PHP <7.3
...
This patch adds an array_key_last function if it doesn't yet exist, fixes #2316 . It is tested on PHP 7.2.24 but not PHP 7.3.
2021-05-13 16:42:22 +02:00
Sarah Hoffmann
fc860787dd
do not preload postcodes
...
This is too expensive for updates.
2021-05-13 16:14:12 +02:00
Sarah Hoffmann
63e35574d4
Merge pull request #2324 from lonvia/generic-external-postcodes
...
Rework postcode handling and generalised external postcode support
2021-05-13 14:52:19 +02:00
Sarah Hoffmann
db2dbf15f7
fix token_info migration
...
A bad indent meant that only one table received the new column.
2021-05-13 14:31:41 +02:00
Sarah Hoffmann
f5977dac75
ignore invalid coordinates in external postcodes
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
8f2746fe24
ignore entries without country code
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
41b9bc9984
add documentation for external postcode feature
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
1ccd4360b4
correctly handle removing all postcodes for country
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
bf864b2c54
index postcodes after refreshing
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
4abaf71234
add and extend tests for new postcode handling
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
a4aba23a83
move filling of postcode table to python
...
The Python code now takes care of reading postcodes from placex,
enhancing them with potentially existing external postcodes and
updating location_postcodes accordingly. The initial setup and
updates use exactly the same function.
External postcode handling has been generalized. External postcodes
for any country are now accepted. The format of the external postcode
file has changed. We now expect CSV, potentially gzipped. The
postcodes are no longer saved in the database.
2021-05-13 14:15:42 +02:00
Sarah Hoffmann
cae0cf3546
Merge pull request #2322 from mtmail/type-label-already-lowercased
...
typelabel value is already lowercased
2021-05-12 20:25:22 +02:00
marc tobias
38f9e18afb
typelabel value is already lowercased
2021-05-12 19:16:51 +02:00
AntoJvlt
9d83da830f
Introduction of SPCsvLoader to load special phrases from a csv file
2021-05-10 23:26:39 +02:00
AntoJvlt
00959fac57
Refactoring loading of external special phrases and importation process by introducing SPLoader and SPWikiLoader
2021-05-10 21:49:31 +02:00
Sarah Hoffmann
40cb17d299
Merge pull request #2314 from lonvia/fix-status-no-import-date
...
Correctly catch the exception when import date is missing
2021-05-06 17:41:53 +02:00
Sarah Hoffmann
2ae293aeb6
Merge pull request #2312 from lonvia/icu-tokenizer
...
Add new tokenizer based on libICU
2021-05-06 17:22:04 +02:00
Sarah Hoffmann
d8ead78e03
correctly catch the exception when import date is missing
2021-05-06 16:27:42 +02:00
Sarah Hoffmann
b2c6eca2c8
add missing transliterations
...
The ICU library only offers transliterations for a limited set of
script. Add transliterations for missing scripts from the PostgreSQL
module. These means that the same selection of scripts is supported
as with the old module.
2021-05-05 21:16:55 +02:00
Sarah Hoffmann
872ab91421
fix name of transliterator
...
Should be different from the normalisation rules.
2021-05-05 17:09:38 +02:00
Sarah Hoffmann
a263e54b94
enable BDD tests for different tokenizers
...
The tokenizer to be used can be choosen with -DTOKENIZER.
Adapt all tests, so that they work with legacy_icu tokenizer.
Move lookup in word table to a function in the tokenizer.
Special phrases are temporarily imported from the wiki until
we have an implementation that can import from file. TIGER
tests do not work yet.
2021-05-05 10:31:51 +02:00
Sarah Hoffmann
18c99a5c5f
add unit tests for legacy ICU tokenizer
2021-05-05 10:15:27 +02:00
Sarah Hoffmann
d55fc39275
cache translieration results
2021-05-05 10:15:27 +02:00
Sarah Hoffmann
ba8ed7967d
add PHP part for new ICU-base tokenizer
2021-05-05 10:15:27 +02:00
Sarah Hoffmann
f44af49df9
add Python part for new ICU-based tokenizer
2021-05-05 10:15:27 +02:00
Sarah Hoffmann
3c67bae868
Merge pull request #2310 from RhinoDevel/master
...
2nd try: Add hint about replication update & recheck intervals being in seconds.
2021-05-04 12:45:26 +02:00
Marc
3dade534fd
Add hint about replication update & recheck intervals being in seconds.
2021-05-04 11:47:15 +02:00
Sarah Hoffmann
8b1a509442
Merge pull request #2305 from lonvia/tokenizer
...
Factor out normalization into a separate module
2021-05-03 09:15:34 +02:00
Sarah Hoffmann
8bdb9aa607
mock tokenizer factory for replication tests
2021-05-01 10:50:39 +02:00
Sarah Hoffmann
36c624ec71
commit between migrations
...
Later migrations may require tables set up by older ones.
2021-05-01 10:47:35 +02:00
Sarah Hoffmann
7fd871a74d
increase database version for tokenizer migration
2021-05-01 10:47:35 +02:00
Sarah Hoffmann
ced8f0f4a2
fix liniting issues
2021-04-30 17:59:50 +02:00
Sarah Hoffmann
388ebcbae2
move index creation for word table to tokenizer
...
This introduces a finalization routing for the tokenizer
where it can post-process the import if necessary.
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
20891abe1c
indexer: fetch extra place data asynchronously
...
The indexer now fetches any extra data besides the place_id
asynchronously while processing the places from the last batch.
This also means that more places are now fetched at once.
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
6ce6f62b8e
fetch place info asynchronously
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
602728895e
indexer: fetch ids in batches
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
fc995ea6b9
move database check for module to tokenizer
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
be6262c6ce
move status test to tokenizer
...
The availability of the module is now tested by the tokenizer.
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
893490f94e
add more tests for legacy tokenizer
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
044bb6afa5
move tokenization in query into tokenizer
2021-04-30 17:41:08 +02:00
Sarah Hoffmann
3eb4d88057
boilerplate for PHP code of tokenizer
...
This adds an installation step for PHP code for the tokenizer. The
PHP code is split in two parts. The updateable code is found in
lib-php. The tokenizer installs an additional script in the
project directory which then includes the code from lib-php and
defines all settings that are static to the database. The website
code then always includes the PHP from the project directory.
2021-04-30 11:31:52 +02:00
Sarah Hoffmann
23fd1d032a
tests for legacy tokenizer
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
7cb7cf848d
move amenity creation to tokenizer
...
The BDD tests still use the old-style amenity creation scripts
because we don't have simple means to import a hand-crafted
test file of special phrases right now.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
bef300305e
move default country name creation to tokenizer
...
The new function is also used, when a country us updated. All SQL
function related to country names have been removed.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
dc700c25b6
cache all postcodes
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
0ba93e5ba9
reorganise address iteration in tokenizer
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
0da481f207
remove debug code
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
d75a235c1f
use address tokens in SQL
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
9e92759ac7
extract address tokens in tokenizer
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
ffc2d82b0e
move postcode normalization into tokenizer
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
d8ed1bfc60
move houseunumber handling to tokenizer
...
Normalization and token computation are now done in the tokenizer.
The tokenizer keeps a cache to the hundred most used house numbers
to keep the numbers of calls to the database low.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
d711f5a81e
move name token creation into tokenizer
...
Name tokens are now handed in via token_info and used from there.
Also moves the generic search name insertion function back to
placex_triggers.sql.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
fa2bc60468
introduce name analyzer
...
The name analyzer is the actual work horse of the tokenizer. It
is instantiated on a thread-base and provides all functions for
analysing names and queries.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
e1c5673ac3
require tokeinzer for indexer
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
1b1ed820c3
introduce index for finding surrounding buildings
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
a73711f3cd
add extra column for tokenizer
...
Add a jsonb column to the placex and location_property_osmline tables
which can be used by the installed tokenizer as required. No other
part of the software will use or otherwise rely on this column.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
9397bf54b8
introduce external processing in indexer
...
Indexing is now split into three parts: first a preparation step
that collects the necessary information from the database and
returns it to Python. In a second step the data is transformed
within Python as necessary and then returned to the database
through the usual UPDATE which now not only sets the indexed_status
but also other fields. The third step comprises the address
computation which is still done inside the update trigger in
the database.
The second processing step doesn't do anything useful yet.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
fbbdd31399
move word table and normalisation SQL into tokenizer
...
Creating and populating the word table is now the responsibility
of the tokenizer.
The get_maxwordfreq() function has been replaced with a
simple template parameter to the SQL during function installation.
The number is taken from the parameter list in the database to
ensure that it is not changed after installation.
2021-04-30 11:30:51 +02:00
Sarah Hoffmann
b5540dc35c
add migration for configurable tokenizer
...
Adds a migration that initialises a legacy tokenizer for
an existing database. The migration is not active yet as
it will need completion when more functionality is added
to the legacy tokenizer.
2021-04-30 11:29:57 +02:00
Sarah Hoffmann
296a66558f
move module installation to legacy tokenizer
2021-04-30 11:29:57 +02:00
Sarah Hoffmann
af968d4903
introduce tokenizer modules
...
This adds the boilerplate for selecting configurable tokenizers.
A tokenizer can be chosen at import time and will then install
itself such that it is fixed for the given database import even
when the software itself is updated.
The legacy tokenizer implements Nominatim's traditional algorithms.
2021-04-30 11:29:57 +02:00
Sarah Hoffmann
5c7b9ef909
Merge pull request #2303 from lonvia/remove-aux-support
...
Remove support for AUX housenumber tables
2021-04-30 11:19:35 +02:00
Sarah Hoffmann
185d369404
remove support for AUX housenumber tables
...
These tables have never been actively maintained and the code is
completely untested. With the upcomming changes, it is unlikely
that the code remains usable.
This removes the aux tables and all code that references them.
2021-04-30 10:08:29 +02:00
Sarah Hoffmann
51d20b19b6
Merge pull request #2299 from lonvia/update-actions
...
Fix database check for reverse-only
2021-04-27 12:18:45 +02:00
Sarah Hoffmann
46e8c6b112
Merge pull request #2291 from AntoJvlt/special-phrases-statistics
...
Special phrases statistics
2021-04-27 11:57:05 +02:00
Sarah Hoffmann
c8fb25201a
do not check for extra housenumber index for reverse-only
...
Also adds a database check for reverse only import to the CI.
2021-04-27 10:14:26 +02:00
Sarah Hoffmann
1fd483643b
add tests for different scripts
2021-04-26 23:01:06 +02:00
Sarah Hoffmann
a21a0864f1
Merge pull request #2298 from lonvia/add-warming-to-ci
...
Add warming to CI import tests and fix more Python 3.5 compatibility issues
2021-04-26 11:21:44 +02:00
Sarah Hoffmann
4457bf7528
avoid Path in subprocess parameters
...
Not supported by Python 3.5.
2021-04-26 10:55:23 +02:00
Sarah Hoffmann
5ed6f18d83
add warming to CI import test
2021-04-26 09:54:09 +02:00
AntoJvlt
abb3d56b20
Switching to log info and only send warning for invalid phrases
2021-04-25 17:57:43 +02:00
AntoJvlt
c5ecb9bae0
Implemented statistics for the import of special phrases through the SpecialPhrasesImporterStatistics class
2021-04-25 17:57:43 +02:00
AntoJvlt
1b68152fb2
reorganization of folder/file for the special phrases importer
2021-04-25 17:57:42 +02:00
Sarah Hoffmann
6812f397af
Merge pull request #2297 from lonvia/update-deployment-docs
...
docs: update deployment to use project directory
2021-04-24 15:35:00 +02:00
Sarah Hoffmann
68bd9c6091
Merge pull request #2296 from lonvia/disable-too-few-public-methods-check
...
pylint: disable too-few-public-methods check
2021-04-24 15:03:28 +02:00
Sarah Hoffmann
754f9e3a20
docs: update deployment to use project directory
...
Fixes #2295 .
2021-04-24 15:00:46 +02:00
Sarah Hoffmann
b951b11336
fix pylint complaints
2021-04-24 11:59:32 +02:00
Sarah Hoffmann
89c90bedb9
pylint: disable check too-few-public-methods
2021-04-24 11:39:44 +02:00
Sarah Hoffmann
b4fe7d7c7d
Merge pull request #2293 from darkshredder/update-manpage
...
Updated manual page
2021-04-24 09:20:28 +02:00
Sarah Hoffmann
5071710db7
Merge pull request #2294 from lonvia/update-actions
...
CI: add import test against Python 3.5 and fix discovered issues
2021-04-23 23:33:15 +02:00
Sarah Hoffmann
9faaf3fc88
actions: add import on ubuntu 18.04
...
This uses oldest possible dependencies where possible.
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
9c51c133f7
indexes with includes are not available for postgresql < 11
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
91d2fb6b1c
use group() for regex matches
...
Needed for compatibility with Python 3.5.
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
280406c0d7
use pathlib version of open
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
d5fc3b5e99
subprocess needs string argument
...
Compatibility change for Python 3.5.
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
f8f8c7e534
check for existance of custom .env before opening
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
3a642d50a4
use more generic ImportError to check for module
...
ModuleNotFoundError was only introduced in Python 3.6.
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
9685c68e30
replace usages of fromisoformat() with strptime()
...
fromisoformat was only introduced with Python 3.7 while we
still support Python 3.5.
Fixes #2292 .
2021-04-23 22:50:08 +02:00
Sarah Hoffmann
95e6ec091b
remove argparse dependency for vagrant scripts
...
Users don't need to recreate the manpage.
2021-04-23 22:50:08 +02:00
Darkshredder
34f5e4a199
Updated manual page
2021-04-24 01:42:38 +05:30
Sarah Hoffmann
788baafa26
bdd tests: fix place dependen ranking tests
...
The ranks of places may differ for some countries. Force the
place nodes in the test on null island which always uses the
default ranking.
2021-04-22 17:31:00 +02:00
Sarah Hoffmann
4c31813398
Merge pull request #2288 from RhinoDevel/patch-1
...
Replace "nominatim-update" with "nominatim".
2021-04-22 17:12:25 +02:00
RhinoDevel
b7bae80616
Replace "nominatim-update" with "nominatim".
...
If I am not mistaken, the correct command to index imported data via commandline is "nominatim index".
2021-04-22 15:40:22 +02:00
Sarah Hoffmann
f7e4aa51d3
indexer: reset query counter
...
Reset the counter for queries after the asynchronous connections
have been reopened.
2021-04-21 10:33:45 +02:00
Sarah Hoffmann
696c50459f
Merge pull request #2285 from lonvia/split-indexer-code
...
Rework indexer code
2021-04-20 15:34:14 +02:00
Sarah Hoffmann
50b6d7298c
factor out async connection handling into separate class
...
Also adds a test for reconnecting regularly while indexing.
2021-04-20 14:08:37 +02:00
Sarah Hoffmann
26a81654a8
indexer: make self.conn function-local
...
Also switches to our internal connect function which gives us
a cursor with a sclar() function.
2021-04-20 14:08:37 +02:00
Sarah Hoffmann
6430371d7d
make index() function private
2021-04-20 14:08:37 +02:00
Sarah Hoffmann
18705b3f18
move analyse function into indexinf function
2021-04-20 14:08:37 +02:00
Sarah Hoffmann
c6bd2bb7fb
indexer: move runner into separate file
2021-04-20 14:08:37 +02:00
Sarah Hoffmann
c4fd94bd1a
Merge pull request #2284 from lonvia/cleanup-word-frequency-computation
...
Rename and simplify function for word pre-computation
2021-04-19 18:28:04 +02:00
Sarah Hoffmann
b88b952f56
simplify token precomputation
...
Rename function to reflect that it is only used for precomputation.
The token IDs are not really needed, so don't bother to compute
the array of tokens.
2021-04-19 17:24:19 +02:00
Sarah Hoffmann
d68b02d36a
remove unused word recomputation script
...
Has been replaced by a script recomputing counts from search_name.
2021-04-19 16:40:57 +02:00
Sarah Hoffmann
b9b85eb208
Merge pull request #2283 from darkshredder/tiger-data-test-fix
...
Fix: tiger-data tarfile test
2021-04-19 13:56:36 +02:00
Darkshredder
1f898405a6
Fix: tiger-data tarfile test
2021-04-19 16:02:52 +05:30
Sarah Hoffmann
6f6910101e
Merge pull request #2282 from lonvia/add-paths-to-config
...
Include software paths in Python config object
2021-04-19 12:14:25 +02:00
Sarah Hoffmann
79d55357e8
simplify sql and website creation functions
2021-04-19 10:53:30 +02:00
Sarah Hoffmann
4fa6c0ad53
simplify constructor for SQL preprocessor
...
Use sql path from config.
2021-04-19 10:26:25 +02:00
Sarah Hoffmann
8f63f9516b
simplify interface for adding tiger data
...
Also simplifies tests using existing fixtures.
2021-04-19 10:26:25 +02:00
Sarah Hoffmann
995ba2c7c2
add library directories to config
...
Allows to reduce the number of parameters in functions that take
the config anyway.
2021-04-19 10:26:25 +02:00
Sarah Hoffmann
830e3be1e6
Merge pull request #2281 from changpingc/changping/fix-tiger-index
...
fix index on location_property_tiger (parent_place_id)
2021-04-19 08:42:59 +02:00
Channgping Chen
29a314a092
fix index on location_property_tiger (parent_place_id)
...
Looks like 2af82975cd
accidentally renamed an index. Because of the added "if not
exists" clause, the index doesn't get created. This
significantly slows down reverse queries because they now
require full scans on location_property_tiger.
Without this fix, reverse queries can take 8s on a full
planet install on an r5.8xlarge instance in EC2.
2021-04-19 00:33:15 +00:00
Sarah Hoffmann
abdba5fdc7
Merge pull request #2280 from AntoJvlt/Fix-special-phrases-import-and-tests-cleaning
...
Fix regex and sanity check for the import of special phrases and tests cleaning.
2021-04-18 11:57:19 +02:00
AntoJvlt
b2ae715699
Only log a warning if a wrong input is detected on the wiki while importing special phrases
2021-04-17 20:19:39 +02:00
AntoJvlt
a95c748363
Fix occurence regex
2021-04-17 19:24:13 +02:00
AntoJvlt
ec859e41c6
Cleaned tests and add database cleaning tests on test_import_from_wiki
2021-04-17 19:23:33 +02:00
Sarah Hoffmann
7aeae9da81
Merge pull request #2279 from lonvia/add-index-for-continued-indexing
...
Add index for continued indexing
2021-04-17 11:51:21 +02:00
Sarah Hoffmann
2ca11ccc6b
add tests for continuing import
2021-04-17 11:10:36 +02:00
Sarah Hoffmann
d74ae669e3
add support index when continuing import at index phase
...
Indexing scans the placex table sequentially during indexing
on the initial import. That is okay because we know that all
rows need to be processed anywhere. When continuing the import,
however, a large part might already be indexed, so that the
process spends a lot of time going through rows that are no
longer of interest. Create a supporting index for all unindexed
rows to speed up the scan. This is the same index as used later
for updates.
2021-04-17 11:07:04 +02:00
Sarah Hoffmann
9fabc5572d
Merge pull request #2278 from lonvia/remove-transistion-functions
...
Remove transition functions
2021-04-17 10:13:33 +02:00
Sarah Hoffmann
da98a2102a
remove transition functions from Python
2021-04-16 18:41:14 +02:00
Sarah Hoffmann
fb3353b854
Merge pull request #2277 from lonvia/update-osm2pgsql
...
Update osm2pgsql to current master
2021-04-16 17:40:43 +02:00
Sarah Hoffmann
b7e5c54593
remove PHP code for transition functions
2021-04-16 17:28:51 +02:00
Sarah Hoffmann
68beec5590
remove installation of PHP util scripts
2021-04-16 17:09:40 +02:00
Sarah Hoffmann
6ba06d1eb4
Merge pull request #2276 from lonvia/port-country-code-creation-to-python
...
Port country code creation to python
2021-04-16 16:57:04 +02:00
Sarah Hoffmann
0f11e311c4
add test for new postcode import function
2021-04-16 16:11:20 +02:00
Sarah Hoffmann
886a01c796
port function to compute initial postcodes to Python
2021-04-16 16:11:20 +02:00
Sarah Hoffmann
a632b9f86a
Merge pull request #2275 from lonvia/switch-to-absolute-imports
...
Use absolute imports in Python code
2021-04-16 15:04:10 +02:00
Sarah Hoffmann
76b1885595
use absolute imports in Python code
...
Relative imports are no longer officially recommended.
2021-04-16 14:20:09 +02:00
Sarah Hoffmann
c55b409cf6
update osm2pgsql to current master (fixes version output)
2021-04-15 10:24:01 +02:00
Sarah Hoffmann
c64193f839
Merge pull request #2263 from AntoJvlt/special-phrases-autoupdate
...
Implemented auto update of special phrases while importing them
2021-04-15 10:13:25 +02:00
Sarah Hoffmann
28a2a795ba
Merge pull request #2270 from lonvia/simplify-place-boundary-merge
...
Simplify matching between place and boundary names
2021-04-15 10:12:53 +02:00
Sarah Hoffmann
e90adfc7c3
adapt database check to new index layout
2021-04-14 17:52:59 +02:00
Sarah Hoffmann
16267dc021
add migration for new placenode geometry index
2021-04-14 17:52:59 +02:00
Sarah Hoffmann
e7266b52ae
simplify name matching between boundary and place node
...
Instead of normalising the names simply compare them in lower
case. This removes the dependency on the tokenizer for
linking boundaries and nodes. When looking up the linked places
by place type also allow that one name is simply contained in the
other. This catches the frequent case where one of the names has
an addendum (e.g. Newport vs. City of Newport).
Drops the special index for the name lookup and insted relies
on a slightly extended version of the geometry index used for
reverse lookup. Saves around 100MB on a planet.
2021-04-14 17:52:59 +02:00
Sarah Hoffmann
dc02610408
Merge pull request #2269 from lonvia/fix-actions
...
github actions: reintroduce postgresql repo
2021-04-14 17:50:02 +02:00
Sarah Hoffmann
dc1bfe4a93
github actions: reintroduce postgresql repo
2021-04-14 17:25:44 +02:00
Sarah Hoffmann
cf69daaafb
Merge pull request #2264 from darkshredder/tiger-data-tests
...
Fix: Error if last statements is wrong and improved tests in tiger data import
2021-04-14 10:56:12 +02:00
Darkshredder
49ee7505ed
Fix: Removed error if endstatement is wrong and improved tests
2021-04-13 15:44:12 +05:30
AntoJvlt
ae2b2cb9a5
Tests added for the auto update of special phrases during import
2021-04-12 14:35:29 +02:00
AntoJvlt
8c2f287ce4
Implemented auto update of special phrases while importing them
2021-04-12 14:30:48 +02:00
Sarah Hoffmann
2351f36315
Merge pull request #2260 from AntoJvlt/fix-load-languages-special-phrases
...
Fix default languages loading for special phrases import
2021-04-11 23:09:45 +02:00
AntoJvlt
5ecae10713
Fix default languages loading
2021-04-11 22:26:31 +02:00
Sarah Hoffmann
2e3d657794
Merge pull request #2258 from darkshredder/code-coverage
...
Disabled Code coverage status checks
2021-04-10 21:19:55 +02:00
Darkshredder
90f990b806
CodeCov comment only when codecoverage changes
2021-04-10 22:28:29 +05:30
Darkshredder
7666d48409
Disabled Coverage status checks
2021-04-10 20:44:52 +05:30
Sarah Hoffmann
be4cb190e8
add badge for codecov
2021-04-10 16:57:39 +02:00
Sarah Hoffmann
2f4eca8c46
Merge pull request #2252 from darkshredder/code-coverage
...
Added Code coverage support using Codecov
2021-04-10 16:37:12 +02:00
Sarah Hoffmann
71564fa1de
split LANGUAGES parameter before use
...
The user supplies the languages as a comma-separated list.
2021-04-09 17:48:28 +02:00
Sarah Hoffmann
ce08cb6cd7
add migration information for new configuration format
2021-04-08 11:01:46 +02:00
Sarah Hoffmann
1f0cf6311a
Merge pull request #2256 from lonvia/remove-reverseinplan-option
...
Remove ReverseInPlan option
2021-04-08 10:54:16 +02:00
Sarah Hoffmann
1db468b6c3
remove special handling for reversed queries in getGroupedSearches
...
getGroupedSearches is guaranteed not to be called with reversed
structured queries, so there is no need to have special exclusion
code.
2021-04-08 10:35:14 +02:00
Sarah Hoffmann
534de5ba81
remove reverseInPlan option from Geocode
...
Disabling query reversal is no longer possible in the configuration,
so there is no need to keep this as an option. Reversal is
automatically disabled for structured search only.
2021-04-08 10:19:27 +02:00
Sarah Hoffmann
492186716f
prepare 3.7.0 release
2021-04-06 21:23:29 +02:00
Sarah Hoffmann
07fda48cee
docs: minor spelling corrections
2021-04-06 16:09:53 +02:00
Sarah Hoffmann
4b31be5203
docs: unpacking tiger data is no longer necessary
2021-04-06 15:56:08 +02:00
Sarah Hoffmann
5d69c7ade1
Merge pull request #2250 from lonvia/save-transliterated-housenumbers
...
Switch to saving transliterated housenumbers in placex
2021-04-05 15:48:22 +02:00
Darkshredder
2bfea15fdc
Fixed BDD tests coverage reports
2021-04-05 06:30:31 +05:30
Sarah Hoffmann
96b0699621
add migration for transliterated housenumbers
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
6cbef84cad
use new transliteration in initial housenumber word computation
...
The new create_housenumber_id() function splits housenumber
lists correctly. Otherwise there is no difference.
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
55fcc44c8c
correctly handle housenumber lists
...
Lists are now standardised to use a semicolon separator.
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
16a66b5326
move transliteration of housenumbers into indexing
...
Housenumbers are now saved in transliterated form in the housenumber
column. This saves the transliteration step during lookup.
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
3590e76a1c
tests for finding non-ascii housenumbers
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
0ec3fdd3ba
return housenumbers always from address field
...
This means that we can use normalized versions of the
housenumber in the housenumber field as it is no longer
a user visible field.
2021-04-04 15:26:47 +02:00
Sarah Hoffmann
c0f0b66509
Merge pull request #2248 from darkshredder/special-term-test
...
Added Test for TokenSpecialTerm
2021-04-03 18:31:01 +02:00
Darkshredder
0f9df32d11
Added Test for TokenSpecialTerm
2021-04-02 04:49:05 +05:30
Sarah Hoffmann
a370c8be4b
Merge pull request #2247 from lonvia/index-for-housenumber-lookup
...
Index for housenumber lookup
2021-04-01 18:35:00 +02:00
Sarah Hoffmann
d6e0bc698e
add recommendation for Postgresql 11+
2021-04-01 17:10:44 +02:00
Sarah Hoffmann
8d8b1d4307
use non-key index to speed up housenumber search
...
On Postgresql versions 11+ add an index to speed up the lookup
of housenumbers for terms found in search_name. This is really
just a band-aid around the query planer's interpretation of the
query.
2021-04-01 17:10:44 +02:00
Darkshredder
771b3377c0
Added code-cov Support for Code Coverage
2021-03-31 05:00:03 +05:30
Sarah Hoffmann
8dbfdd59b0
Merge pull request #2243 from darkshredder/XML-format-fix
...
Fixed: XML format: more_url points to localhost, not base URL
2021-03-30 09:19:01 +02:00
Sarah Hoffmann
cd03882536
Merge pull request #2244 from AntoJvlt/import-special-phrases-tests-cleaning
...
Cleaned tests for special phrases.
2021-03-30 09:17:27 +02:00
Darkshredder
0b154a2a1a
Added HTTP_HOST to if statement
2021-03-30 03:02:55 +05:30
AntoJvlt
e82de99e5a
Cleaned tests of exceptions and fix phrase_settings.json test file name.
2021-03-29 22:07:29 +02:00
Darkshredder
27b379c1e3
fixed: XML format: more_url points to localhost, not base URL
2021-03-30 01:02:43 +05:30
Sarah Hoffmann
f9517e9143
Merge pull request #2234 from darkshredder/add-man-page
...
Added Manual page for Nominatim tool
2021-03-29 14:25:10 +02:00
Sarah Hoffmann
e05dee6df5
allow sorting by housenumbers for rare street names
...
Usually we don't narrow down search results by house number when
only a street name is given because there may be a lot of rows
to cross check when the street name is very frequent. However,
when it is known to be rare, the housenumber check may be done
anyway.
Fixes #2238 .
2021-03-29 12:06:51 +02:00
Darkshredder
3fad492c6f
Update manpage after rebase
2021-03-29 14:27:06 +05:30
Darkshredder
b7d6ae93e3
Nominatim/cli.py rebase fixes
2021-03-29 14:16:41 +05:30
Darkshredder
21b1b75b08
Rebase with master
2021-03-29 14:00:45 +05:30
Darkshredder
bbe0353b23
fixed indentation and used sed to remove AUTHORS section
2021-03-29 13:57:13 +05:30
Darkshredder
51e2654cd2
Added Manual page and fixed documentation
2021-03-29 13:57:13 +05:30
Sarah Hoffmann
09b2510219
Merge pull request #2228 from AntoJvlt/import-special-phrases-porting-python
...
Import special phrases porting python
2021-03-29 09:49:35 +02:00
AntoJvlt
57ce75eb67
Change command 'import-special-phrases --from-wiki' to 'special-phrases --import-from-wiki'.
2021-03-26 02:22:38 +01:00
AntoJvlt
cde9389e75
Errors fixes, Cleaning code, Improvement and addition of tests
2021-03-26 01:53:33 +01:00
AntoJvlt
2c19bd5ea3
Encapsulation of tools/special_phrases.py into SpecialPhrasesImporter class and add new tests.
2021-03-25 21:13:57 +01:00
AntoJvlt
ff34198569
Code cleaning, tests simplification and use of python3-icu package
2021-03-23 23:56:39 +01:00
AntoJvlt
919469c8fe
Updated documentation for PyICU support
2021-03-23 23:34:19 +01:00
AntoJvlt
1ce8b530cd
Introduction of PyICU for transliteration in python. Reversed changes in normalization.sql.
2021-03-23 23:34:16 +01:00
AntoJvlt
2fb6018078
Added wrapper in specialphrases.php to call corresponding nominatim command.
2021-03-23 23:30:42 +01:00
AntoJvlt
6d56cbb3e8
Changed phrase_settings.py to phrase-settings.json and added migration function for old php settings file.
2021-03-23 23:30:39 +01:00
AntoJvlt
1a93319093
Changed phrase_settings.py to phrase-settings.json and added migration function for old php settings file.
2021-03-23 23:27:56 +01:00
Sarah Hoffmann
28b4fb12b6
Merge pull request #2233 from lonvia/index-for-postcode-ids
...
Create postcode id index earlier
2021-03-23 09:18:10 +01:00
Sarah Hoffmann
5dabc0aca8
create postcode id index earlier
...
Now that the indexer takes care of indexing the postcode tables,
the id index is needed to find the rows to index.
2021-03-22 22:24:56 +01:00
Sarah Hoffmann
4f1bdde32e
Merge pull request #2231 from mtmail/correct-cli-help-page
...
nominatim -h was printing wrong text for lookup and details
2021-03-21 16:52:20 +01:00
Sarah Hoffmann
a08ca5b1b5
avoid division by zero in progress meter
...
On Windows systems the timer may not be accurate enough to measure
the time between init() and done(). Avoid computing statistics with
a diff time of 0 in such cases.
Fixes #2230 .
2021-03-21 16:47:22 +01:00
marc tobias
87d5883ddb
nominatim -h was priting wrong text for lookup and details
2021-03-21 16:06:41 +01:00
AntoJvlt
d5acade4db
Deleted specialphrases.php and phrase_settings.php
2021-03-20 19:48:05 +01:00
AntoJvlt
9d1c23e4f5
Updated specialphrases_testdb.sql
2021-03-20 19:17:03 +01:00
AntoJvlt
17cb59efbd
Ported functions for the import of special phrases from php to python.
...
- the command is now --import-special-phrases
- the output is not an sql file anymore, data are directly imported to the database.
- the little part on the documentation (section data import) has been modified.
2021-03-20 19:11:50 +01:00
Sarah Hoffmann
118befd7d7
bdd tests: make indexing less verbose
...
Do not print progress info for indexing when there is an error
in the BDD tests.
2021-03-20 10:39:29 +01:00
Sarah Hoffmann
0d9fe6e49c
Merge pull request #2219 from lonvia/bdd-test-remove-php
...
BDD tests: run all setup via nominatim Python library
2021-03-17 11:40:34 +01:00
Sarah Hoffmann
ebae3553e0
bdd: run all setup via nominatim Python library
...
Drops all calls to PHP utility functions. nominatim cli functions
are used where possible, to stay as close to the final code as
possible with the tests.
By removing the PHP calls, the test code now only uses osm2pgsql and
the database module from the build directory.
2021-03-16 22:20:41 +01:00
Sarah Hoffmann
d3ff831b8a
Merge pull request #2216 from lonvia/fix-reverse-interpolation
...
Reverse: do not prefer interpolations over closer housenumbers
2021-03-15 14:08:54 +01:00
Sarah Hoffmann
4d7c5ec089
reverse: do not prefer interpolations over closer housenumbers
...
Always look up the closest housenumber before looking up
interpolations. This ensures that closer housenumbers are
preferred over interpolations.
Fixes #2214 .
2021-03-15 10:50:04 +01:00
Sarah Hoffmann
81a6b746b8
Merge pull request #2212 from darkshredder/country-name
...
Ported createCountryNames() to python and Added tests
2021-03-15 09:36:06 +01:00
Darkshredder
f356a75a24
Add setup.php
2021-03-14 15:02:30 +05:30
Sarah Hoffmann
7212fa8630
fix template variable name
2021-03-13 12:05:53 +01:00
Sarah Hoffmann
6cabc44841
Merge pull request #2213 from lonvia/tweak-search-weights
...
Some more tweaking of the ranking of search interpretations
2021-03-12 15:47:36 +01:00
Darkshredder
b108bd1c1e
Linting fix
2021-03-12 18:28:47 +05:30
Darkshredder
077a8c1f95
refactored tests and made changes to code for easy readibility
2021-03-12 18:23:20 +05:30
Darkshredder
7a874d5b97
Ported createCountryNames() to python and added tests
2021-03-12 10:28:41 +05:30
Sarah Hoffmann
9086a794a1
Merge pull request #2204 from darkshredder/tiger-data
...
Ported tiger-data-import to Python and Added Tarball Support
2021-03-11 22:48:38 +01:00
Sarah Hoffmann
6dd2b9c2ec
do not mix partial names with other words
...
As soon as a housenumber, postcode, etc. appear, the name term
must obviously be closed and no further partial terms can be
appended.
2021-03-11 22:44:49 +01:00
Sarah Hoffmann
3fbe4511f9
make linter happy
2021-03-11 21:14:23 +01:00
Sarah Hoffmann
3933fc3ad3
avoid multi-term partials in names
...
Names are either full words or single-word partial names.
Searching for multi-word partials yields exactly the same
result as with full words.
2021-03-11 20:42:37 +01:00
Sarah Hoffmann
00b05e2394
higher penalty for special searches
...
Adds a general higher penalty for special search term and an
additional one if the term is anywhere but the beginning or the
end. Also housenumbers and special searches together are less
likely.
2021-03-11 20:37:51 +01:00
Sarah Hoffmann
d5e8c5e975
do not mix partial and full name terms
...
If NameNonSearch already contains a partial term, then a
full term must not be added to the Name list anymore.
2021-03-11 20:22:54 +01:00
Sarah Hoffmann
478dfb0639
add one-rank penalty for using partial search
...
Ensures that full matches are preferred over partial ones even when
the full word consists of only one term.
2021-03-11 17:52:44 +01:00
Sarah Hoffmann
f498e40208
fix result splitting for last search group
...
When we are in the final iteration of the search groups, it is not
possible to further delay the results. Unconditionally use the
results with the best rank instead.
2021-03-11 17:14:46 +01:00
Sarah Hoffmann
182f5f5d7b
give preference to full words in address, too
...
Full word terms are already preferred for the name part. Adding
only one-word partials to the address, makes it impossible to
give a similar preference for the address part. Each term adds
a rank penalty. The problem here is that we interpret the query
forwards and backwards. Having different penalty systems for
name and address means that the same term ends up with different
penalties and that often leads to interpretations of the wrong
direction being in the way.
2021-03-11 15:03:36 +01:00
Darkshredder
e5719de657
Added fixture for sql_preprocessor and fixed some issues
2021-03-11 15:39:17 +05:30
Darkshredder
8486a83cf5
Added test for tarfile
2021-03-10 18:14:17 +05:30
Darkshredder
ccfad57fca
Added test and removed runlegacyscript
2021-03-10 17:18:12 +05:30
Darkshredder
64128b699a
fixed linting, refactored threaded sql handling and removed importTigerData() function
2021-03-10 13:28:29 +05:30
Darkshredder
4080fbb95c
Test fixes
2021-03-09 01:00:56 +05:30
Darkshredder
14ec83c886
Linting fixes
2021-03-08 23:10:49 +05:30
Darkshredder
122c4618b9
Linting fixes
2021-03-08 22:59:51 +05:30
Darkshredder
2af82975cd
Ported tiger-data-import to python and Added Tarball Support
2021-03-08 21:57:56 +05:30
Sarah Hoffmann
35f4695b67
Merge pull request #2200 from lonvia/migrations-for-current-version
...
Introduce a command for database migration
2021-03-08 10:14:03 +01:00
Sarah Hoffmann
3c9e09545e
documentation for new migration command
2021-03-06 16:38:37 +01:00
Sarah Hoffmann
764a41b973
automatic migration from 3.6 release
...
Adds a 'admin --migrate' command that checks for the current
database version and runs any necessary migrations. Also
has migrations going back to 3.6.
2021-03-06 16:36:57 +01:00
Sarah Hoffmann
9d103503f7
Merge pull request #2197 from lonvia/use-jinja-for-sql-preprocessing
...
Use jinja2 for SQL preprocessing
2021-03-04 16:36:18 +01:00
Sarah Hoffmann
09f4d767e4
port index creation to python
...
Also switches to jinja-based preprocessing, which allows to
simplify the SQL files. Use 'if not exists' where possible
so that the step can be rerun to fix missing indexes.
2021-03-04 11:11:47 +01:00
Sarah Hoffmann
dd301cf5ac
indexer: ANALYSE must be run outside transactions
2021-03-04 11:06:33 +01:00
Sarah Hoffmann
eacabb0e96
move table creation to jinja-based preprocessing
2021-03-03 22:07:51 +01:00
Sarah Hoffmann
6cda021d9b
add new jinja2 requirement
2021-03-03 17:51:08 +01:00
Sarah Hoffmann
d2bd6aa78d
introduce jinja2 for preprocessing SQL
...
Replaces various hand-crafted replacements of varying format with
a single Jinja2 templating mechanism. Allows full access to
configuration if necessary.
2021-03-03 17:51:08 +01:00
Sarah Hoffmann
6b306f30b6
Merge pull request #2194 from grischard/patch-1
...
Fix typo in .github/actions/build-nominatim/action.yml
2021-03-03 11:34:12 +01:00
Guillaume Rischard
c48fd18344
Update action.yml
2021-03-03 11:20:21 +01:00
Sarah Hoffmann
8ea7e04363
Merge pull request #2192 from lonvia/database-versioning
...
Introduce database versioning
2021-03-02 15:57:46 +01:00
Sarah Hoffmann
32c2d2b248
document new status fields
2021-03-01 22:21:37 +01:00
Sarah Hoffmann
111cca8c9a
return database version with status API
2021-03-01 22:17:16 +01:00
Sarah Hoffmann
7ae9c3a9f0
add database_version setting to tests
2021-03-01 21:49:33 +01:00
Sarah Hoffmann
bf4320a7d6
do not depend on cmdline parameter for creating partition tables
...
The partition numbers in use only depend on the entries in search_name.
2021-03-01 21:28:39 +01:00
Sarah Hoffmann
3a0a4b9175
save software version in the database
...
The version represents the software version that was used to
import the data.
2021-03-01 20:35:15 +01:00
Sarah Hoffmann
4faefe156c
report software version of status call
2021-03-01 16:47:19 +01:00
Sarah Hoffmann
86273f5e2a
introduce database patch level for version
...
This will be needed later for automatic migrations.
2021-03-01 16:46:19 +01:00
Sarah Hoffmann
b4f64aa770
make sure that calls to PHP legacy scripts are fatal on error
2021-03-01 16:10:45 +01:00
Sarah Hoffmann
976c5e9121
introduce table for in-database properties
...
Adds a simple table where settings for the database can be
saved. This is useful for state that must not change after
import.
2021-03-01 16:09:17 +01:00
Sarah Hoffmann
db663dd92f
remove unused import
2021-03-01 09:26:08 +01:00
Sarah Hoffmann
90a5d23016
use tmp_path fixture in config tests
2021-03-01 09:24:04 +01:00
Sarah Hoffmann
99e35d256a
fix typo
2021-03-01 09:07:49 +01:00
Sarah Hoffmann
e14e7c6235
Merge pull request #2186 from lonvia/port-import-to-python
...
Move setup procedure to Python
2021-02-27 12:09:23 +01:00
Sarah Hoffmann
b46adbad22
make sure psql always finishes
...
If an execption is raised by other means, we still have to close
the stdin pipe to psql to make sure that it exits and releases its
connection to the database.
2021-02-27 10:24:40 +01:00
Sarah Hoffmann
afabbeb546
older versions of Postgresql need explicit return type
2021-02-27 09:46:42 +01:00
Sarah Hoffmann
d14a3df10f
do not truncate search_name in reverse-only mode
2021-02-27 09:46:42 +01:00
Sarah Hoffmann
9feb84e426
actions: add psutil dependency
2021-02-26 16:50:09 +01:00
Sarah Hoffmann
c7f40e3cee
fix verbose flag for PHP wrapper scripts
...
The flag must come after the command.
2021-02-26 16:49:32 +01:00
Sarah Hoffmann
dd03aeb966
bdd: use python library where possible
...
Replace calls to PHP scripts with direct calls into the
nominatim Python library where possible. This speed up
tests quite a bit.
2021-02-26 16:14:29 +01:00
Sarah Hoffmann
15b5906790
move setup function to python
...
There are still back-calls to PHP for some of the sub-steps.
These needs some larger refactoring to be moved to Python.
2021-02-26 15:02:39 +01:00
Sarah Hoffmann
3ee8d9fa75
properly close connections of indexer after use
2021-02-26 12:10:54 +01:00
Sarah Hoffmann
57db5819ef
prot load-data function to python
2021-02-25 21:32:40 +01:00
Sarah Hoffmann
3c186f8030
add a function for the intial indexing run
...
Also moves postcodes to fully parallel indexing.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
db5e78c879
remove unused partitionfunction function
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
c7fd0a7af4
port wikipedia importance functions to python
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
32683f73c7
move import-data option to native python
...
This adds a new dependecy to the Python psutil package.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
7222235579
introduce custom object for cmdline arguments
...
Allows to define special functions over the arguments.
Also splits CLI tests in two files as they have become too many.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
f6e894a53a
port database setup function to python
...
Hide the former PHP functions in a transition command until
they are removed.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
b93ec2522e
use psql for executing sql files
...
This allows to run larger files without needing to keep
them in memory.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
af7226393a
add function to set up libpq environment
...
Instead of parsing the DSN for each external libpq program we
are going to execute, provide a function that feeds them all
necessary parameters through the environment.
osm2pgsql is the first user.
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
e520613362
convert connect() into a context manager
2021-02-25 18:42:54 +01:00
Sarah Hoffmann
204fe20b4b
Merge pull request #2185 from lonvia/fix-deadlock-handling-for-psycopg27
...
Improve deadlock detection for various versions of psycopg2
2021-02-25 18:39:40 +01:00
Sarah Hoffmann
a1f0fc1a10
improve deadlock detection for various versions of psycopg2
...
Psycopg2 has changed the kind of exception that is emitted on
deadlocks between versions 2.7 and 2.8. The code was already
trying to catch both kind of errors but because the
psycopg2.errors package is unknown in 2.7 and below, the
code would throw an exception on anything but a deadlock error.
This commit wraps the deadlock handling into a context manager
to avoid code duplication and uses module imports to detect if
the new error codes are available.
Also sets the required psycopg2 version to 2.7 or bigger as
versions below are difficult to test.
2021-02-25 18:11:16 +01:00
Sarah Hoffmann
68c3862270
Merge pull request #2182 from lonvia/change-error-for-details
...
Return 404 for details when no object is found in database
2021-02-23 09:09:35 +01:00
Sarah Hoffmann
5b7483ada5
return 404 for details when no bject is found in database
...
Fixes #2157 .
2021-02-22 16:28:29 +01:00
Sarah Hoffmann
72b01148d2
Merge pull request #2181 from lonvia/port-more-tool-functions-to-python
...
Port more tool functions to python
2021-02-22 16:11:21 +01:00
Sarah Hoffmann
971df231b0
avoid os.environ as default valie
2021-02-19 19:29:57 +01:00
Sarah Hoffmann
4b32cbe518
fix return code for check database run with 'not applicable'
2021-02-19 18:32:00 +01:00
Sarah Hoffmann
f08078ccca
bdd tests: directly call python code for setup-website
2021-02-19 18:20:55 +01:00
Sarah Hoffmann
389138abfe
port setup-website to python
2021-02-19 17:51:06 +01:00
Sarah Hoffmann
a0ae4945cd
add unit tests for new check_database code
2021-02-18 20:36:11 +01:00
Sarah Hoffmann
b169e4c88c
port check-database function to python
...
This change also adapts the hints to use the nominatim tool.
Slightly changed checks, so that they are just as effective on
a frozen database.
2021-02-18 17:32:30 +01:00
Sarah Hoffmann
a60c34bded
use a frozen DB for API tests
...
This way we also test that dropping does the right thing.
2021-02-17 22:35:27 +01:00
Sarah Hoffmann
153dbb71b8
remove unused code
2021-02-17 22:25:23 +01:00
Sarah Hoffmann
101a1f895d
port freeze function to python
2021-02-17 21:43:15 +01:00
Sarah Hoffmann
bd27310c68
Merge pull request #2173 from lonvia/penality-for-housenumberless-places
...
Increase penalty for places without housenumber
2021-02-17 17:52:59 +01:00
Sarah Hoffmann
42ecd535b3
Merge pull request #2174 from lonvia/disable-jit-for-osm2pgsql-again
...
Disable JIT and parallel execution for osm2pgsql updates again
2021-02-16 21:32:57 +01:00
Sarah Hoffmann
c9838a02ce
disable JIT and parallel execution for osm2pgsql updates again
...
The gazetteer output doesn't disable these functions when
writing to the place table but the triggers may contain
operations that cause misplanning for the query planner.
2021-02-16 18:23:47 +01:00
Sarah Hoffmann
7ebcf602ac
add simple test for result splitting with multiple ranks
2021-02-16 17:59:12 +01:00
Sarah Hoffmann
8eb85f1340
increase penalty for places without housenumber
...
Results where the housenumber was dropped are an unlikely result
when they refer to something other than a street. Therefore
increase their result rank so that other matches are tried first
before choosing them as a result.
Improves #2167 .
2021-02-16 17:47:06 +01:00
Sarah Hoffmann
2a8e3741fa
Merge pull request #2166 from mtmail/tiger-2020
...
documentation: 2020 TIGER data got released
2021-02-16 14:45:14 +01:00
Sarah Hoffmann
684378722c
Merge pull request #2171 from lonvia/update-vagrant-scripts-for-make-install
...
Update vagrant scripts for make install
2021-02-16 14:42:38 +01:00
Sarah Hoffmann
286a686f88
switch vagrant scripts to make install
2021-02-16 12:04:34 +01:00
Sarah Hoffmann
7360e6c5df
use file copy on older cmake to install osm2pgsql
...
Fixes #2170 .
2021-02-16 11:06:14 +01:00
Sarah Hoffmann
fbe7be760b
ignore failure to get replication date
2021-02-14 12:17:30 +01:00
marc tobias
a3ce89aeff
documentation: 2020 TIGER data got released
2021-02-12 23:57:12 +01:00
Sarah Hoffmann
6a7e0d652b
Merge pull request #2164 from lonvia/add-make-install
...
Make Nominatim installable
2021-02-12 10:32:26 +01:00
Sarah Hoffmann
7cc4c53adb
always return 0 for updates unless there is an error
...
This is more in line with previous behavioru than returning
a status code when no updates are available.
2021-02-11 10:33:49 +01:00
Sarah Hoffmann
24b13a7a87
docs: adapt check-database command
2021-02-10 21:55:04 +01:00
Sarah Hoffmann
b6c2dbf69c
actions: remove install directories before import
...
This ensures that any dangling references to the build
or source directory are caught by the CI.
2021-02-10 17:59:52 +01:00
Sarah Hoffmann
0e0e9a6809
need test database for analysing cli test
2021-02-10 16:19:51 +01:00
Sarah Hoffmann
ed60154552
actions: test import with installed version of Nominatim
2021-02-10 16:17:52 +01:00
Sarah Hoffmann
85589cf7dc
add 'make install' to installation instructions
2021-02-10 11:15:21 +01:00
Sarah Hoffmann
99dcd10d3f
test for existance of country grid in cmake already
...
Given that the file potentially gets installed, it needs to be
present during build time already. Checking during the import
is too late.
2021-02-10 10:40:36 +01:00
Sarah Hoffmann
745ae02f47
make installation targets conditional to what is built
2021-02-10 10:04:07 +01:00
Sarah Hoffmann
b6bd11f292
add make install target
...
Installation includes PHP andPython libraries, settings, the basic
country data, the postgresql module and our custom version of
osm2pgsql. The latter is installed in our private library directory
so that it does not get in the way of a potentially installed
osm2pgsql from the distribution.
2021-02-09 21:04:42 +01:00
Sarah Hoffmann
c60a0784ea
adapt unit tests to new directory structure
2021-02-09 20:13:00 +01:00
Sarah Hoffmann
3cb6f3e460
use DataDir constant for data only
...
So far the data directory constant has pointed to the source
directory to be usable with different subdirectories. Now only
the data subdirectory itself is being used with the constant,
so point to the directory directly.
2021-02-09 20:04:08 +01:00
Sarah Hoffmann
de37dc9300
forgot to replace one occurence of sql_dir
2021-02-09 19:32:05 +01:00
Sarah Hoffmann
8ffd7d9243
remove unused BINDIR constant
2021-02-09 19:30:31 +01:00
Sarah Hoffmann
298ed11261
introduce constant for configuration directory
...
This replaces {data_dir}/settings throughout the code, so that
the configuration may be placed somewhere else in the directory
structure (e.g. in /etc).
2021-02-09 18:45:45 +01:00
Sarah Hoffmann
b9517c99ae
rename sql directory to lib-sql
...
Also introduces a separate constant for the sql directory, so that
it can be put separately from the rest of the data if required.
2021-02-09 15:26:56 +01:00
Sarah Hoffmann
db3ced17bb
rename lib to lib-php
2021-02-09 11:52:07 +01:00
Sarah Hoffmann
248b4cddab
update osm2pgsql (disable install rule)
2021-02-09 09:48:50 +01:00
Sarah Hoffmann
d81e152804
integrate analyse of indexing into nominatim tool
2021-02-08 22:22:49 +01:00
Sarah Hoffmann
0cbf98c020
consolidate warm and db-check into single admin command
2021-02-08 21:05:06 +01:00
Sarah Hoffmann
195f9f5ef3
split cli.py by subcommands
...
Reduces file size below 1000 lines.
2021-02-08 17:23:05 +01:00
Sarah Hoffmann
a759c5b75b
move website into php library directory
2021-02-08 12:00:34 +01:00
Sarah Hoffmann
7dfe645b5f
move postcode table setup to sql/
...
Also moves the call to the setup from the setup-db
step to the calculate-postcodes step. The tables also need
no longer be accessible by the webservice.
2021-02-08 11:53:01 +01:00
Sarah Hoffmann
ca3283cbaa
remove unused SQL script
2021-02-08 11:28:24 +01:00
Sarah Hoffmann
861e67dfe8
fix off-by-one error in replication download
2021-02-04 17:04:04 +01:00
Sarah Hoffmann
82ef02cd1a
Merge pull request #2161 from lonvia/timeout-for-replication
...
Reintroduce timeout for replication file download
2021-02-04 16:52:24 +01:00
Sarah Hoffmann
948217d5e9
reintroduce timeout for replication file download
...
This ports the --socket-timeout parameter from
pyosmium-get-changes which ensures that the update
process eventually times out on hanging network connections.
2021-02-04 11:47:11 +01:00
Sarah Hoffmann
6cc06828db
Merge pull request #2160 from lonvia/introduce-project-dir
...
Officially introduce and recommend use of a project directory
2021-02-04 09:52:59 +01:00
Sarah Hoffmann
0b2abfb115
replace make serve with nominatim serve command
...
With the website directory now tied to the project directory instead
of the build directory, it is no longer possible to use make for
running the web server.
2021-02-03 16:34:31 +01:00
Sarah Hoffmann
b2f8fb6201
add migration info for status table
2021-02-03 14:13:09 +01:00
Sarah Hoffmann
e2329c03fe
Revert "increase splitting for large geometries"
...
This reverts commit 559fe513fa .
Increasing the splitting results in geometries where with rounding
issues at the split points, so that contain operations do not
work as expected anymore.
Fixes #2137 .
2021-02-03 10:23:38 +01:00
Sarah Hoffmann
9bca670b4e
adapt quick start instructions in README to project dir
2021-02-03 10:17:22 +01:00
Sarah Hoffmann
cb06d1f4ca
do not overwrite custom set module paths
...
Given that the module is now copied to the project directory
when no module path is set, we need the information that the
module path is empty. Therefore hand in the default module path
in a separate variable.
2021-02-02 18:31:25 +01:00
Sarah Hoffmann
36447c488a
print project directory before running any command
2021-02-02 11:19:31 +01:00
Sarah Hoffmann
69092030cd
make phpcs happy
2021-02-02 11:15:56 +01:00
Sarah Hoffmann
109aa9c428
actions: switch to using separate project dir
...
Also fixes reverse-only import which not run at all.
2021-02-02 11:03:09 +01:00
Sarah Hoffmann
1d97816c53
docs: add hint about putting the nominatim tool into the PATH
2021-02-02 10:56:40 +01:00
Sarah Hoffmann
7591c4fb42
copy database module on install
...
When no explicity database module is configured, then the
module is now copied into the project directory and used from
there. This means that Nominatim can be updated to a new
version of the module while existing installation keep their
version of normalisation.
2021-02-02 10:56:40 +01:00
Sarah Hoffmann
60cbeb165e
hand in absolute path to nominatim tool to php scripts
2021-02-02 10:56:40 +01:00
Sarah Hoffmann
bddfc109f8
refer to new nominatim tool in configuration comments
2021-02-02 10:56:40 +01:00
Sarah Hoffmann
b05c379b39
change the default location for external data to project dir
2021-02-02 10:56:40 +01:00
Sarah Hoffmann
7ba5283fe8
actions: revert to reletive paths for caching
2021-02-02 10:37:18 +01:00
Sarah Hoffmann
98fe5af07d
actions: remove setting custom .env
...
It only set the pyosmium-get-changes binary which is no longer
needed.
2021-02-02 10:35:30 +01:00
Sarah Hoffmann
59cb1d6c27
remove pyosmium-get-changes detection from cmake
...
pyosmium-get-changes is not longer used.
2021-02-02 10:33:15 +01:00
Sarah Hoffmann
0ad1b28497
Merge pull request #2155 from lonvia/port-regresh-to-python
...
Port replication and part of the refrsh function to native Python
2021-02-01 11:50:05 +01:00
Sarah Hoffmann
5f63d4ca1f
print nice summary after updates
2021-02-01 10:34:31 +01:00
Sarah Hoffmann
90aaab77fc
fix linting issues
2021-01-30 16:42:25 +01:00
Sarah Hoffmann
7158433cd3
disable warning about non-toplevel import
...
They are needed here so nominatim can be run when osmium
is not installed. Everything except replication will work fine.
2021-01-30 16:29:28 +01:00
Sarah Hoffmann
e629a175ed
introduce custom UsageError
...
This is a exception to be thrown when the error occures because
of bad user data. We don't want to print a full stack trace in
these cases but just tell the user what went wrong.
2021-01-30 16:20:10 +01:00
Sarah Hoffmann
45ea73913f
remove setting for PYOSMIUM_BINARY
...
pyosmium is now called as a library from the python code,
so that pyosmium-get-changes is no longer needed.
2021-01-30 15:55:04 +01:00
Sarah Hoffmann
01e0fd7e13
whitelist pyosmium for pylint
2021-01-30 15:52:49 +01:00
Sarah Hoffmann
4cb6dc01f3
port replication update function to python
2021-01-30 15:50:34 +01:00
Sarah Hoffmann
8f0885f6cb
port check-for-update function to python
2021-01-28 14:50:14 +01:00
Sarah Hoffmann
beb0fa0727
Merge pull request #2153 from rizkyarlin/patch-1
...
fix indentation
2021-01-28 09:06:33 +01:00
Muh. Rizky Eka Arlin
436cb9229b
fix indentation
2021-01-28 14:21:54 +08:00
Sarah Hoffmann
d78f0ba804
port replication initialisation to Python
2021-01-26 22:50:54 +01:00
Sarah Hoffmann
5b46fcad8e
convert functon creation to python
...
The new functions always creates normal and partitioned functions.
Also adds specialised connection and cursor classes for adding
frequently used helper functions.
2021-01-26 22:50:54 +01:00
Sarah Hoffmann
94fa7162be
port address level computation to Python
...
Also adds simple tests for correct table creation.
2021-01-26 22:50:54 +01:00
Sarah Hoffmann
e6c2842b66
move update code for postcode and word count to Python
...
Adds also tests for the new function to execute a SQL script.
2021-01-26 22:50:54 +01:00
Sarah Hoffmann
e6d9485c4a
cli: import python modules for commands on demand
...
Given that only one command will be executed in the end, it is
not necessary to import what amounts to the whole library. This
becomes in particular important for update functions that have
a dependency on pyosmium. The dependency can remain optional for
people not using updates.
2021-01-26 22:50:54 +01:00
Sarah Hoffmann
30cd2f2280
remove API comparison util
...
This is outdated and unmaintained. There are tools out there
which can do this better. Try, for example
https://github.com/radarlabs/api-diff
2021-01-26 22:46:35 +01:00
Sarah Hoffmann
2c909c1f0c
Merge pull request #2147 from lonvia/tests-for-python-code
...
Add basic set of tests for Python code
2021-01-21 10:07:50 +01:00
Sarah Hoffmann
063a4cb403
cli indexer tests need a fake database
...
The Indexer constructor opens a connection to the given database.
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
42ec67f63c
add more tests for CLI parameter parser
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
8c02786820
add tests for indexer
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
c26f323bf5
add simple tests for CLI parsing
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
041ae67fd9
optionally hand in command line arguments to CLI functions
...
Allows easier testing.
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
bfa6580ad5
use pytest mocking functions for manipulating os.environ
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
52b76d1d01
add tests for Python exec_utils
2021-01-20 21:30:27 +01:00
Sarah Hoffmann
a3767f9142
Merge pull request #2146 from mtmail/two-typos
...
correct parameter name in query CLI
2021-01-20 21:29:49 +01:00
marc tobias
f62c784102
correct parameter name in query CLI
2021-01-20 21:09:41 +01:00
Sarah Hoffmann
ffc221a87f
Merge pull request #2145 from lonvia/cli-query-functions
...
Add interface to search via command line tool
2021-01-20 09:00:45 +01:00
Sarah Hoffmann
8cf54a1317
add API functions to nominatim tool
2021-01-19 19:38:46 +01:00
Sarah Hoffmann
77e287f669
rename nominatim.admin to nominatim.tools
2021-01-19 19:38:46 +01:00
Sarah Hoffmann
5d95a72758
probe for php_cgi in cmake to be used for querying
2021-01-19 19:38:46 +01:00
Sarah Hoffmann
3475e1dfd6
Merge pull request #2143 from lonvia/integrate-indexer-into-nominatim-tool
...
Integrate indexer into nominatim tool
2021-01-19 08:42:22 +01:00
Sarah Hoffmann
504922ffbe
remove old nominatim.py in favour of 'nominatim index'
...
The PHP scripts need to know the position of the nominatim
tool in order to call it. This is handed in as environment
variable, so it can be set by the Python script.
2021-01-18 15:43:27 +01:00
Sarah Hoffmann
c77877a934
implementaion of 'nominatim index'
2021-01-18 15:43:27 +01:00
Sarah Hoffmann
27977411e9
move indexing function into its own Python module
...
This makes it mow a standard function of our new Python
library instead of a stand-alone program.
2021-01-18 15:43:27 +01:00
Sarah Hoffmann
b79c79fa73
add function to get a DSN for psycopg
...
Converts the PHP DSN syntax into psycopg syntax when necessary.
2021-01-18 15:43:27 +01:00
Sarah Hoffmann
cd0001b55a
Merge pull request #2142 from lonvia/update-bdd-api-tests
...
Update BDD API tests
2021-01-18 15:40:50 +01:00
Sarah Hoffmann
340e7f7210
bdd: complete coverage for API tests
...
Also removes some functions that are no longer used and
fixes debug output where the tests found an issue.
2021-01-17 16:12:06 +01:00
Sarah Hoffmann
f9c43137c9
remove unused output formatting functions
2021-01-16 17:39:49 +01:00
Sarah Hoffmann
171ed36e36
bdd: remove duplicated tests
2021-01-16 16:57:28 +01:00
Sarah Hoffmann
c6c907d451
bdd: clean up and extend API tests for details
...
- remove duplicates created by replacing HTML tests
with JSON tests
- add tests for newer functions for returning geometries
and hierarchies
2021-01-16 12:04:13 +01:00
Sarah Hoffmann
19ab038724
collect coverage for /website directory as well
2021-01-15 20:27:14 +01:00
Sarah Hoffmann
1c26fd489d
Merge pull request #2139 from lonvia/add-pytest
...
Introduce unit testing for Python code
2021-01-15 17:37:36 +01:00
Sarah Hoffmann
e8cfba1b10
pytest may also be installed as py-test[-3]
2021-01-15 17:22:31 +01:00
Sarah Hoffmann
496a3d29db
enable pytest testing in CI
2021-01-15 15:33:53 +01:00
Sarah Hoffmann
438ed431dd
add documentation for new pytest tests
2021-01-15 15:18:45 +01:00
Sarah Hoffmann
f1f0032758
add pytest as a test goal in cmake
2021-01-15 15:09:36 +01:00
Sarah Hoffmann
eb3b789855
add initial pytest test for Configuration
2021-01-15 14:42:03 +01:00
Sarah Hoffmann
c077050855
Merge pull request #2136 from lonvia/introduce-pylint
...
Introduce pylint for code style checking for Python.
2021-01-15 14:39:26 +01:00
Sarah Hoffmann
d9998bfab3
pylint may be available as pylint3 or pylint
2021-01-15 10:52:25 +01:00
Sarah Hoffmann
7cf9d459d6
use check parameter of subprocess.run
...
...instead of checking on our own.
Also increase required version of Python to 3.5 because of
subprocess.run().
2021-01-15 10:43:04 +01:00
Sarah Hoffmann
de724aa576
add pylint to list of required linting tools
...
With pylint being run in the CI, passing it is required now.
2021-01-15 10:43:04 +01:00
Sarah Hoffmann
8e53f63036
fix errors reported by pylint
2021-01-15 08:57:00 +01:00
Sarah Hoffmann
565356613a
Merge pull request #2135 from lonvia/python-frontend
...
Introduce new 'nominatim' all-in-one command-line tool
2021-01-15 08:56:07 +01:00
Sarah Hoffmann
eda0900c8e
fix typo
2021-01-14 20:30:27 +01:00
Sarah Hoffmann
3dd67083b2
replace Symfony dotenv dependency with Python dotenv
2021-01-14 18:31:18 +01:00
Sarah Hoffmann
2f73bb3643
bdd: directly call utility scripts in lib
...
This removes the dependency on php-symfony-dotenv for the tests.
2021-01-14 18:19:22 +01:00
Sarah Hoffmann
9348fc5e15
move dotenv parsing to installed PHP scripts
...
This means that the php-symfony-dotenv library is now only needed
when using the legacy scripts. This includes the BDD tests which
currently still rely on the PHP utils.
2021-01-14 18:06:22 +01:00
Sarah Hoffmann
97710ee9d1
use cli tool for github CI
2021-01-14 16:35:01 +01:00
Sarah Hoffmann
9619cb3fe5
forward cli tool return value as exit code
2021-01-14 14:36:41 +01:00
Sarah Hoffmann
1c1e951826
adapt documentation to new nominatim cli tool
2021-01-14 12:12:38 +01:00
Sarah Hoffmann
88c57b4dc8
maller command execution fixes
2021-01-14 12:03:49 +01:00
Sarah Hoffmann
ba13cfd9ff
make sure that environment variables have highest prio
2021-01-14 11:12:45 +01:00
Sarah Hoffmann
1ff8751caa
liniting of new python code
2021-01-14 10:19:21 +01:00
Sarah Hoffmann
98dbc84836
add wrapper calls for all nominatim tool functions
2021-01-14 09:37:47 +01:00
Sarah Hoffmann
0847964a27
avoid accessing constants when getting data from env
...
When a setting can be read from the environment variable, avoid
accessing the internal defaults. This way the scripts can be
accessed directly in \lib as long as the environment is set up
correctly with full defaults.
2021-01-14 09:37:04 +01:00
Sarah Hoffmann
bc09d7aedb
fix access to environment variable
2021-01-14 09:29:43 +01:00
Sarah Hoffmann
04690ad8c4
implement warming in new cli tool
...
Adds infrastructure for calling the legacy PHP scripts. As the
CONST_* values cannot be set from the python script, hand the values
in via secret environment variables instead. These are all
temporary hacks for the transition phase to python code.
2021-01-13 18:25:15 +01:00
Sarah Hoffmann
ec636111ba
warm.php needs constant setup for queries
...
Warming is done using the query classes and therefore the same
copy-over from dotenv settings to CONST_* parameters is needed
as for query.php.
2021-01-13 18:12:53 +01:00
Sarah Hoffmann
e467b956ff
set CONST_LibDir directly from the source scripts
...
Now that the source scripts have been moved to \lib, they
can determine the position of the PHP library relative to
themselves.
2021-01-13 17:00:38 +01:00
Sarah Hoffmann
ff5a237200
move PHP utilities into the lib directory
...
These are not called directly as programs but used in a library
fashion by the installed utilities. So the library directory
is a better place.
2021-01-13 14:44:45 +01:00
Sarah Hoffmann
d6bcb7c8b7
consolidate cli interface to single tool
2021-01-13 10:11:58 +01:00
Sarah Hoffmann
57f5e6d898
create skeleton for new CLI tools
2021-01-12 22:21:20 +01:00
Sarah Hoffmann
612fd50612
add skeleton for new Nominatim executables
2021-01-12 10:17:28 +01:00
Sarah Hoffmann
a74e736283
Merge pull request #2132 from lonvia/reduce-api-testdb
...
Reduce BDD API test database to Liechtenstein
2021-01-11 10:42:22 +01:00
Sarah Hoffmann
86cd5ddd65
also run BDD API tests in CI
2021-01-09 17:58:06 +01:00
Sarah Hoffmann
812de0545d
test can be run all in one go with make
2021-01-09 17:57:30 +01:00
Sarah Hoffmann
3bed5516da
update documentation for new BDD API tests
2021-01-09 17:54:45 +01:00
Sarah Hoffmann
0495dbe756
bdd: add new API test data
...
Make all data necessary for API tests directly available in the
repository.
2021-01-09 17:01:33 +01:00
Sarah Hoffmann
5d656891ba
bdd: convert API tests to smaller test db
...
Changes BDD API tests to restrict themselves to
Liechtenstein. One test moved to DB as no appropriate
data is available.
2021-01-09 16:59:46 +01:00
Sarah Hoffmann
74122dc965
bdd: improve assert output for API query checks
...
Adds wrapper function for checking address parts and
more explanation strings to asserts.
2021-01-09 16:58:37 +01:00
Sarah Hoffmann
ee18a511c6
bdd: import API test DB as part of step setup
...
In the future, the BDD tests will simply set up the required
test database themselves. Like with the template database, it
is not reimported when it already exists unless that is explicitly
forced.
Makes most of the API tests currently fail because they still
point to old test data.
2021-01-07 11:51:38 +01:00
Sarah Hoffmann
da20881096
Merge pull request #2129 from lonvia/cleanup-bdd-tests
...
Clean up Python support code for BDD tests
2021-01-07 09:10:40 +01:00
Sarah Hoffmann
aaabb46f20
add symphony dotenv to prerequisites list
2021-01-07 08:56:52 +01:00
Sarah Hoffmann
49142eb6e5
use relative dir for sources for phpunit
2021-01-07 08:55:15 +01:00
Sarah Hoffmann
73cbb6eb9a
bdd: clean up DB ops steps
...
Adds comments and modernizes code.
2021-01-06 16:37:32 +01:00
Sarah Hoffmann
1f29475fa5
bdd: move column comparison in separate file
...
Introduces a new class DBRow that encapsulates the comparison
functions. This also is responsible for formatting more informative
assert messages. place and placex steps are unified.
2021-01-06 12:28:09 +01:00
Sarah Hoffmann
d586b95ff1
bdd: move nominitim id reader to separate file
2021-01-05 16:00:48 +01:00
Sarah Hoffmann
25557e5f14
bdd: factor out reindexing on updates
2021-01-05 15:17:46 +01:00
Sarah Hoffmann
197870e67a
bdd: move place table inserter into separate file
...
Also simplifies usage by implementing a function that inserts
a complete table row.
2021-01-05 12:12:59 +01:00
Sarah Hoffmann
b8e39d2dde
bdd: move scene setup to OSM data steps
...
The step has nothing to do with the database.
2021-01-05 11:42:28 +01:00
Sarah Hoffmann
5dfa76a610
bdd: switch to auto commit mode
...
Put the connection to the test database into auto-commit mode
and get rid of the explicit commits. Also use cursors always in
context managers and unify the two implementations that copy
data from the place table.
2021-01-05 11:42:28 +01:00
Sarah Hoffmann
58c471c627
bdd: remove class for lazy formatting
...
assert in combination with format() does the right thing and calls
the __str__() method only when an assertion hits.
2021-01-05 10:39:44 +01:00
Sarah Hoffmann
213bf7d19d
bdd: rename db_ops steps
...
Now all files implementing steps are called steps_*.py.
2021-01-05 10:20:00 +01:00
Sarah Hoffmann
12ae8a4ed3
bdd: move output format computation into response
2021-01-05 10:17:59 +01:00
Sarah Hoffmann
8a93f8ed94
bdd: move Response classes in own file and simplify
...
Removes most of the duplicated parse functions, introduces
a common assert_field function with a more expressive error
message.
2021-01-05 10:03:47 +01:00
Sarah Hoffmann
2712c5f90e
bdd: rename and clean up osm_data steps
...
Move common OPL creation code into a function and remove
unused imports.
2021-01-04 20:17:17 +01:00
Sarah Hoffmann
72587b08fa
bdd: move external process execution in separate func
2021-01-04 19:58:59 +01:00
Sarah Hoffmann
faa85ded50
bdd: move NominatimEnvironment into separate file
...
Also cleans up and modernizes the code and adds documentation.
2021-01-04 17:54:51 +01:00
Sarah Hoffmann
14e5bc7a17
bdd: move grid generation code into geometry factory
2021-01-04 17:04:47 +01:00
Sarah Hoffmann
f727620859
bdd: move geoemtry creation into separate file
...
Also renames the OsmDataFactory in the more appropriate
GeometryFactory and modernizes code for python3.
2021-01-04 16:34:40 +01:00
Sarah Hoffmann
843d3a137c
remove stale code for python2
2021-01-04 14:14:34 +01:00
Sarah Hoffmann
e4691005e2
Merge pull request #2125 from lonvia/independent-project-directory
...
Allow for truely independent project directory
2021-01-04 14:10:24 +01:00
Sarah Hoffmann
4aba70caee
create a temporary project dir for tests
...
The project directory contains the website script as
configured through the test configuration. This means
that tests are now completely independet of any
configuration that may be contained in the build
directory.
Also removes the hack to inject additional settings via
a environment variable.
2021-01-04 11:39:45 +01:00
Sarah Hoffmann
5e989b9296
configure osm2pgsql and module location via cmake
...
The default location of osm2pgsql and the postgresql module
is decided at compile/installation time and is not necessarily
in the project directory.
With this change it is now possible to have a project directory
that is completely separate from the build directory.
2021-01-04 11:37:56 +01:00
Sarah Hoffmann
cba2d252c8
Merge pull request #2124 from lonvia/remove-nose
...
Remove nose dependency for tests
2021-01-03 21:04:59 +01:00
Sarah Hoffmann
2ecec19df0
remove nose requirement from documentation
2021-01-03 17:23:44 +01:00
Sarah Hoffmann
4ca7197826
replace nose assertions with simple asserts
2021-01-03 17:21:24 +01:00
Sarah Hoffmann
a8ec250993
Merge pull request #2119 from mtmail/check-import-finished-when-tables-droped
...
utils/check_import_finished: skip some checks when setup ran with --drop
2020-12-22 15:57:48 +01:00
Sarah Hoffmann
f3e0e401fd
Merge pull request #2118 from mtmail/vagrant-ubuntu-dotenv
...
Vagrant ubuntu: install dotenv package
2020-12-22 15:54:48 +01:00
marc tobias
d60f89867b
utils/check_import_finished: skip some checks when setup ran with --drop
2020-12-21 20:12:31 +01:00
marc tobias
b133f2bc4c
Vagrant ubuntu: install dotenv package
2020-12-21 20:10:13 +01:00
Sarah Hoffmann
301fd7f7e8
Merge pull request #2115 from lonvia/use-dotenv
...
Switch configuration to dotenv
2020-12-21 11:33:38 +01:00
Sarah Hoffmann
45148c7078
switch documentation to describing dotenv
2020-12-20 12:09:27 +01:00
Sarah Hoffmann
3c75194448
adapt instructions for creating the test db to dotenv
2020-12-20 11:53:19 +01:00
Sarah Hoffmann
f218e20522
mark CentOS installation instructions as broken
...
Getting symfony-dotenv installed on CentOS is a major pain,
so just mark it broken instead.
Still sSwitch the config format to dotenv already.
2020-12-20 11:35:29 +01:00
Sarah Hoffmann
33b038ce6f
tests: always create the config file
...
There is also one database test that uses the API functions.
2020-12-19 17:55:46 +01:00
Sarah Hoffmann
f62c65e9d9
adapt php tests to new directory constants
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
867baab3d1
make phpcs happy
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
63ad0cb498
github actions: need dotenv
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
433017b990
move creation of website scripts to setup script
...
Instead of creating the website wrapper scripts with cmake,
they are now created when --setup-website is called. The
setup of the configuration constants is directly embedded
into the scripts. This means we can get rid of the separate
settings-frontend.php. More importantly however, it means
that it is now possible to set up multiple website directories
from the same build directory.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
d97aed8741
adapt tests to new dotenv environment
...
DB tests now can simply set the environment to change configuration
variables. API tests still rely on a configuration file.
Also, query.php needs to set up the CONST_* variables to work with
the query scripts. That is a tiny bit messy and duplicates code
but this part will need to be reworked later.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
06d89e1d47
fix various typos
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
8676e45d88
remove old default settings
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
992d3faac8
switch all utils to initialising dotenv
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
0947b61808
switch remaining settings to dotenv format
...
CONST_Search_AreaPolygons and CONST_Search_ReversePlanForAll have
been removed completely.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
d43f30903c
use explicit DSN for website scripts
...
Website scripts have no access to the dotenv variables, so use
the DSN constant instead when connecting to the database.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
15a1666f8a
replace database settings with dotenv variant
...
As we can't refer to the project root dir in the module path, the
module path may now also be a relative directory which is then
taken as being relative to the project root path.
Moves the checkModulePresence() function into the Setup class, so
that it can work on the computed absolute module path.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
25bdd7c6d9
introduce dotenv parsing for setup.php
...
This adds the notion of a project directory. This is the directory
that holds all necessary files for one specific installation of
Nominatim. Dotenv looks for an .env file in this directory and
adds it to the global environment together with the defaults from
Nominatim's data directory.
Add's symfony's dotenv library as a new dependency.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
ac116980ac
make HTTP proxy setup explicit
...
The setup relies on the project configuration which we want to
explicitly set up in later steps. Therefore proxy setup needs to
be done explicitly as well. There is the added bonus that the
setup is done only for the utils which try to call outside.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
b5480f6e36
reorganise path settings in config
...
CONST_BasePath is split into separate configuration variables
for binaries, libraries and data. These variables as well as
the installation path are now set in the executable directly and
no longer configurable via project settings.
This is the first step towards an installable software. The
executables should know per installation where to find their
necessary data to execute. Project configuration needs to be
restricted to settings that really concern the specific Nominatim
installation.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
17a8cc5e29
use /usr/bin/env for python script
...
Makes it easier to use the script with a virtualenv setup.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
aeeee0d5da
Merge pull request #2112 from lonvia/fix-tests-for-php-8
...
work around failing CI tests
2020-12-18 14:25:50 +01:00
Sarah Hoffmann
de03a0f924
work around failing CI tests
...
Force use of phpunit7 to avoid an issue with different sort order.
2020-12-18 10:58:09 +01:00
Sarah Hoffmann
5528918d5d
Issue templates: require postgres config modifications
2020-12-18 10:37:01 +01:00
Sarah Hoffmann
9e0d5cb669
Issue templates: more commenting of instructions
2020-12-16 08:41:20 +01:00
Sarah Hoffmann
11622b2863
Issue templates: put instructions into comments
2020-12-16 08:38:04 +01:00
Sarah Hoffmann
9610664fc5
prepare 3.6.0 release
2020-12-13 11:59:16 +01:00
Sarah Hoffmann
eed2e3f2a8
Merge pull request #2105 from lonvia/fix-use-of-records
...
Use a typed record for place info in get_addressdata
2020-12-13 09:48:21 +01:00
Sarah Hoffmann
1b62162e08
actions: run tests also on postgresql 9.5
...
This is the oldest version for which a postgis is available.
2020-12-12 20:55:54 +01:00
Sarah Hoffmann
5cf573c340
use a typed record for place info in get_addressdata
...
Older versions of Postgresql cannot handle an untyped record
for INTO.
Fixes #2100 .
2020-12-12 14:46:34 +01:00
Sarah Hoffmann
76cd8bf258
Merge pull request #2102 from mtmail/typo-in-reverse-md
...
Reverse.md: fix two typos
2020-12-12 10:16:23 +01:00
marc tobias
31ba7e7cf0
Reverse.md: fix two typos
2020-12-12 00:30:26 +01:00
Sarah Hoffmann
a338ba695b
Merge pull request #2101 from lonvia/update-documentation
...
Update documentation
2020-12-11 18:02:44 +01:00
Sarah Hoffmann
9f6e2de4ed
fix typos
2020-12-11 17:08:13 +01:00
Sarah Hoffmann
1b3acc4f8f
update import times
2020-12-11 16:53:38 +01:00
Sarah Hoffmann
56cf3b362e
Merge pull request #2099 from lonvia/update-country-names
...
Dynamically update country names from OSM data
2020-12-10 17:56:32 +01:00
Sarah Hoffmann
b59d01fe85
update country names
...
Copies all name:xx country names that are in OSM as of today
into the country name fallback table.
2020-12-09 17:52:25 +01:00
Sarah Hoffmann
65d8770b28
update country_names from OSM data
...
Update names in the coutry_names table on the fly from incomming
OSM country data. Adding a small sanity check that the country
must be an OSM relation and within the area where we expect the
country to be.
2020-12-09 11:38:19 +01:00
Sarah Hoffmann
38582c3e52
Merge pull request #2096 from otbutz/patch-1
...
Add link to discussions when creating new issue
2020-12-09 09:55:59 +01:00
otbutz
5f6fe6cab7
Add link to discussions when creating new issue
2020-12-09 09:33:42 +01:00
Sarah Hoffmann
34f8e6ddf7
remove bug reporting hints in favour of issue templates
2020-12-08 17:47:38 +01:00
Sarah Hoffmann
603367dced
updates to admin and develop documentation
...
Mostly minor updates in wording and resource consumption.
2020-12-08 17:47:38 +01:00
Sarah Hoffmann
eaee87e73d
update API documentation
...
* remove traces of HTML output
* add details on artificial objects (see also #1671 )
* add geometry output documentation for lookup
* deprecate query by ID via reverse endpoint
* remove /search/<query> query format, no longer supported
* explain better what reverse geocoding does
* lots of smaller fixes to wording
2020-12-08 17:47:38 +01:00
Sarah Hoffmann
ea844db847
do not classify housenumbers as rare
...
House numbers are highly redundant, so don't even attempt to
do it as a rare name search. Greatly improves speed of such
queries.
2020-12-08 17:25:15 +01:00
Sarah Hoffmann
3ca8cc0344
Merge pull request #2092 from lonvia/update-osm2pgsql
...
Update osm2pgsql to 1.4.0 release
2020-12-08 10:56:25 +01:00
Sarah Hoffmann
f67c06f128
update osm2pgsql to 1.4.0 release
2020-12-08 10:18:18 +01:00
Sarah Hoffmann
7889509856
Create issue templates
2020-12-06 22:24:45 +01:00
Sarah Hoffmann
67c995aef6
Merge pull request #2090 from lonvia/avoid-contains-operator
...
avoid contains operator for geometries
2020-12-03 09:39:50 +01:00
Sarah Hoffmann
e20defeebd
avoid contains operator for geometries
...
Postgis keeps messing up use of index in some circumstances.
2020-12-02 22:18:27 +01:00
Sarah Hoffmann
cca646a19e
Merge pull request #2087 from lonvia/only-one-link-per-node
...
Place nodes can only be linked once against boundaries
2020-12-02 22:16:56 +01:00
Sarah Hoffmann
ddc2b4b806
Merge pull request #2088 from lonvia/update-osm2pgsql
...
update osm2pgsql
2020-12-02 22:16:38 +01:00
Sarah Hoffmann
0334915067
update osm2pgsql
...
Needs now an explicit switch to avoid propagating changes from
nodes to ways to relations.
2020-12-02 18:27:18 +01:00
Sarah Hoffmann
987d60ccda
place nodes can only be linked once against boundaries
...
If a place node is already linked against a boundary, it should not
be used for linking again. It is usually a sign of a mapping error,
when there are multiple boundary candidates. This change just avoids
inconsistent data in the database, it does not guarantee that the
linking is against the more correct boundary.
2020-12-02 15:31:02 +01:00
Sarah Hoffmann
7d520bf448
also add explicit cast for varchar
2020-12-01 22:15:51 +01:00
Sarah Hoffmann
dc53288e6b
Merge pull request #2085 from lonvia/add-address-rank-to-xml-output
...
add address rank to XML output
2020-12-01 19:59:29 +01:00
Sarah Hoffmann
db02673b60
Merge pull request #2084 from lonvia/fix-term-count
...
fix use of term count in partial terms
2020-12-01 19:59:07 +01:00
Sarah Hoffmann
cf9b248f29
add address rank to XML output
...
The address rank is much more interesting than the search rank
these days because it tells something about the kind of object.
Reverse did have neither rank, so add both for consistency.
2020-12-01 17:54:53 +01:00
Sarah Hoffmann
df12954312
fix use of term count in partial terms
...
Term count for partial words is one less than the actual number
of words. Take that into account when adding to the search rank.
Fixes #2081 .
2020-12-01 17:21:01 +01:00
Sarah Hoffmann
a9357b4dce
Merge pull request #2082 from lonvia/compute-address-on-the-fly-II
...
Compute address for POIs on the fly
2020-12-01 16:41:31 +01:00
Sarah Hoffmann
63544db8f9
null entries need to be typed
2020-12-01 14:54:42 +01:00
Sarah Hoffmann
7295cad715
compute address parts for rank 30 objects on the fly
...
Rank 30 objects usually use the address parts of their parent.
When the parent has address parts that are areas but not marked
as isaddress, then the parent might go through multiple administrative
areas. In that case recheck if the right area has been choosen
for the object in question instead of relying on isaddress.
Note that we really only have to do the recomputation in the
case of 'isarea = True and isaddress = False' which hopefully
keeps the number of additional geometric operations we have to do
to a minimum.
There is one more special case to be taken into account here: a
street may go through two administrative areas and a house along
that street is placed in one of the area while the addr:* tags
says it belongs to the other. In that case we must not switch
the isaddress to the one it is situated. To avoid that recheck
the address names against the name of the ara. That is not perfect
but should cover most cases.
Fixes #328 .
2020-12-01 11:58:25 +01:00
Sarah Hoffmann
ff85da0a31
cleanup get_addressdata
...
Save location data in a ROW instead of using separate varaibles
for each value.
2020-11-30 22:54:36 +01:00
Sarah Hoffmann
75b2d7ca99
Merge pull request #2080 from donalhunt/fix-Migration.md-typos
...
Migration.md: fix typos, improve style consistency and readability.
2020-11-30 16:21:35 +01:00
Donal Hunt
3c9eeb11fa
Migration.md: fix typos, improve style consistency and readability.
2020-11-30 11:59:10 +00:00
Sarah Hoffmann
63bacaee2e
Merge pull request #2079 from lonvia/improve-progress-logging
...
Improve progress logging during indexing
2020-11-30 11:42:08 +01:00
Sarah Hoffmann
5016eace34
improve progress logging during indexing
...
Wait for 2 seconds before logging the first progress, so that we
have numbers that are a bit more reliable statistically speaking.
Also provides an actual implementation for the log_interval
parameter and fixes some small style issues.
2020-11-30 10:59:29 +01:00
Sarah Hoffmann
2e5c8b5cd3
Merge pull request #2077 from lonvia/optimize-large-rank-0-areas
...
Restrict size of features that get a full address search
2020-11-26 14:40:54 +01:00
Sarah Hoffmann
bf0f81adcb
Merge pull request #2076 from lonvia/search-name-index-migration
...
Docs: add migration for search_name_* tables
2020-11-26 12:01:38 +01:00
Sarah Hoffmann
2db751700e
restrict size of features that get a full address search
...
It would be nice to always compute addresses for rank 0 objects
over the complete geometry, so that they can be found via all
the admin boundaries that they intersect. However, there are a
couple of extramely large boundaries in OSM (like timezones)
where this results in thousands of possible address candidates
that need to be checked. Fall back to getting the address of the
centroid for them.
2020-11-26 11:53:58 +01:00
Sarah Hoffmann
62bee4ed37
docs: add migration for search_name_* tables
2020-11-26 09:18:33 +01:00
Sarah Hoffmann
1f07d63dc5
Merge pull request #2075 from lonvia/filter-postcodes-from-location-area-large
...
Filter postcodes by search rank when adding to address list
2020-11-25 21:42:27 +01:00
Sarah Hoffmann
cc1af99dbd
filter postcodes by search rank when adding to address list
...
The post codes are the last part that does not fit the new
address ranking scheme. In particular, the search rank is still
relevant for choosing if a postcode should be included into
the address terms. Filter out irrelevant postcodes in
getNearFeatures() already, to avoid having to check for
geometry relation.
2020-11-25 21:01:33 +01:00
Sarah Hoffmann
c5d98effc0
Merge pull request #2074 from lonvia/add-housenumber-to-unknown-places
...
Improve finding addresses that have their own search_name entry because of unknown addr:* parts
2020-11-25 16:57:09 +01:00
Sarah Hoffmann
b68b2ff6b8
Merge pull request #2073 from lonvia/multi-word-partial-terms-in-search-description
...
Improve handling of multi-word partials in SearchDescription
2020-11-25 16:57:00 +01:00
Sarah Hoffmann
57f0d55c2e
make phpcs happy
2020-11-25 16:14:31 +01:00
Sarah Hoffmann
3cf763475f
do not use artificial housenumbers as names
...
If they are artificial they cannot have a search_name entry.
2020-11-25 16:11:32 +01:00
Sarah Hoffmann
0f87da017f
improve handling of multi-word partials in SearchDescription
...
Multi-word partial terms had an undue advantage over separate partial
terms because they only need to pay the penalty once. This changes
the behaviour by setting the penalty according to the number of
words in the token. This should get rid of search interpretations
with low chance of matching.
This also fixes handling of exact term matching. We now match against
all exact terms of the query, not just a couple of them collected
while building the interpretations.
Also adds a penalty to very short postcodes.
2020-11-25 12:07:04 +01:00
Sarah Hoffmann
22800d7d59
Search housenumbers with unknown address parts by housenumber term
...
House numbers need special handling because they may appear after
the street term. That means we canot just use them as the main name
for searches where the address has its own search term entries.
Doing this right now, we are able to find '40, Main St, Town' but not
'Main St 40, Town'.
This switches to using the housenumber token as the name term instead.
House number tokens can get special handling when building the search
query that covers the case where they come after the street.
The main disadvantage is that this once more increases the numbers
of possible search interpretation of which we have already too many.
no penalty for housenumber searches
2020-11-25 11:36:10 +01:00
Sarah Hoffmann
f21853ea9d
Merge pull request #2071 from lonvia/fix-more-ranks
...
Search rank 30 must always go with address rank 30
2020-11-24 21:45:30 +01:00
Sarah Hoffmann
1e76d668bd
Merge pull request #2070 from lonvia/unlisted-places-to-rank-25
...
Move unlisted places to address rank 25
2020-11-24 21:45:16 +01:00
Sarah Hoffmann
b4b50eef15
search rank 30 must always go with address rank 30
2020-11-24 17:57:28 +01:00
Sarah Hoffmann
a9ad390b9e
move unlisted places to address rank 25
...
Unlisted places are derived from addr:place and as such are
still places not streets.
2020-11-24 17:54:00 +01:00
Sarah Hoffmann
2e9e961fff
Merge pull request #2068 from lonvia/fix-reverse-only
...
Do not create POI search terms in reverse-only mode
2020-11-24 08:22:48 +01:00
Sarah Hoffmann
13180989d9
Test --reverse-only with CI
2020-11-23 22:36:28 +01:00
Sarah Hoffmann
a4f1e40b72
do not create POI search terms on reverse-only
...
Fixes #2067 .
2020-11-23 19:55:36 +01:00
Sarah Hoffmann
04d485c550
Merge pull request #2065 from rustycamper/patch-1
...
viewbox arguments are no longer accepter "in any order"
2020-11-23 09:55:29 +01:00
Pietro
a92bd1e2db
viewbox arguments are no longer accepter "in any order"
...
Order should be longitude, then latitude
2020-11-23 10:40:43 +02:00
Sarah Hoffmann
f89e71a861
make sure that admin levels in NL are kept in order
2020-11-19 09:44:02 +01:00
Hendrik Morée
dcc075b34b
Admin levels 8 and 10 of the Netherlands are municipal / city
2020-11-18 11:30:24 +01:00
Sarah Hoffmann
49083c2597
Merge pull request #2058 from lonvia/split-address-words
...
Split addr:* tags into words before adding to the search index
2020-11-18 08:58:17 +01:00
Sarah Hoffmann
29785ba166
Merge pull request #2059 from lonvia/include-parent-name-for-unknown-places
...
POIs with unknown addr:place must add parent name to address
2020-11-18 08:58:03 +01:00
Sarah Hoffmann
ffb2c93ba3
POIs with unknown addr:place must add parent name to address
...
The previous behaviour was a left-over from a former version
where such POIs parented to the street. Now that they parent to
places, it should be included.
2020-11-17 19:44:43 +01:00
Sarah Hoffmann
30a6b6bdac
split addr: tags into words before adding to the search index
...
Address parts are only matched by single partial words. If
the addr: names are not split, then multi-word names cannot
be found.
2020-11-17 18:03:33 +01:00
Sarah Hoffmann
cc345f531a
Merge pull request #2056 from lonvia/avoid-linking-postal-areas
...
Disallow linking for postcode areas
2020-11-17 11:15:56 +01:00
Sarah Hoffmann
9ede048769
disallow linking for postcode areas
2020-11-17 10:53:26 +01:00
Sarah Hoffmann
d23bf6e659
Merge pull request #2054 from lonvia/display-addr-terms
...
Merge places into address lists referred to by addr:* tags but not computed by Nominatim
2020-11-16 16:08:06 +01:00
Sarah Hoffmann
6b60f0ab03
use bool_or(ST_Intersects) instead of ST_Intersects(ST_Collect)
...
ST_Intersects segfaults on geometry collections for certain versions
of Postgis 3.
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
aa9923bf07
fix typo
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
9160cce6d8
remove unused columns in search_name_* and use right index
...
We only need the address rank these days, so get rid of
search rank. Also switch indexes to work on address rank.
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
885dc0a8e1
more tests for absense of additional addressline entries
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
7324431b12
get additional addresses for rank 30 objects
...
get_addressdata() now also checks if the place itself has entries
in the place_addressline table and merges them into the results.
Also restrict checking for address tag places to cases where the
name cannot be found in the parent's address search terms. Looking
up all address tags is just too slow.
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
021f2bef4c
get address terms from address tags for rank 30
...
For rank 30 objects add extra elements into the place_addressline
table.
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
6260fef2e8
add test for placex from addr tags
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
c7472662a6
lookup places for address tags for rank < 30
...
While previously the content of addr:* tags was only added
to the list of address search keywords, we now really look up
the matching place. This has the advantage that we pull in all
potential translations from the place, just like all the other
address terms that are looked up by neighbourhood search.
If no place can be found for a given name, the content of the
addr:* tag is still added to the search keywords as before.
2020-11-16 15:28:01 +01:00
Sarah Hoffmann
fecfe62fc6
Merge pull request #2055 from lonvia/fix-actions
...
Actions: update apt repo before installing software
2020-11-16 11:26:10 +01:00
Sarah Hoffmann
21b0430e46
actions: update apt repo before installing software
2020-11-16 10:14:38 +01:00
Sarah Hoffmann
66595c2d2b
Merge pull request #2046 from lonvia/less-parallel-ranking
...
Only index larger batches for rank 30
2020-11-06 09:39:07 +01:00
Sarah Hoffmann
4ac29fb525
only index larger batches for rank 30
...
Fixes #2045 .
2020-11-05 22:14:49 +01:00
Sarah Hoffmann
04d50a271d
Merge pull request #2041 from lonvia/address-ranks-belgium
...
Adapt admin_levels for Belgium
2020-11-03 16:23:35 +01:00
Sarah Hoffmann
cbbda1ddf0
adapt admin_levels for Belgium
...
Fixes #272 .
2020-11-03 10:46:52 +01:00
Sarah Hoffmann
928c6245c9
Merge pull request #2038 from lonvia/addresses-for-large-areas
...
Improve addresses for large areas
2020-11-03 08:49:01 +01:00
Sarah Hoffmann
ac9be161f6
Merge pull request #2039 from lonvia/migration-for-ui
...
Add migration hints for UI removal and remove tests for icon attribute
2020-11-03 08:48:45 +01:00
Sarah Hoffmann
33378dcf6e
remove tests for icon attribute
...
The icon attribute requires the CONST_MapIcon_URL to be present
which we cannot guarantee for the tests.
2020-11-02 16:46:29 +01:00
Sarah Hoffmann
e31a1f7ef1
docs: add migration hints for removed UI
2020-11-02 16:34:17 +01:00
Sarah Hoffmann
fa574ae9fd
use different area estimates for large countries
2020-11-02 14:21:30 +01:00
Sarah Hoffmann
b2ebf4b4b7
adapt tests to rank changes of natural
2020-11-02 11:42:10 +01:00
Sarah Hoffmann
0f5615b618
guess a base address level for address rank 0 objects
...
The guess is based on the area and mainly avoids odd
addresses for very large or small objects.
2020-11-02 11:42:10 +01:00
Sarah Hoffmann
f050f898bc
elevate most natural feature to address rank 22
...
Makes them be in par with landuse features.
2020-11-02 11:42:10 +01:00
Sarah Hoffmann
ce1c3bab6d
Merge pull request #2032 from lonvia/remove-ui
...
Remove HTML output
2020-11-01 15:12:12 +01:00
Sarah Hoffmann
5cdabc5173
Merge pull request #2035 from lonvia/add-index-to-multicountry-script
...
docs: need to index after updating with a file
2020-11-01 15:11:02 +01:00
Sarah Hoffmann
42775f959b
docs: need to index after updating with a file
...
Fixes #2031 .
2020-10-31 22:53:08 +01:00
Sarah Hoffmann
7f55dcef3a
use simpler recurse operator for overpass download
...
Also fixes a typo in the OSM link.
2020-10-31 21:44:28 +01:00
Sarah Hoffmann
ba8accf4bb
make phpcs happy
2020-10-29 11:36:16 +01:00
Sarah Hoffmann
e62db51b06
vagrant: setting website URL is not longer necessary
2020-10-29 11:13:32 +01:00
Sarah Hoffmann
b81894d3d5
remove now unused settings related to website
...
There are two places where the website URL is still used:
for icons, replace the URL with a link to the icon repository
of the UI repo. The more URL now builds the link from the
server info.
2020-10-29 11:13:32 +01:00
Sarah Hoffmann
d86cf6801f
remove tests for HTML output
2020-10-29 11:13:32 +01:00
Sarah Hoffmann
c0d21d0bd3
remove HTML output and UI elements
2020-10-29 11:13:04 +01:00
Sarah Hoffmann
b838f66dd7
remove hierarchy endpoint
...
This endpoint was never maintained and most of the information
can be obtained via the details endpoint.
2020-10-29 11:13:03 +01:00
Sarah Hoffmann
db9cc270b3
Merge pull request #2030 from lonvia/improve-ci
...
Small improvements for github actions run
2020-10-28 15:20:40 +01:00
Sarah Hoffmann
4147e04319
action: cache downloaded dependencies
2020-10-28 14:51:05 +01:00
Sarah Hoffmann
a888f6ff93
Merge pull request #2027 from lonvia/remove-duplicate-admin-boundaries
...
Handle duplicated admin boundaries
2020-10-28 11:11:42 +01:00
Sarah Hoffmann
bd04c49bc1
actions: tweak database settings
...
Disabling fsync and friends should speed up the CI run
significantly.
2020-10-28 11:10:14 +01:00
Sarah Hoffmann
5872b81232
use highest admin boundary for duplicated ones
2020-10-28 10:49:26 +01:00
Sarah Hoffmann
abd20d3ca6
disable admin level 5 in Russia
...
They either interfere with cities or refer to historical boundaries.
2020-10-28 10:49:26 +01:00
Sarah Hoffmann
95f83b90d2
minor fixes for geometry compuation during boundary ranking
...
Go back to using centroid when determining if one admin level
is within another. There are cases where boundaries are slightly
misaligned due to mapping errors (not using the same ways in the
relations).
Only declare boundaries the same when they have the same wikidata
tag _and_ have exactly the same geometry. This works around tagging
errors with the wikidata tag, which happen because of automated
edits to the wikidata tag.
2020-10-28 10:49:26 +01:00
Sarah Hoffmann
7a16909219
detect and remove admin boundary duplicates
...
The Polish community maps admin boundaries that span multiple
levels by duplicating the boundary relations. Detect this situation
by looking out for matching wikidata tags. The higher ranked
duplicates are then thrown out from the address pool by setting
their address rank to 0.
2020-10-28 10:49:26 +01:00
Sarah Hoffmann
ee4684e6a9
Merge pull request #2029 from lonvia/master
...
Switch CI to github actions
2020-10-28 10:12:52 +01:00
Sarah Hoffmann
a2b1a1eb33
switch CI badge to github actions
2020-10-28 10:11:22 +01:00
Sarah Hoffmann
7bc0fc9611
switch CI to github acitons
2020-10-28 09:29:22 +01:00
Sarah Hoffmann
e0e18e2b6f
Merge pull request #2025 from lonvia/fix-secondary-importance-for-countries
...
Improve secondary result ordering for administrative boundaries
2020-10-22 13:43:22 +02:00
Sarah Hoffmann
788ba6d985
adjust secondary order when no addressimportance available
...
In cases of countries and remote places without an address
it is possible that 'addressimportance' comes back empty.
Adjust the 'foundorder' to the places importance instead
in such cases.
Fixes #2023 .
2020-10-22 10:20:16 +02:00
Sarah Hoffmann
b012e15245
readd boundary:administrative to class importance
2020-10-22 10:16:04 +02:00
Sarah Hoffmann
ba31456278
Merge pull request #2022 from lonvia/populate-rank-25
...
reorganize ranks of high-level place types
2020-10-20 23:26:18 +02:00
Sarah Hoffmann
b661c66c00
reorganize ranks of high-level place types
...
Rank 25 is now available for places that should appear in addresses
but not when a street is present. Use this for som block-like
place types. Also document the particularity of rank 25.
subdevisions and allotments are now at the same level as landuse
which they are frequently used together with.
2020-10-20 20:20:49 +02:00
Sarah Hoffmann
f0372736aa
Merge pull request #2019 from lonvia/find-pgconfig-inpostgresql-repo
...
Add support for finding pg_config in Postgresql repos
2020-10-20 15:02:00 +02:00
Sarah Hoffmann
e286d3f23d
add support for finding pg_config in Postgresql repos
...
It uses the same PostgreSQL_ADDITIONAL_VERSIONS variable as
osm2pgsql so that setting that should be sufficient to make
it work.
2020-10-20 11:39:00 +02:00
Sarah Hoffmann
6c8a7b0a1a
Merge pull request #2018 from lonvia/update-osm2pgsql
...
Update to latest osm2pgsql
2020-10-20 11:33:36 +02:00
Sarah Hoffmann
3107dc208a
update to latest osm2pgsql
...
Important changes:
* fix disabling of JIT in Postgresql
* support for finding latests Postgresql from their repos
* no longer create nodes table with flatnodes
2020-10-20 11:08:07 +02:00
Sarah Hoffmann
bf4d75458c
add explicit bbox contains check
...
Now that the containment check uses ST_Relate, we need to add
a separate bbox contains check to ensure that Postgis does the
efficient check first. Note that we still cannot get rid of the
overlap(&&) check because then Postgis will use the wrong indexes.
2020-10-19 10:39:01 +02:00
Sarah Hoffmann
3604d0d913
Merge pull request #2016 from lonvia/locale-address-russia
...
add country-specific address ranks for Russia
2020-10-18 09:48:23 +02:00
Sarah Hoffmann
dd06638dec
Merge pull request #2015 from lonvia/cleanup-address-computation
...
Rework collection of address parts
2020-10-18 09:48:05 +02:00
Sarah Hoffmann
73a0ec22a3
add country-specific address ranks for Russia
...
Removes admin level 7, which should not exist and promotes
admin level 8 to municipality level.
place=municipality is only used for boroughs of St. Petersburg,
so demote to level 18.
Fixes #926 .
2020-10-17 17:54:06 +02:00
Sarah Hoffmann
b0ef84caae
add tests for rank computation
2020-10-17 17:51:22 +02:00
Sarah Hoffmann
64899ef54b
add tests for address computation
2020-10-16 11:07:17 +02:00
Sarah Hoffmann
1064a9264e
revert to && comparison for geometries
...
Postgis 3 picks the wrong index when using ~ or @.
2020-10-16 09:49:48 +02:00
Sarah Hoffmann
acfa7bec9c
use computed centroid for location_area_large
...
The new address computation assumes that the centroid is inside
the area. Therefore we cannot use the centroid function. Use the
pre-computed centroid instead which has already been corrected to
be inside the area.
2020-10-15 17:30:52 +02:00
Sarah Hoffmann
62b94e838b
correctly set from area column in place_addressline
...
This was always set to true which brings us to the question
if it is even still needed.
2020-10-15 12:06:53 +02:00
Sarah Hoffmann
5236e7a03e
fix use of geometry operators
...
@ is contained by while ~ is contains.
2020-10-15 12:06:18 +02:00
Sarah Hoffmann
7e9412a044
demote admin boundaries for place areas
...
Also demote the address rank of an admin boundary when there
is a place area of higher rank that completely contains the
area. This catches the case where city boundaries do not exactly
align with administrative units (see for example Moscow).
2020-10-14 11:33:47 +02:00
Sarah Hoffmann
e47c19beb9
exclude rank 25 when computing addresses of streets
...
Address rank 25 is used for squares which are address-wise on the
same level as streets.
2020-10-13 22:36:17 +02:00
Sarah Hoffmann
2fe3c654fc
overhaul address computation
...
This is a complete rewrite of the selection of address parts to
be inserted into the place_addressline table.
The new algorithm selects for each rank:
* the boundary overlapping with the addressee and contained
in the already selected boundaries of lower rank, or failing that
* the place node closest to the addressee that is contained in
the already selected boundaries and in the influence radius
of already selected place nodes of lower rank
Place nodes that are not contained in already selected boundaries
of lower rank are completely thrown away. All other candidates are
added as non-address parts.
2020-10-13 22:10:07 +02:00
Sarah Hoffmann
5ec48c66cb
move ordering out of getNearFeatures
...
The two places where the function is called have different ordering
requirement.
2020-10-13 15:24:54 +02:00
Sarah Hoffmann
4e7ec92d6f
Merge pull request #2012 from lonvia/format-reverse-debug-output
...
use Debug class for formatting reverse debug output
2020-10-13 09:23:43 +02:00
Sarah Hoffmann
e115de47fc
use Debug class for formatting reverse debug output
2020-10-12 17:12:03 +02:00
Sarah Hoffmann
bb5ffd3904
Merge pull request #2011 from lonvia/increase-city-radius
...
Increase radius of influence around city nodes
2020-10-12 16:17:39 +02:00
Sarah Hoffmann
887ae7fcab
increase radius of influence around city nodes
...
The current radius does not cover cities with more than a
million inhabitants well.
2020-10-12 14:17:37 +02:00
Sarah Hoffmann
abaaf942cb
Merge pull request #2004 from lonvia/demote-place-nodes-in-admin-areas
...
demote place nodes in admin areas
2020-10-12 11:54:52 +02:00
Sarah Hoffmann
ff47f6f65d
when linking always check against original address rank
2020-10-11 12:29:49 +02:00
Sarah Hoffmann
ca680fc9fc
make housenumber interpolation tests more lenient
2020-10-11 12:04:53 +02:00
Sarah Hoffmann
b04463bb2d
demote place nodes in admin areas
...
If a place node of city rank and above finds itself in an
administrative boundary of the same address rank, then
increase the address rank by 2. This catches the rather
frequent case where city suburbs are tagged for historical
reasons as towns or villages.
2020-10-11 12:04:53 +02:00
Sarah Hoffmann
c66f701232
Merge pull request #2008 from lonvia/docs-missing-index-migration
...
docs: migration to new wikipedia needs new index
2020-10-11 11:05:59 +02:00
Sarah Hoffmann
3b23144ae6
docs: migration to new wikipedia needs new index
...
Fixes #1998 .
2020-10-11 10:40:23 +02:00
Sarah Hoffmann
f7a9462337
Merge pull request #2006 from mtmail/ubuntu-20-postgresql-contrib
...
Ubuntu 20: use postgresql-contrib-12 so no version higher gets installed
2020-10-11 09:45:37 +02:00
Sarah Hoffmann
17f24d0061
Merge pull request #2003 from lonvia/admin-levels-indonesia
...
Adapt address levels for admin boundaries in Indonesia
2020-10-11 09:43:33 +02:00
marc tobias
eb8bce22b8
Ubuntu 20: use postgresql-contrib-12 so no version higher gets installed
2020-10-10 02:42:46 +02:00
Sarah Hoffmann
6a31691121
adapt address levels for admin boundaries in Indonesia
2020-10-09 22:28:06 +02:00
Sarah Hoffmann
25c4bf6ed4
Merge pull request #2002 from lonvia/analyse-indexing-script
...
Add script for detailed explaing of indexing trigger
2020-10-09 20:23:51 +02:00
Sarah Hoffmann
ec5743bcc0
add script for detailed explaing of indexing trigger
2020-10-09 17:38:33 +02:00
Sarah Hoffmann
7cd330ee55
Merge pull request #1996 from lonvia/remove-postcode-search-structured
...
Restrict postcode searches to postcode in first token
2020-10-06 17:04:22 +02:00
Sarah Hoffmann
7d2b6879c8
restrict postcode searches to postcode in first token
...
In structured queries we should only assume that it is
a postcode search when only the postcode and optionally
the country is given. If any other term is present, it
is better to avoid the search for postcode as it yields
too many bad searches. Given that the terms in a structured
query are ordered, this means that the postcode must be
the first token just like in the unstructured query.
Fixes #1988 .
2020-10-06 14:08:31 +02:00
Sarah Hoffmann
a40684162a
Revert "adapt tests to rank_search removal"
...
This reverts commit 2a717da850 .
2020-10-06 13:59:50 +02:00
Sarah Hoffmann
cd997ff058
Merge pull request #1995 from lonvia/update-osm2pgsql
...
update to latest osm2pgsql version
2020-10-05 18:14:29 +02:00
Sarah Hoffmann
5391bb6cf7
update to latest osm2pgsql version
...
The latest version of osm2pgsql no longer creates indexes on
the members of planet_osm_rels. So we do that ourselves.
Given that we only need to access associated street relations,
the index can become quite a bit smaller.
2020-10-05 17:11:13 +02:00
Sarah Hoffmann
6b8ce1ee74
Merge pull request #1986 from mtmail/document-drop-idx_placex_geometry_reverse_lookupPoint
...
migration guide: idx_placex_geometry_reverse_lookupPoint can be dropped
2020-10-05 16:18:46 +02:00
Sarah Hoffmann
a37d46ec25
Merge pull request #1993 from mtmail/country-name-eSwatini
...
country names: Swaziland => eSwatini
2020-10-05 16:17:54 +02:00
marc tobias
b5c8237118
country names: Swaziland => eSwatini
2020-10-04 13:38:15 +02:00
marc tobias
eeffe2caf4
migration guide: idx_placex_geometry_reverse_lookupPoint can be dropped
2020-09-30 14:28:20 +02:00
Sarah Hoffmann
c5c7a6a453
Merge pull request #1984 from lonvia/remove-reverse-index
...
Remove unused idx_placex_geometry_reverse_lookupPoint
2020-09-30 12:02:34 +02:00
Sarah Hoffmann
b969392f40
remove removed index from database check
2020-09-30 11:33:15 +02:00
Sarah Hoffmann
40bc1752c2
remove unused idx_placex_geometry_reverse_lookupPoint
...
The index has been unused ever since the query using it was
changed two years ago. Given that it has not been missed much,
drop it completely here.
2020-09-30 09:21:35 +02:00
Sarah Hoffmann
851c3779b5
Merge pull request #1982 from lonvia/more-rank-search-removal
...
More rank search removal
2020-09-26 11:08:20 +02:00
Sarah Hoffmann
2a717da850
adapt tests to rank_search removal
2020-09-26 09:10:37 +02:00
Sarah Hoffmann
f8694da3c9
Remove more rank_search usage from address computation
...
Fixes #1904 .
2020-09-25 17:50:36 +02:00
Sarah Hoffmann
eeb2b1f998
Merge pull request #1980 from lonvia/add-descriptive-term-for-address-rank-24
...
add descriptive term for address rank 24
2020-09-25 16:56:35 +02:00
Sarah Hoffmann
1db8f7e353
add descriptive term for address rank 24
...
With that term we have terms for all ranks, so that no generic
'administrative' term will show up in the address details anymore.
2020-09-25 16:02:17 +02:00
Sarah Hoffmann
6625e93be6
Merge pull request #1975 from lonvia/simplify-parent-assignment-for-unlisted-places
...
Use closest containing place area for parent of unlisted addr:place
2020-09-23 19:10:42 +02:00
Sarah Hoffmann
56053988bf
Merge pull request #1970 from lonvia/remove-duplicate-geometry-check
...
Switch recursive updates to using rank_search
2020-09-23 18:51:35 +02:00
Sarah Hoffmann
d9325dc11a
use rank_address when invalidating containing objects
...
Only rank_address is now relevant for determining if a place
could be part of an address.
2020-09-23 17:44:31 +02:00
Sarah Hoffmann
d3ca9dd3f7
remove ST_Covers check when also testing for ST_Intersects
...
Using both is slightly problematic because they have different
ways to use the index. Newer versions of Postgis exhibit a
query planner issue when both functions appear together.
As ST_Intersects includes ST_Covers, simply remove the latter.
2020-09-23 17:44:31 +02:00
Sarah Hoffmann
e552f6bce5
use closest containing place for unlisted addr:place
...
We can't use getNearFeatures() to determine the parent of a
place with an unlisted addr:place because this function
returns place nodes that are potentially outside the area
of interest. Doing the complete address computation is too
expensive, so simply use the area with the largest rank that
contains the feature instead.
2020-09-23 17:33:42 +02:00
Sarah Hoffmann
cf23e10382
Merge pull request #1974 from lonvia/show-unknown-addr-place
...
add unknown addr:place to address output
2020-09-23 15:26:12 +02:00
Sarah Hoffmann
c84e7e72f1
add unknown addr:place to address output
...
When a POI has no addr:street but an addr:place that is not
contained in the name list of the parent place, then remember
this situation and merge the content of addr:place into the
address output.
We don't need to care about translations in this case because
it is obvious that no object with translations exists if the
parent isn't the object named in addr:place.
2020-09-23 11:55:18 +02:00
Sarah Hoffmann
f2ff351da4
Merge pull request #1971 from lonvia/drop-support-for-isin
...
Drop support for is_in tag
2020-09-23 09:20:35 +02:00
Sarah Hoffmann
c5c242d193
Merge pull request #1972 from lonvia/exclude-unnamed-highway-areas
...
Exclude unnamed highway areas
2020-09-23 09:20:16 +02:00
Sarah Hoffmann
72193a1c23
exclude unnamed highway areas
...
These are used to mark large paved areas. Sometimes they exists
together with named regular streets. In such cases the unnamed
area may overshadow the actual street when computing the address
parent. As unnamed highways are not very useful anyway, we
simply remove them from the database.
2020-09-22 21:42:13 +02:00
Sarah Hoffmann
248d6b413a
remove test for is_in
2020-09-22 21:36:49 +02:00
Sarah Hoffmann
d04e87fb80
drop suport for is_in tag
2020-09-22 20:26:36 +02:00
Sarah Hoffmann
cc61b74cde
Merge pull request #1965 from lonvia/make-addr-tags-searchable
...
Make addresses searchable by their addr: tags
2020-09-22 20:21:06 +02:00
Sarah Hoffmann
915d362b11
Merge pull request #1966 from lonvia/remove-dead-code
...
remove dead code
2020-09-21 10:59:58 +02:00
Sarah Hoffmann
f8a5f2964f
remove dead code
...
The SQL query has moved into the addTokensFromDB() funtion.
2020-09-21 10:39:14 +02:00
Sarah Hoffmann
a8dfbcef44
always bind addr:place to place instead of street
...
If an addr:place is given but no addr:street tag, then bind
the rank 30 object always to a <=25 object, even when there
is none found with the same name.
2020-09-21 10:15:14 +02:00
Sarah Hoffmann
caea14d035
merge addr tags into search_name table
...
When a place of rank 30 has addr tags that are not covered by the
search terms of the parent, add a separate entry for the POI in
the search_name table that includes the addr tags. We can only
do that with named places. For POIs without a name the housenumber
is used as name. If that is not available either, searching still
won't work.
2020-09-21 10:15:14 +02:00
Sarah Hoffmann
c5fc12e04b
Merge pull request #1964 from lonvia/remove-postcodes-with-colon
...
ignore postcodes with colons
2020-09-19 17:47:43 +02:00
Sarah Hoffmann
731c620e31
ignore postcodes with colons
...
Colons are used as a delimiter in tiger:left and tiger:right tags
when multiple postcodes are given. Ignore those. This was already
done in the postcode update script. This changes just makes the
two places consistent where postcodes are added.
2020-09-19 17:23:40 +02:00
Ben Antony
0dad470eb9
Update broken links in documentation
2020-09-18 22:52:59 +02:00
Sarah Hoffmann
6947ab3a65
Merge pull request #1963 from lonvia/remove-postcodes-from-search-index
...
Remove postcodes from search index
2020-09-18 22:41:24 +02:00
Sarah Hoffmann
b219374d36
remove special casing for rank 25 postcodes
...
They can be computed like any other place.
2020-09-18 16:18:02 +02:00
Sarah Hoffmann
576ee5aaab
use same label for all types of postcode in address
2020-09-18 16:17:30 +02:00
Sarah Hoffmann
4c9cfe2532
remove postcodes entirely from indexing
...
place=postcode places are artificial places that collect addr:postcode
points for aggration. They should neither show up in the address nor
be searchable. That means that there is no need to index them at all.
Only let boundary=postal_code through which define correct areas for
postcodes.
2020-09-18 15:09:35 +02:00
Sarah Hoffmann
7fb62ea904
postal boundary may be imported without name
...
Postal boundaries usually just have the postcode tag set and are
therefore officially 'nameless'. We want to have them as
boundary=postal_code anyways in order to distiguish them from postcode
points inherited from addr: tags.
2020-09-18 11:33:45 +02:00
Sarah Hoffmann
fe250d3ee8
Merge pull request #1961 from lonvia/set-place-type-for-result-in-address
...
Use place type of for result object in address parts
2020-09-17 21:23:40 +02:00
Sarah Hoffmann
6f55c67d16
Merge pull request #1960 from lonvia/fix-postcodes-duplicated-by-normalization
...
Make sure that all postcodes have an entry in the word table
2020-09-17 21:23:23 +02:00
Sarah Hoffmann
3aa6e6a365
Merge pull request #1957 from lonvia/docs-separate-out-deployment
...
Restructure vagrant scripts and installation documentation
2020-09-17 21:22:48 +02:00
Sarah Hoffmann
b8ced5d96b
Merge pull request #1962 from mtmail/travis-ci-without-webserver
...
travis-ci: we dont need Apache installed
2020-09-17 20:38:17 +02:00
marc tobias
9e21c6a862
travis-ci: we dont need Apache installed
2020-09-17 18:25:23 +02:00
Sarah Hoffmann
fe8566928e
use place type of for result object in address parts
...
Boundaries shound derive the address part type from the
linked place if possible. This was already implemented
for the address objects but not for the address information
from the address itself.
Fixes #1949 .
2020-09-17 18:17:01 +02:00
Sarah Hoffmann
3600709116
make sure that all postcodes have an entry in word
...
It may happen that two different postcodes normalize to exactly
the same token. In that case we still need two different entries
in the word table. Token lookup will then make sure that the correct
one is choosen.
Fixes #1953 .
2020-09-17 17:11:22 +02:00
Sarah Hoffmann
df115c73b2
Merge pull request #1945 from mtmail/travis-ubuntu-20
...
Upgrade Travis-CI from Ubuntu 18 to 20
2020-09-17 16:20:19 +02:00
Sarah Hoffmann
dbe025fe40
docs: fix formatting
2020-09-17 10:16:25 +02:00
Sarah Hoffmann
2b11a47a2f
restructure developer's manual
...
Add a section on setting up the development environment which now
also includes the former chapter on recreating the documentation.
Move the README from test/ into the manual as the new Testing
chapter.
2020-09-17 09:54:46 +02:00
Sarah Hoffmann
fb63a7418e
make CentOS 8 the default vagrant script
...
This puts it in line with the Ubunutu scripts.
2020-09-16 17:34:36 +02:00
Sarah Hoffmann
2029931b95
adapt Ubunut-20 vagrant file to triple webserver config
2020-09-16 16:27:34 +02:00
Sarah Hoffmann
91219bb3dd
restructure webserver setup in ubuntu 18 script
...
Unify the two vagrant scripts for Ubuntu 18. The script can now
be run in three modes: no webserver, with apache, with nginx.
The default mode is to not install any webserver at all. This is
normally sufficient when just developping.
The commit also switches from bento to generic boxes and adds config
for running with a libvirt provider. You need an NFS deamon for
synchronized folders.
2020-09-16 11:19:38 +02:00
Sarah Hoffmann
ab4fe4d58a
add 'make serve-global'
...
This runs the PHP development server in a mode where it listens
globally. This is needed when running inside vagrant and port-forwarding
to the host machine.
2020-09-16 11:15:55 +02:00
Sarah Hoffmann
8ff1f16b7f
remove host from default website URL
...
Just assume that Nominatim runs under the root URL. This is a
more versatile base that also makes 'make serve' work out of the
box.
2020-09-16 11:13:51 +02:00
Sarah Hoffmann
cf4f62c82c
docs: move webserver installation into separate chapter
2020-09-15 23:51:25 +02:00
marc tobias
1d2f4264a2
Upgrade Travis-CI from Ubuntu 18 to 20
2020-09-14 12:44:50 +02:00
Sarah Hoffmann
9d506a4afa
Merge pull request #1943 from mtmail/no-get-magic-quotes
...
starting PHP 5.4 get_magic_quotes_gpc() returns false, no need to check
2020-09-14 08:47:49 +02:00
marc tobias
7ac22e9227
starting PHP 5.4 get_magic_quotes_gpc() returns false, no need to check
2020-09-14 00:45:22 +02:00
Sarah Hoffmann
47f2fe724f
Merge pull request #1940 from mtmail/north-macedonia
...
country_name Macedonia => North Macedonia
2020-09-12 16:15:22 +02:00
marc tobias
130571fb29
country_name Macedonia => North Macedonia
2020-09-07 17:24:06 +02:00
Sarah Hoffmann
da7218350b
Merge pull request #1936 from lonvia/tweeking-of-ranks
...
More fine tuning of default rank assignments
2020-09-01 21:23:28 +02:00
Sarah Hoffmann
b6078de6f8
adapt tests to ranking changes
2020-09-01 18:03:17 +02:00
Sarah Hoffmann
07430b0194
tweak size of large POIs
...
Further reduce the size from which on POIs are no longer bound
to streets but only to larger objects. The point of reference,
of what a largest POI could be that is still bound is JFK airport.
2020-09-01 18:00:40 +02:00
Sarah Hoffmann
fae02fab00
address rank adjustment for addressable boundaries only
...
Only administrative boundaries with an address rank need
to be adjusted. Otherwise just handle them like any other
object.
2020-09-01 17:59:26 +02:00
Sarah Hoffmann
a68cdc40be
improve fallback ranking
...
Boundaries and places now always get a rank < 26 to make sure that
they do not parent to a street. Skip boundary=place completely
because they will be covered throught the secondary place tag.
2020-09-01 17:55:40 +02:00
Sarah Hoffmann
76b307f42a
Merge pull request #1934 from lonvia/fix-deletion-of-large-highway-areas
...
Do not block deletion of large highway areas
2020-08-28 10:08:42 +02:00
Sarah Hoffmann
6e4b7eb966
do not block deletion of large highway areas
...
Deletion of areas should only e blocked for addressable features.
Streets and POIs do not have a large impact on updates.
2020-08-28 09:49:21 +02:00
Sarah Hoffmann
770754ae2c
place lookup: filter places that have no details
...
In rare cases search_name might have entries for places for
which we do not return details, in particular for linkees.
Need to remove those entries in the result list before returning
the details.
Fixes #1932 .
2020-08-27 09:33:21 +02:00
Sarah Hoffmann
a932855f6f
Merge pull request #1931 from lonvia/stable-sort-for-results
...
Reranking of results must be stable
2020-08-26 20:52:17 +02:00
Sarah Hoffmann
72ee1abc90
ensure that ordering by importance is stable
...
The initial search results retrieved from the database already come
preordered, either by importnace or by distance. We want to keep
that order if all other things are equal.
2020-08-26 17:42:43 +02:00
Sarah Hoffmann
9e1909643c
PlaceLookup should return results in input order
2020-08-26 17:15:11 +02:00
Sarah Hoffmann
77a1329285
Merge pull request #1930 from lonvia/add-support-for-squares
...
Add support for place=square
2020-08-26 15:11:45 +02:00
Sarah Hoffmann
be6ecc388c
add support for place=square
...
Squares are now addressable (on address level 25) and thus can
be attached to a house number via addr:place. Needed to increase
the rank range for matching up addr:place to 25.
2020-08-26 12:12:52 +02:00
Sarah Hoffmann
13dba94307
do not run rank 0 objects in parallel
...
Waterways are at address rank 0 and do linking. This might lead to
deadlocks.
2020-08-22 19:51:19 +02:00
Sarah Hoffmann
d51440bb5d
Merge pull request #1926 from lonvia/speed-up-location-lookup
...
Increase splitting for large geometries
2020-08-22 17:04:34 +02:00
Sarah Hoffmann
d730e179bf
tests: use larger grid to avoid rouding errors
2020-08-22 16:04:24 +02:00
Sarah Hoffmann
559fe513fa
increase splitting for large geometries
...
When computing the address parts for a geometry, we need to do
a ST_Relates lookup in the location_area_large_* tables. This is
potentially very expensive for geometries with many vertices.
There is already a funtion for splitting large areas to reduce the
impact. This commit reduces the minimum area of a split, effectively
increasing the number of splits.
The effect on database size is minimal (around 3% increase), while
the indexing speed for streets increases by a good 60%.
2020-08-20 16:37:33 +02:00
Sarah Hoffmann
5b20fa7e38
Merge pull request #1923 from lonvia/split-indexing-for-boundries
...
Rework indexing order of places
2020-08-20 15:03:29 +02:00
Sarah Hoffmann
d16e75de91
Merge pull request #1924 from lonvia/installation-instructions-external-server
...
docs: installation hints for external databases
2020-08-19 15:17:32 +02:00
Sarah Hoffmann
6fd9994590
docs: installation hints for external databases
...
Fixes #1882 .
2020-08-19 15:03:42 +02:00
Sarah Hoffmann
b9729f3b66
Merge pull request #1921 from lonvia/skip-over-traffic-signs
...
Remove traffic signs from full styles
2020-08-19 11:50:28 +02:00
Sarah Hoffmann
d6ff7475f1
make sure that addr:* tags can always be searched for
...
Always add contents of addr:* tags into address part of the search
table, even when there is no corresponding other name. This keeps
search tolerant to the kind of tagging where parts show up in the
address that have no corresponding object in the database or where
it is only an unaddressable object.
2020-08-19 11:44:10 +02:00
Sarah Hoffmann
984979d9bf
add migration for new indxing schema
2020-08-18 21:40:53 +02:00
Sarah Hoffmann
73c449b97b
switch indexind to address rank
...
A place needs all lower address rank object indexed to make up
the address. The search rank no longer ensures that as it can have
a different ordering than the address rank.
This switches indexing rank order to address ranks. Non-address
objects (with address rank 0) are indexed together with POIs.
2020-08-18 16:58:58 +02:00
Sarah Hoffmann
1529666232
use only centroid to get parent admin boundaries
...
Using the full geometry is far too expensive.
2020-08-18 15:17:09 +02:00
Sarah Hoffmann
3816b86a9e
nominatim: also index boundaries by rank
...
We need to make sure that the entry in serach_name from a lower rank
is indeed available.
2020-08-18 15:17:09 +02:00
Sarah Hoffmann
a4b30fc649
index admin boundaries before everything else
...
Avoids irregularities that might happen because the address
rank of a boundary is changed through linking.
2020-08-18 15:17:09 +02:00
Sarah Hoffmann
fc50eb8688
nominatim: move DBConnection class into its own file
2020-08-18 15:17:09 +02:00
Sarah Hoffmann
071db1fae7
remove traffic signs from full styles
...
Traffic signs rarely have name and are therefore mostly not
searchable. Remove them completely. Allow street lamps only when
they have a name. Removes about 2M object from a planet instance.
2020-08-15 22:37:45 +02:00
Sarah Hoffmann
a163ea63c5
Merge pull request #1920 from lonvia/remove-linked-place-when-updating
...
Remove linked_place from extratags when updating
2020-08-14 09:44:56 +02:00
Sarah Hoffmann
e21a707166
remove linked_place from extratags when updating
...
Before updating an admin boundary we need to make sure that any
artificially generated 'linked_place' entry is removed from the
extratags column. This ensures that the place designation does
not linger when a linked place disappears and that it is updated
when the linking changes.
2020-08-13 16:59:11 +02:00
Sarah Hoffmann
1b484fa90d
Merge pull request #1919 from lonvia/tests-for-ranking
...
More tests and fixes for address rank computation
2020-08-13 09:13:10 +02:00
Sarah Hoffmann
06aa0f0b76
use address rank for address forming when available
2020-08-12 22:22:24 +02:00
Sarah Hoffmann
fb8bb30144
boundary address ranks must not go above 25
...
Fixes #1914 .
2020-08-12 22:22:24 +02:00
Sarah Hoffmann
7429a33818
add simple tests for address rank computation
2020-08-12 22:22:24 +02:00
Sarah Hoffmann
5b9f61cff8
also take place tags into account for address rank
...
An admin boundary might have a place tag but no matching place node.
We still should use the place value as indicator for the address
rank in this case.
2020-08-12 22:22:24 +02:00
Sarah Hoffmann
4ff0e20e1f
Merge pull request #1917 from lonvia/docs-rank-levels
...
docs: add tables for the meaning of address and search ranks
2020-08-11 15:12:16 +02:00
Sarah Hoffmann
a692bfa8f9
docs: add tables for the meaning of address and search ranks
...
Also makes tables a bit more readable by adding margins and better
headers.
2020-08-11 11:48:55 +02:00
Sarah Hoffmann
49dd927406
Merge pull request #1918 from lonvia/remove-more-osmosis-init
...
remove more traces of --osmosis-init switch
2020-08-11 11:48:17 +02:00
Sarah Hoffmann
4b21cc1737
remove more traces of osmosis-init
2020-08-11 10:43:04 +02:00
Sarah Hoffmann
7ae16f7302
Merge pull request #1912 from lonvia/remove-unused-import-update-functions
...
remove unused functions from setup and update
2020-08-09 09:31:48 +02:00
Sarah Hoffmann
73566a9f15
remove unused functions from setup and update
...
Removes the defunct --osmosis-init and --no-api switches and the
unsupported (and unnecessary) deduplicate. Also removes
'experimental' from --setup-website as this is a required
function now.
2020-08-06 16:16:35 +02:00
Sarah Hoffmann
fbdf205ab4
Merge pull request #1909 from lonvia/minor-fixes
...
Make SQL debug statements execute again
2020-08-06 11:07:38 +02:00
Sarah Hoffmann
83b2b4970d
Make SQL debug statements execute again
...
There were some old variable names used that are no longer valid.
Either fix them or remove the statement completely.
Fixes #1907 .
2020-08-06 09:29:19 +02:00
Sarah Hoffmann
f29dc7d7ac
Merge pull request #1865 from mtmail/how-to-import-test-db
...
test/README.md - more instructions how to import test db
2020-08-04 14:31:19 +02:00
Sarah Hoffmann
4d5db74c18
Merge pull request #1902 from lonvia/avoid-touching-boundaries-in-addresses
...
Be more strict what areas make up an address
2020-08-04 14:30:08 +02:00
Sarah Hoffmann
8c7d285e03
Merge pull request #1901 from lonvia/speed-up-indexing
...
Batch-index places at rank 30
2020-08-04 12:32:16 +02:00
Sarah Hoffmann
1347abb1e7
be more strict what areas make up an address
...
Exclude boundaries that touch a line in only one point and
that touch areas only along the boundary.
Fixes #1900 .
2020-08-04 12:08:50 +02:00
Sarah Hoffmann
2cb85e48b4
adapt test results to new ranking
2020-08-03 16:57:22 +02:00
Sarah Hoffmann
5be084e0f5
indexer: allow batch processing of places
...
Request and process multiple place_ids at once so that
Postgres can make better use of caching and there are less
transactions running.
2020-08-03 10:32:39 +02:00
Sarah Hoffmann
2323923bec
indexer: move progress tracker into separate class
2020-08-03 10:32:39 +02:00
Sarah Hoffmann
0f54d42863
indexer: get rid of special handling of few places
...
Given that we do not distiribute geometry sectors to threads anymore,
there is no point in this kind of special handling.
2020-08-03 10:32:39 +02:00
Sarah Hoffmann
8201c7f46c
Merge pull request #1899 from mtmail/use-new-dsn-format-in-vagrant-md
...
VAGRANT.md: we use different database DSN syntax these days
2020-08-03 10:26:35 +02:00
marc tobias
ed22d640f4
VAGRANT.md: we use different database DSN syntax these days
2020-07-31 16:52:29 +02:00
marc tobias
01b009ff24
test/README.md - more instructions how to import test db
2020-07-31 16:50:27 +02:00
Sarah Hoffmann
665b90bf5a
Merge pull request #1898 from lonvia/show-housenumber-with-housename
...
make house number reappear in display name on named POIs
2020-07-31 10:11:09 +02:00
Sarah Hoffmann
4e1f245331
make house number reappear in display name on named POIs
...
After 6cc6cf950c names and house numbers
of POIS got mingled into a single item when creating the display name.
Add the house number as extra information without place_id to avoid
later mangling.
2020-07-30 23:39:55 +02:00
Sarah Hoffmann
f8e1d39208
Merge pull request #1894 from lonvia/fix-hierarchy-by-admin-level
...
Preserve admin level hierarchy between admin boundaries
2020-07-29 09:20:34 +02:00
Sarah Hoffmann
955dae5d4b
Merge pull request #1895 from lonvia/update-less-quiet
...
Make indexing during updates less quiet
2020-07-29 09:20:14 +02:00
Sarah Hoffmann
b78cd3f4c9
make indexing during updates less quiet
...
Adjust verbosity behaviour to that of indexing during setup.
2020-07-28 22:35:51 +02:00
Sarah Hoffmann
6a3eb7edf2
preserve admin level hierarchy between admin boundaries
...
When the address rank of an admin boundary is changed because
of an attached place type, it may happen that the admin_level
hierarchy gets inversed. Avoid that by adjusting the address
rank if an inversion is detected.
2020-07-28 22:15:25 +02:00
Sarah Hoffmann
0a710c0762
Merge pull request #1891 from lonvia/automatic-db-setup
...
Implicitly connect to database during setup
2020-07-26 16:08:45 +02:00
Sarah Hoffmann
9a204f6284
test: make road really cross the boundary
2020-07-26 15:57:07 +02:00
Sarah Hoffmann
7837970303
remove connect() in update script
...
This is now implicit.
2020-07-26 12:27:52 +02:00
Sarah Hoffmann
8cd9550295
implicitly connect to database during setup
...
Make access to the DB object a function, so that the connection
can be opened implicitly when the object is accessed for the first
time. This way we no longer need to check beforehand if a specific
function of the setup needs DB access or not.
Also move the check for the module to the relevant sub step.
2020-07-26 11:56:00 +02:00
Sarah Hoffmann
840c692d5b
Merge pull request #1890 from lonvia/add-wiki-tags-to-all-styles
...
Add wiki tags to all styles
2020-07-25 11:34:51 +02:00
Sarah Hoffmann
05e0d3e2d4
add wiki tags to all styles
...
wikipedia and wikidata tags are needed to compute the importance
so we need to put them into extra tags for all styles.
Fixes #1885 .
2020-07-25 10:00:18 +02:00
Sarah Hoffmann
7429ff9dce
forgit to adapt info message
2020-07-18 12:14:51 +02:00
Sarah Hoffmann
29602fe0cf
Merge pull request #1874 from joy-yyd/rank_modification
...
House number search fix for #164
2020-07-18 12:12:37 +02:00
Sarah Hoffmann
1b95ec5591
Merge pull request #1884 from lonvia/fixes-for-webserver-settigns
...
Small fixes for new webserver settings file
2020-07-18 11:44:01 +02:00
Sarah Hoffmann
3efe0dc8dc
move website settings back to settings/
...
We don't want the settings to become visible when a server is
accidentally configured wrongly.
2020-07-18 11:02:07 +02:00
Sarah Hoffmann
241e4af1b0
log file is a string when not set to false
2020-07-18 11:00:17 +02:00
(Joy) Yuanyue Ding
cac8a8df18
Modifiy the range of address_rank, fix for issue #164
2020-07-08 17:47:38 +02:00
Sarah Hoffmann
1181ceb735
Merge pull request #1873 from lonvia/resurrect-debug-option
...
Reenable debug parameter
2020-07-08 10:06:49 +02:00
Sarah Hoffmann
f376f45277
default language is a string when not set to false
2020-07-08 08:38:11 +02:00
Sarah Hoffmann
d364afdf3b
reenable debug parameter
...
The parameter got lost when switching to website settings.
Given that the use of a fixed parameter is limited,
debugging output can now only be set via the URL parameter.
2020-07-08 08:32:46 +02:00
Sarah Hoffmann
7ecfcf7eaa
Merge pull request #1869 from lonvia/migration-for-setup-website
...
docs: add migration for new --setup-website step
2020-07-05 21:06:27 +02:00
Sarah Hoffmann
709c9bbe88
Merge pull request #1868 from lonvia/reverse-for-addressable-places-only
...
reverse: ignore place nodes without an address rank
2020-07-05 21:06:00 +02:00
Sarah Hoffmann
db175f606e
docs: add migration for new --setup-website step
2020-07-05 15:46:06 +02:00
Sarah Hoffmann
3a664dc676
reverse: ignore place nodes without an address rank
...
We already exclude all polygon places without an address
rank. place nodes should also be ignored. This removes
places like locality from the reverse results.
Fixes #1839 .
2020-07-05 15:38:49 +02:00
Sarah Hoffmann
5f8d5f10a6
docs: rename documentation chapter
...
Avoids confusion about this being the documentation itself.
2020-07-05 11:14:48 +02:00
Sarah Hoffmann
f02d4d9677
docs: move external data sources into simple page
2020-07-05 11:13:28 +02:00
Sarah Hoffmann
1889643eca
Merge branch 'move-datasources-into-separate-repos' of https://github.com/mtmail/Nominatim into mtmail-move-datasources-into-separate-repos
2020-07-05 10:57:12 +02:00
Sarah Hoffmann
4fc5c2024b
Merge pull request #1864 from lonvia/langauge-specific-presuffixes
...
exclude language-specific name:prefix and name:suffix
2020-07-05 10:54:42 +02:00
Sarah Hoffmann
354487d7f4
Merge pull request #1829 from krahulreddy/websiteSetup
...
Added setup-website option
2020-07-01 18:11:50 +02:00
Sarah Hoffmann
6478058946
Merge pull request #1857 from mtmail/db-migration-update-functions
...
Migration.md - admin also need to run recreate db functions
2020-07-01 18:11:14 +02:00
Sarah Hoffmann
8b8dcea3de
exclude language-specific name:prefix and name:suffix
...
There are about 1k suffixes and 20k prefixes with a
language-speicfic variant in use. These should not
show up as names.
2020-07-01 18:00:53 +02:00
marc tobias
64ace51e02
move data-sources/ directory in new git repos
2020-07-01 17:38:44 +02:00
marc tobias
4cb5c67a44
Migration.md - admin also need to run recreate db functions
2020-07-01 16:46:54 +02:00
Sarah Hoffmann
2edefd9e80
sql: fix rank variable type
...
The rank type needs to match the parameter type of
update_place_diameter().
Fixes #1851 .
2020-07-01 15:48:00 +02:00
Sarah Hoffmann
fa8b16e7e7
Merge pull request #1858 from lonvia/update-osm2pgsql
...
Update osm2pgsql
2020-07-01 11:38:40 +02:00
Sarah Hoffmann
2a953700e2
update osm2pgsql (hang on multipolygons)
2020-06-30 22:39:38 +02:00
Sarah Hoffmann
c1dc835b5c
Merge pull request #1852 from osm-search/disable-jit-for-updates
...
Disable Postgresql jit and parallel processing for osm2pgsql updates
2020-06-28 22:39:44 +02:00
Sarah Hoffmann
214f92c428
make phpcs happy
2020-06-28 18:24:29 +02:00
Sarah Hoffmann
95fc680af9
travis: reduce the size of diff download
2020-06-28 18:21:42 +02:00
Sarah Hoffmann
22d0c6b5e1
travis: run a single round of updates on the Monaco import
2020-06-28 18:09:08 +02:00
Sarah Hoffmann
ff1be13d0e
disable JIT and parallel processing for osm2pgsql in updates
...
This is known to cause issues because of bad indexing
statistics.
2020-06-28 18:06:06 +02:00
K Rahul Reddy
a3201be7e7
Moved settings-frontend to website/
2020-06-27 10:45:53 +05:30
K Rahul Reddy
37f0b51dff
Updated setup.php
2020-06-27 10:45:53 +05:30
K Rahul Reddy
95d2dd74ad
Documentation updated
2020-06-27 10:45:53 +05:30
K Rahul Reddy
a175a25e6c
Added setup-website to travis.yml
2020-06-27 10:45:51 +05:30
K Rahul Reddy
6c406124dd
Added setup-website option
2020-06-27 10:45:51 +05:30
Sarah Hoffmann
0f17529486
Merge pull request #1836 from lonvia/rework-large-location-II
...
Change processing of place nodes in addresses
2020-06-26 21:36:32 +02:00
Sarah Hoffmann
dd10c867db
docs: minor typo and grammar fixes
2020-06-23 23:31:18 +02:00
Sarah Hoffmann
8335dd3aa5
Merge branch 'split-off-test-tool-installation-instructions' of https://github.com/mtmail/Nominatim into mtmail-split-off-test-tool-installation-instructions
2020-06-23 23:25:46 +02:00
Sarah Hoffmann
cd73ac7038
Merge pull request #1841 from mtmail/faq-entry-about-rebuilding-nominatim-so
...
FAQ addition when to rebuild nominatim.so
2020-06-23 23:20:43 +02:00
Sarah Hoffmann
7cc33a839c
Merge pull request #1834 from mtmail/faq-invalid-page-in-block
...
FAQ entry for PostgreSQL -invalid page in block-
2020-06-23 23:10:26 +02:00
marc tobias
828da6a425
FAQ addition when to rebuild nominatim.so
2020-06-20 04:01:50 +02:00
marc tobias
2e5bdb8794
Put install instructions of test tools into separate docs/ markdown file
2020-06-20 03:48:07 +02:00
marc tobias
f56bac350b
FAQ entry for PostgreSQL -invalid page in block-
2020-06-19 21:16:57 +02:00
Sarah Hoffmann
d373f16c81
Merge pull request #1838 from lonvia/make-serve
...
add 'make serve' command
2020-06-19 20:12:56 +02:00
Sarah Hoffmann
ebffa15c7c
add 'make serve' command
...
Starts up PHP's built-in webserver in the website/ directory.
Useful for testing and development.
See #1831 .
2020-06-19 17:35:24 +02:00
Sarah Hoffmann
6e4ee160ee
adapt tests to new search ranks
2020-06-17 10:53:11 +02:00
Sarah Hoffmann
a5697c5279
change place node expansion for large area table
...
So far we've used a buffer around a place node to define its
potential address reach. This had two problems: the buffer was
so large that addresses often contain false positives and the
buffer is really distorted when getting closer to the poles.
Change the buffer here to draw a bounndig box at a certain
distance in meter. This means that we always use the same
box everywhere on the planet and can make the extent much
smaller. Using a box has the advantage that it is much faster
to figure out if a point is within the box.
2020-06-17 10:53:11 +02:00
Sarah Hoffmann
5abec720d8
Merge pull request #1830 from lonvia/docs-for-nominatim-ui
...
Add usage docs for nominatim-ui
2020-06-17 09:30:29 +02:00
Sarah Hoffmann
84403b47cb
add usage docs for nominatim-ui
...
Includes migration guides for Apache and nginx.
2020-06-13 20:09:20 +02:00
Sarah Hoffmann
4342a539af
Merge pull request #1827 from mtmail/centos8-postgresql12-without-proj
...
Vagrant centos8: proj52 not needed, use postgresql 12/postgis 3.0
2020-06-11 23:12:38 +02:00
Sarah Hoffmann
f4e744ade5
remove version warning from ubuntu 20 installation
2020-06-11 22:46:04 +02:00
Sarah Hoffmann
155d4c5591
cmake: only require php for import and api
2020-06-11 22:44:00 +02:00
marc tobias
f5cbe0e6ba
Vagrant centos8: proj52 not needed, use postgresql 12/postgis 3.0
2020-06-11 19:10:38 +02:00
Sarah Hoffmann
a0e7d80daf
prepare 3.5.0 release
2020-06-06 20:30:29 +02:00
Sarah Hoffmann
d7e2f61e13
Merge pull request #1822 from lonvia/document-address-labels
...
document which labels may appear in the address info
2020-06-06 18:02:40 +02:00
Sarah Hoffmann
96ed4b02d7
document which labels may appear in the address info
...
The list is manually generated and only valid for the default
configuration as used on openstreetmap.org.
Fixes #1808 .
2020-06-06 17:32:30 +02:00
Sarah Hoffmann
cffc7c0121
parents for large POIs must be address features
...
There are a couple of places with a search rank < 25 which are
not addressable like waterways and islands. We don't want them
to function as parents for POI-level objects. So use the
address rank for finding parents, not the search rank.
See #1815 .
2020-06-03 11:30:51 +02:00
Sarah Hoffmann
d89000cc3d
Merge pull request #1813 from lonvia/revert-concurrent-indexing
...
revert building indexes concurrently
2020-06-01 22:13:33 +02:00
Sarah Hoffmann
3661c75b39
Merge pull request #1814 from lonvia/disable-jit
...
Disable JIT and parallel workers when indexing
2020-06-01 22:13:07 +02:00
Sarah Hoffmann
3b20b11a9f
remove warnings about postgres 12 and postgis 3
2020-05-30 11:25:00 +02:00
Sarah Hoffmann
cca366196d
Disable JIT and parallel workers when indexing
...
Locally disable jit and parallel workers in the connection that
do indexing. The query planner tends to be overenthusiatic about
using JIT. But with the rather less complex queries we have, the
overhead tends to be larger than the performance gain.
Fixes #1677 .
2020-05-30 11:20:16 +02:00
Sarah Hoffmann
e09d444068
revert building indexes concurrently
...
This does not really solve the issue with blocking autovacuum
requests and can lead to incomplete indexes and bogus
out-of-disk messages.
Fixes #1549 .
2020-05-30 11:00:05 +02:00
Sarah Hoffmann
4956f5e710
Merge pull request #1809 from lonvia/fix-display-names
...
Fix some glitches in choice of address tags
2020-05-27 21:28:17 +02:00
Sarah Hoffmann
5bebdfa434
Merge pull request #1804 from lonvia/ranking-improvement-germany
...
Localized ranking adaptions for Germany, Sweden and Norway
2020-05-27 11:58:21 +02:00
Sarah Hoffmann
aea915aa8d
prefer linked place type over own place type
...
For state cities, tagging might prefer the place=state on
the admin boundary. The linked place is a more reliable indicator.
2020-05-27 11:31:50 +02:00
Sarah Hoffmann
e0d29f398e
each address line must fill at most one geocodejson field
...
This fixes an issue where a postcode with rank_address 5
would also appear in the state field.
2020-05-27 11:16:27 +02:00
Frederik Ramm
c43b39bd88
Fix script names in README ( #1805 )
2020-05-25 12:45:35 +02:00
Sarah Hoffmann
8218da27b3
adapt tests to new ranks
2020-05-23 19:40:41 +02:00
Sarah Hoffmann
aa4bd00631
Adapt boundary labels for Sweden and Norway
...
This also gives us the correct labels for address output in
json and xml.
2020-05-23 16:19:27 +02:00
Sarah Hoffmann
af6b9fdb39
fix admin levels for Norway and Sweden
...
Admin levels 3 and 4 are used for region and county respectively,
so downgrade the ranking.
2020-05-23 15:48:40 +02:00
Sarah Hoffmann
c1b6493373
adapt municipality and region for Germany
2020-05-23 15:20:15 +02:00
Sarah Hoffmann
c386cca73f
Merge pull request #1801 from lonvia/rework-classtypes
...
Rework ClassTypes helper functions
2020-05-20 08:22:56 +02:00
Sarah Hoffmann
cadbdaff18
fix style
2020-05-18 22:20:36 +02:00
Sarah Hoffmann
57510f517a
adapt tests to modified address types
2020-05-17 16:53:33 +02:00
Sarah Hoffmann
3a2ddbe2e0
encapsulate icon URL in a function
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
859347523f
also adapt uses of ClassTypes in website/
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
528fe6553f
adapt php tests
...
Also fixes some errors found by the tests.
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
1faa0f4d41
reorganise class/type information
...
Add a separate function for each property which saves necessary
information independently. Simplify computation of labels and
simple labels to not explicitly save the labels.
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
82a11cae2d
first draft
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
431948d768
nominatim: always use deadlock-protected wait
...
Fixes #1785 .
2020-05-15 18:49:27 +02:00
Sarah Hoffmann
f69c3d2b66
Merge pull request #1793 from lonvia/remove-struct-params-in-gui
...
search UI: hide unused query parameters
2020-05-15 16:50:54 +02:00
mmd
08b05964fa
Update travis to bionic=Ubuntu18 ( #1800 )
2020-05-14 22:52:04 +02:00
Sarah Hoffmann
bd7f597682
Merge pull request #1797 from mtmail/jquery-3-5-1
...
update jquery dependency 3.5.0 => 3.5.1
2020-05-14 20:54:17 +02:00
marc tobias
6d4fbc9d32
update jquery dependency 3.5.0 => 3.5.1
2020-05-14 15:53:05 +02:00
Sarah Hoffmann
124410a17b
improve syntax highlighting for apache and nginx examples
2020-05-13 10:13:15 +02:00
Sarah Hoffmann
a543d57cbd
switch to php-fpm 7.3
...
Also fixes indent.
2020-05-13 10:04:31 +02:00
Sarah Hoffmann
8c3a0efe8b
Merge branch 'patch-1' of https://github.com/ganeshkrishnan1/Nominatim into ganeshkrishnan1-patch-1
2020-05-13 09:55:48 +02:00
Sarah Hoffmann
9e2841ad44
search UI: hide unused query parameters
...
Only send query parameters relevant for the current query
type (simple/structured), hide the other input fields.
This is quite a bit of CSS state changing, so move the intial
setup of the input field states into Javascript.
2020-05-11 00:19:33 +02:00
Sarah Hoffmann
233e5f7c0e
show simple query field when no parameters are given
2020-05-10 23:52:53 +02:00
Sarah Hoffmann
d5d9445cfd
Fix PHP errors in structured HTML output
...
Correctly handle missing parameters.
2020-05-10 23:41:04 +02:00
Sarah Hoffmann
7be7417b5b
Merge pull request #1792 from lonvia/remove-from-location-area
...
remove linked places also from the location_area_large tables
2020-05-10 15:49:20 +02:00
Sarah Hoffmann
0a14142156
remove linked places also from the location_area_large tables
...
We don't want linked places to show up in addresses either,
so remove them from the address lookup table.
2020-05-10 13:59:47 +02:00
galewis2
a5e3785843
Add simple/structured query selector to HTML search page ( #1722 )
2020-05-08 01:29:44 +02:00
Sarah Hoffmann
fc19ebb218
Merge pull request #1786 from lonvia/remove-ubuntu-1604
...
remove Ubuntu 16 installation instructions
2020-05-07 22:42:31 +02:00
Sarah Hoffmann
b45411f988
Merge pull request #1782 from Simon-Will/1781-make-tests-work-with-phpunit-8
...
Make tests work with phpunit 8
2020-05-07 22:01:35 +02:00
Sarah Hoffmann
42f6371e47
remove Ubuntu 16 installation instructions
...
Also fixes up CentOS 8 links in documentation.
2020-05-07 21:55:04 +02:00
Simon Will
be2aa6ab3a
Use Ubuntu’s packaged composer, not the custom installation
2020-05-07 21:44:45 +02:00
Sarah Hoffmann
6e39ed9573
Merge pull request #1780 from Simon-Will/1768-vagrant-installation-for-ubuntu-20
...
Add vagrant machine for Ubuntu 20.04
2020-05-07 20:46:44 +02:00
Simon Will
daf45a2993
Integrate Ubuntu 20 instructions into documentation
2020-05-07 00:36:13 +02:00
Simon Will
d351b10fde
Document minimum phpunit version
2020-05-06 23:47:16 +02:00
Simon Will
0b21050904
Install phpunit 8 on Ubuntu 18 with composer
2020-05-06 23:46:53 +02:00
Sarah Hoffmann
644a7f524c
Merge pull request #1784 from krahulreddy/patch-1
...
Removed redundant question
2020-05-06 21:37:29 +02:00
K Rahul Reddy
53949ace36
Removed redundant question
2020-05-06 21:26:32 +05:30
Simon Will
14dba39157
Use assertEqualsWithDelta for float comparisons
...
PHPUnit 7.3 introduced the functions assertEqualsWithDelta for comparing
floats with a delta. The old four-argument version of assertEquals is
deprecated in PHPUnit 8 and removed in PHPUnit 9.
This commit means that the tests will fail with PHPUnit < 7.3 because
assertEqualsWithDelta is not defined there.
2020-05-05 23:43:09 +02:00
Simon Will
43fd2a7423
Declare return type of testcase setUp method
...
PHPUnit 7 changed the signature of the TestCase methods to include the
return type.
2020-05-05 23:40:18 +02:00
Simon Will
4b0ac5356e
Add vagrant machine for Ubuntu 20.04
...
The instructions in
[`VAGRANT.md`](42c80893cb/VAGRANT.md )
still work as before. The names of the Vagrant machines are updated so
that Ubuntu 18.04 (previously called `ubuntu`) is now called `ubuntu18`
and Ubuntu 20.04 is now called `ubuntu20`.
The version changes from Ubuntu 18.04 to Ubuntu 20.04 are:
- Python: 3.6 to 3.8
- Postgres: 10 to 12
- PHP: 7.2 to 7.4
In the `apt-get`, I changed `--force` to `--allow-downgrades --allow-remove-essential --allow-change-held-packages`, because the former is deprecated. Cf. the [manpage of apt-get](http://manpages.ubuntu.com/manpages/focal/man8/apt-get.8.html )
The php module `codesniffer` was previously installed via Composer, but it is available via the Ubuntu repository, so I installed it via `apt-get` now.
2020-05-05 23:10:35 +02:00
Sarah Hoffmann
c2f0d8e5ba
docs: add link to new status page
2020-05-04 21:11:57 +02:00
marc tobias
0fb93b1e8a
documenation for /status endpoint
2020-05-04 17:06:06 +02:00
Sarah Hoffmann
f94828c3f4
properly escape class parameter
...
The class parameter was used as is, allowing for potential
SQL injection via the API.
Thanks to @bladeswords for finding this.
2020-05-02 21:54:14 +02:00
Sarah Hoffmann
0e1e7c7df2
Merge pull request #1770 from lonvia/eyusupov-separate-compilation
...
Separate compilation
2020-04-26 21:48:43 +02:00
Sarah Hoffmann
06110ba358
Merge pull request #1769 from lonvia/display-name-order
...
Ensure that result object name is always first in display_name
2020-04-26 16:18:56 +02:00
Sarah Hoffmann
bae69f0102
cmake: reintroduce check script
2020-04-26 16:17:43 +02:00
Sarah Hoffmann
77e7f4696b
fix docs typos
2020-04-26 15:00:28 +02:00
Sarah Hoffmann
47fb2c9126
cmake: restructure splitting between modules
...
Make a clear distinction between parts used for the importer
and parts used for the API.
2020-04-26 14:17:21 +02:00
Sarah Hoffmann
2ab9e4acd3
Merge branch 'separate-compilation' of https://github.com/eyusupov/Nominatim into eyusupov-separate-compilation
2020-04-26 10:47:41 +02:00
Sarah Hoffmann
65ee7a8002
Merge pull request #1754 from mtmail/nominatim-db-tests-against-postgres
...
Nominatim::DB tests against separate postgresql database
2020-04-26 10:20:30 +02:00
marc tobias
a5d0657d9b
lonvia PR feedback
2020-04-26 03:33:15 +02:00
Sarah Hoffmann
b8f01f91ca
simplify display_name computation
2020-04-26 00:18:29 +02:00
Sarah Hoffmann
6cc6cf950c
ensure that result object name is always first in display_name
...
The display name might be mixed up if the result object has a lower
rank_address than its address members.
2020-04-26 00:14:55 +02:00
Sarah Hoffmann
0b0349f746
Merge pull request #1752 from mtmail/new-oo-shell-class
...
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-25 16:48:04 +02:00
Sarah Hoffmann
2740974a13
Merge pull request #1758 from krahulreddy/advanced-installations
...
Advanced installations
2020-04-22 09:59:44 +02:00
Sarah Hoffmann
97a9a262bb
Merge pull request #1764 from mtmail/docs-countrycodes-based-on-adminlevel-2
...
API docs: countrycode assignment happens using admin_level=2 tags
2020-04-22 09:57:59 +02:00
Sarah Hoffmann
207efe700f
highway:construction should appear as 'road' in the address list
...
Fixes #1763 .
2020-04-22 09:08:33 +02:00
marc tobias
e33315eaa6
API documentation: clarification countrycode assignment happens using admin_level=2 tags
2020-04-21 17:42:12 +02:00
Sarah Hoffmann
5469d02d03
nominatim.py: fix wrong use of assert
...
Fixes #1762 .
2020-04-19 17:59:49 +02:00
K Rahul Reddy
42c80893cb
Fix documentation links ( #1760 )
...
Update installation documentation link in VAGRANT.md, update.php
2020-04-19 00:42:24 +02:00
K Rahul Reddy
5c56ea3198
Adjustments made to documentation
2020-04-17 21:53:50 +05:30
K Rahul Reddy
42f86329a9
Added Advanced Installations documentation
2020-04-17 21:53:41 +05:30
K Rahul Reddy
08e273c0c7
Added scripts for multiple country setup and updates
2020-04-17 21:50:59 +05:30
Sarah Hoffmann
5f8f98fa03
Merge pull request #1756 from lonvia/downgrade-waterways
...
downgrade waterways
2020-04-17 08:46:40 +02:00
Sarah Hoffmann
08c53ae27d
downgrade waterways
...
A lot of streams in OSM are of minor importance, they certainly
should show up lower in the list of results than villages. Those
rivers/streams that are well known have a wikipedia page and get
a higher importance from that.
The disadvantage with downgrading is that the address gets even
more useless but that's something that needs to be solved outside
the rank search.
2020-04-14 17:14:20 +02:00
Sarah Hoffmann
f4f369895c
Merge pull request #1753 from mtmail/fix-travis-ci-badge
...
fix Travis-CI badge in README output
2020-04-13 18:36:02 +02:00
marc tobias
38c21de0ee
Nominatim::DB tests against separate postgresql database
2020-04-13 18:01:37 +02:00
marc tobias
43cf36e0c7
fix Travis-CI badge in README output
2020-04-13 17:55:17 +02:00
Sarah Hoffmann
9a9ff95989
fix logging of lookup calls
...
Log start was called but the actual writing was missing.
2020-04-13 11:55:24 +02:00
marc tobias
fc40939775
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-12 03:50:40 +02:00
Sarah Hoffmann
553d8a828c
Merge pull request #1751 from lonvia/respect-admin-hierarchy
...
Address ranks must not invert admin_level hierarchy
2020-04-11 23:41:19 +02:00
Sarah Hoffmann
80f7392fb1
address ranks must not invert admin_level hierarchy
...
When inheriting an address rank from a linked place we
must be careful not to destroy the hierarchy established
through boundary admin_level. Therefore, before assigning
an address rank from a linked place, find the next higher
boundary in the admin_level hierarchy, look up its address
rank and then only use the address rank from the linked
place if it is higher.
2020-04-11 20:56:30 +02:00
Sarah Hoffmann
61535c9972
Merge branch 'update-jquery-leaflet' of https://github.com/mtmail/Nominatim into mtmail-update-jquery-leaflet
2020-04-11 20:53:14 +02:00
Sarah Hoffmann
b443c92a7a
Merge pull request #1749 from lonvia/ranking-during-updates
...
Reset search and address ranks on update
2020-04-11 20:52:05 +02:00
marc tobias
22da6c541d
website dependencies: jQuery v2.1 => 3.5, leaflet 1.3 => 1.6
2020-04-11 18:18:57 +02:00
Sarah Hoffmann
cd96354bc7
reset address and search ranks on update
...
With ranks being dynamically changed through linking of places,
it is important to reset the ranks on update, so that changes
of the rank due to changes in linking are correctly taken into
account.
2020-04-11 09:20:13 +02:00
Sarah Hoffmann
c6d859a08a
factor out computation of address and search rank
2020-04-10 23:18:31 +02:00
Sarah Hoffmann
ef47515420
make admin levels 3 and 7 distinct ones in addresses
...
There really is no need to conflate these two levels as they
are in use in various countries.
Also adds province as a distinct place.
Fixes #1736 .
2020-04-10 22:58:11 +02:00
Sarah Hoffmann
a471a3d1b0
Merge pull request #1745 from lonvia/shuffle-sql-functions
...
Some more SQL function reorganisation
2020-04-10 17:23:09 +02:00
Sarah Hoffmann
79a68fc2db
Merge branch 'deletable-and-polygons-as-json' of https://github.com/mtmail/Nominatim into mtmail-deletable-and-polygons-as-json
2020-04-10 17:20:51 +02:00
marc tobias
93ddd46231
Add JSON output for /deletable.php and /polygons.php
2020-04-10 15:34:56 +02:00
Sarah Hoffmann
f5f0c197be
move ranks-related functions in separate sql file
...
Also adds a common function for computing the update radius
around place nodes.
2020-04-10 11:34:14 +02:00
Sarah Hoffmann
4a30ec28b9
move helper functions from placex_triggers into utils
...
Also adds documentation for these functions.
2020-04-10 11:05:11 +02:00
Sarah Hoffmann
37ef9bb3d3
Merge pull request #1742 from mtmail/travis-ci-add-os
...
Travis-Ci configuration: remove -sudo-, add -os-
2020-04-10 08:46:50 +02:00
marc tobias
3e1d4a87fa
travis-ci configuration: remove -sudo-, add -os-
2020-04-10 01:20:51 +02:00
Sarah Hoffmann
320d46cc96
Merge pull request #1741 from filimongeorge/patch-1
...
Updated Import and Update .md file
2020-04-09 23:00:34 +02:00
Sarah Hoffmann
a06ceeef4c
Merge pull request #1740 from mtmail/setupclass-index-outputfile-not-used
...
SetupClass.php: remove unused variable
2020-04-09 22:57:51 +02:00
Sarah Hoffmann
def573d7b4
Merge pull request #1739 from lonvia/remove-self-from-geojson
...
Further tweaks to geocodejson output
2020-04-09 22:51:20 +02:00
filimongeorge
7f7d29fdd1
Updated Import and Update .md file
2020-04-09 20:51:38 +03:00
marc tobias
c611d49941
SetupClass.php: remove unused variable
2020-04-08 14:16:06 +02:00
Sarah Hoffmann
11cd648699
remove name from geocodejson when not set
2020-04-08 11:19:43 +02:00
Sarah Hoffmann
98be5bf637
adapt tests to geocodejson format adaptions
2020-04-08 11:19:43 +02:00
Sarah Hoffmann
29df9771bb
further tweaks to geocodejson address output
...
Removes the place itself from the address details and use
the lowest ranking element in the rank range for the output.
2020-04-08 11:11:33 +02:00
Sarah Hoffmann
e68c1132da
ignore isaddress in details output when it is not present
2020-04-08 10:28:28 +02:00
Sarah Hoffmann
1047b1c191
Merge pull request #1737 from mtmail/expose-isaddress-in-details-json
...
details JSON: also print isaddress addressline field
2020-04-07 20:49:31 +02:00
marc tobias
9431e80eb4
details JSON: also print isaddress addressline field
2020-04-07 14:50:41 +02:00
Sarah Hoffmann
178501de61
Merge pull request #1734 from krahulreddy/fixed-parselatlon
...
Added whitespace support for parseLatLon
2020-04-05 23:25:50 +02:00
Sarah Hoffmann
81c7f618fb
avoid deletes on search_name in reverse-only mode
2020-04-04 18:26:27 +02:00
Rahul
eb2d816f2a
Added test cases for whitespaces in LatLon
2020-04-04 00:53:40 +05:30
Rahul
244cb0e98c
Added whitespace characters support in LatLon parsing
2020-04-04 00:53:40 +05:30
Sarah Hoffmann
300ac4b77b
fix phpcs issues
2020-04-03 20:08:08 +02:00
Sarah Hoffmann
0d189ac5df
Merge pull request #1733 from krahulreddy/whitespaces-considered-as-single-space
...
Support whitespace characters(x09-x0d) as single space
2020-04-03 18:01:47 +02:00
Sarah Hoffmann
fed2c307a7
Merge pull request #1732 from lonvia/improve-geocodejson-output
...
Improve geocodejson output
2020-04-02 21:21:04 +02:00
K Rahul Reddy
7aa2df5389
Support whitespace characters(x09-x0d) as single space
2020-04-02 05:04:40 +05:30
Sarah Hoffmann
975ef0b305
re-add district to geocodejson
2020-04-01 21:24:42 +02:00
Sarah Hoffmann
e59146a733
update documentation for geocodejson
...
Address parts should be usable now.
2020-04-01 11:17:25 +02:00
Sarah Hoffmann
8150c3602b
add tests for geocodejson address fields
2020-04-01 11:14:48 +02:00
Sarah Hoffmann
ca8d776724
determine geocodejson address by rank instead of type
...
Using the address rank to set the address parts catches
a much wider variety of types like 'town' and 'suburb'.
With recent address ranking changes the rank ranges
are relatively reliable.
2020-04-01 11:12:52 +02:00
Sarah Hoffmann
fdc40d5169
factor out geocodejson address generation
...
Unifies the two implementations currently used for search and address.
2020-04-01 10:27:17 +02:00
Sarah Hoffmann
d0a97056c4
Merge pull request #1731 from lonvia/remove-polygon-from-docs
...
docs: remove example with polygon parameter
2020-04-01 10:21:45 +02:00
Sarah Hoffmann
e98619f801
docs: remove example with polygon parameter
...
This parameter was undocumented, long deprecated and is gone now.
2020-03-31 20:10:03 +02:00
Sarah Hoffmann
86eebc4305
fix typo
...
Fixes #1730
2020-03-31 19:53:55 +02:00
Sarah Hoffmann
4930f776fe
fix handling of postcode areas in addresses
...
The order of preference is now:
1. a post code on the place itself
2. a post code area in the address
3. the computed postcode from the place
Fixes #1723 .
2020-03-30 23:27:48 +02:00
Sarah Hoffmann
19948c378a
adapt tests to new borough ranking
2020-03-30 23:04:20 +02:00
Sarah Hoffmann
b3215b802d
downgrade borough and remove unincorporated area
2020-03-30 18:37:23 +02:00
Sarah Hoffmann
ed16d5b6aa
Merge pull request #1729 from lonvia/fix-details-link-for-boundaries
...
Fix details link for boundaries
2020-03-29 23:12:16 +02:00
marc tobias
7a94872413
remove polygon=1 (polypoints) feature
2020-03-29 21:58:11 +02:00
Sarah Hoffmann
98750922eb
also emit place_type in json version of details
2020-03-29 21:06:39 +02:00
Sarah Hoffmann
60c4c9ef2c
rather use new place_type in getAddressNames()
...
If for a boundary the place_type is defined, handle the address
part like a place node. This is the same behaviour as before
when class/type where patched earlier.
2020-03-29 20:49:35 +02:00
Sarah Hoffmann
101f04bbf2
Fix address link for boundaries in details
...
Removes the special casing for boundaries with a place
type in get_addressdata(). Instead the place type is now
returned as an extra field, so that the caller has to
handle the situation.
This fixes the details link next to the address in the details
view, which previously would go to a place class instead of the
original boundary class.
2020-03-29 17:40:56 +02:00
Sarah Hoffmann
4c593fa859
Merge pull request #1720 from lonvia/better-linking-of-places
...
Use wikidata tags for improving linking of places with boundaries
2020-03-27 21:12:39 +01:00
Aakankasha Sharma
6603ad4006
Updated TIGER database link in documentation ( #1725 )
...
Updated TIGER database link in documentation
2020-03-27 15:50:05 +01:00
Sarah Hoffmann
d56c69dd01
adapt API tests to place linkage changes
...
The missing district is due to a data error for wikidata tags.
2020-03-25 11:38:31 +01:00
Sarah Hoffmann
e26a300c2f
use wikidata tag for linking places
...
Having the same wikidata is a strong indicator that the same place
is meant. There are some assignment errors where the wikidata does
not link to the object itself but to something that mentions the
place. To reduce errors there, prefer same name.
2020-03-21 22:46:54 +01:00
Sarah Hoffmann
405482ede4
remove linking via admin_centre role
...
The admin_centre role is for the seat of government which is not
the same as the administrative entity. This is mostly used
correctly these days, so avoid matching by that role.
2020-03-21 21:59:11 +01:00
Sarah Hoffmann
3db2b05069
linking: better name matching for address-less places
...
Administrative boundaries that do not figure in the address
should still be able to take part in the name matching.
Use the rank_search for comparison in this case.
2020-03-21 21:57:04 +01:00
Sarah Hoffmann
ce5870223a
Merge pull request #1706 from mtmail/warn-if-no-tiger-files-found
...
print warning if no Tiger files found
2020-03-06 22:55:37 +01:00
Sarah Hoffmann
9c1bb87493
Merge pull request #1707 from lonvia/regression-address-in-area
...
place node address parts must be in lower rank area
2020-03-06 22:55:24 +01:00
Sarah Hoffmann
1f7394dd54
place node address parts must be in lower rank area
...
This fixes a regression where the area of the lower ranking
area was not computed correctly.
Also excludes postcodes areas now as they have their own
hierarchy.
2020-03-06 21:51:38 +01:00
marc tobias
bb569aa484
print warning if no Tiger files found
2020-03-06 17:52:46 +01:00
Sarah Hoffmann
b0a350db37
Merge pull request #1705 from lonvia/delete-linkee-from-search-name
...
Remove linkees from search_name
2020-03-04 11:55:05 +01:00
Sarah Hoffmann
78526a33b4
Remove linkees from search_name
...
Fixes #722
2020-03-04 11:36:39 +01:00
Sarah Hoffmann
ab997b7fb1
Merge pull request #1704 from lonvia/centroid-within-geometry
...
linked centroids must always be within geometry
2020-03-04 10:18:57 +01:00
Sarah Hoffmann
6d431aebb7
linked centroids must always be within geometry
...
When using a linked place as centroid for a boundary, check
first that it is really within the area. If it is outside,
just keep the computed centroid because a centroid outside the
area just causes havok.
Fixes #1352 .
2020-03-04 09:59:57 +01:00
Sarah Hoffmann
a00ea23847
Merge pull request #1702 from lonvia/rename-derived-place
...
Make admin boundaries inherit address rank from place nodes
2020-03-04 08:08:39 +01:00
Sarah Hoffmann
53ca751a02
fix style
2020-03-01 22:24:32 +01:00
Sarah Hoffmann
8c444378bc
better grouping
2020-02-28 22:10:35 +01:00
Sarah Hoffmann
55fdf0abda
output linked place into address details
2020-02-28 22:07:06 +01:00
Sarah Hoffmann
acd8ca2ebd
add testing for rank adaption while linking
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
06fdfad89e
link against place nodes by place type
...
If a boundary relation has no label member preferably
link against a place node with the same place type.
Also inherit the rank_address from the place node (only
has an effect when linking via lable member or place type).
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
00ca493f33
move linked place type into linked_place extratags
...
Using linked_place means that we don't overwrite any
place tags on the boundary. This is important when we
wanto to use the information for linking.
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
b00d16fd7d
Merge pull request #1698 from lonvia/cleanup-partition-functions
...
Cleanup partition functions
2020-02-26 20:21:10 +01:00
Sarah Hoffmann
03c373a4b3
make all query partition functions stable
2020-02-26 11:41:49 +01:00
Sarah Hoffmann
bdaa39573f
remove unused nearfeature types
...
Also move the remaining nearfeaturecentr type close to the
function that is using it.
2020-02-26 11:01:29 +01:00
Sarah Hoffmann
8a4c7f6e2b
simplify getNearestParallelRoadFeature function
...
The function only ever returns one result of which only the
place_id is used. So simplify it to return a single place_id
only (or NULL if none is found).
Also fix typo in function name.
2020-02-26 11:01:04 +01:00
Sarah Hoffmann
84ea0753d8
simplify getNearestRoadFeature function
...
The function only ever returns one result of which only the
place_id is used. So simplify it to return a single place_id
only (or NULL if none is found). Rename funciton to avoid
conflicts when updating an existing database.
2020-02-26 10:58:55 +01:00
Sarah Hoffmann
c1ef56c870
advise against using Postgresql 12 and Postgis 3
...
See also #1677
2020-02-25 09:44:32 +01:00
Sarah Hoffmann
0e3252f045
revert using stricter uniqueness constraint on place
...
Multiple objects with the same (osm_type, osm_id, class) may
exist when we hold back deleting an area because it is so
large.
Fixes #1695 .
2020-02-24 22:55:03 +01:00
Sarah Hoffmann
65df218f91
Merge pull request #1693 from lonvia/reorganize-addressline-computation
...
Reorganize addressline computation
2020-02-24 22:39:51 +01:00
Sarah Hoffmann
5220a92be4
adapt API tests
2020-02-22 16:46:03 +01:00
Sarah Hoffmann
d643ca8dee
move address line computation in its own function
2020-02-21 16:38:14 +01:00
Sarah Hoffmann
de45152028
Merge pull request #1692 from mtmail/tests-for-HasSetAny
...
unit tests for ParameterParser::hasSetAny
2020-02-20 21:16:39 +01:00
marc tobias
7fd9d0eeef
unit tests for ParameterParser::hasSetAny
2020-02-19 16:55:17 +01:00
Sarah Hoffmann
d35a0b392e
Merge pull request #1691 from lonvia/structured-query-via-cmdline
...
add structured search to command-line query tool
2020-02-19 11:12:37 +01:00
Sarah Hoffmann
cbddfcde5b
add structured search to command-line query tool
2020-02-19 11:04:07 +01:00
Sarah Hoffmann
02ffa752ea
Merge pull request #1690 from lonvia/parenting-large-rank-30-areas
...
improve parenting for large areas with rank 30
2020-02-19 09:20:12 +01:00
Sarah Hoffmann
6189e0c79b
improve parenting for large areas with rank 30
...
Instead of unconditionally parenting them to a street, the
larger areas get a parent area that contains them. To keep
things computationally light-weight, only use the centroid and
bbox to determine if an area is contained.
Requires renaming of parenting functions because renaming
a parameter of the function causes issues when updating the
function (it requires a manual delete, which I'd like to
avoid).
2020-02-19 08:43:53 +01:00
Sarah Hoffmann
6ed6a0d447
Merge pull request #1689 from mtmail/travis-postgres-stopped-working
...
Travis: documentation suggests we need to add postgresql-client package
2020-02-19 08:00:08 +01:00
marc tobias
484892ae97
Travis: documentation suggests we need to add postgresql-client package pre-startup
2020-02-18 23:45:21 +01:00
Sarah Hoffmann
027d9e938c
Merge pull request #1688 from mtmail/snippet-noun-vs-snipped-verb
...
documentation wording: snipped->snippet
2020-02-18 22:55:20 +01:00
marc tobias
e171f90d81
documentation wording: snipped->snippet
2020-02-18 22:48:27 +01:00
Sarah Hoffmann
92c5d3b720
make sure that linked places are within a boundary
...
This is a regression from previous code refactoring.
Fixes #1684 .
2020-02-18 22:46:32 +01:00
Sarah Hoffmann
2a6e8ad68e
add bbox whereclause to make postgis 3.0 happy
...
Normally ST_Covers() should include a bbox index use,
so adding a bbox where clause is not really necessary.
However, the query planner messes up and uses a parallel
index search with a second index instead of exclusively
running on the geometry index, when the bbox part is
missing.
2020-02-16 14:10:22 +01:00
Sarah Hoffmann
55c8a0ac08
Merge pull request #1678 from lonvia/early-drop
...
Clean up intermediate tables earlier with --drop
2020-02-13 22:50:41 +01:00
Sarah Hoffmann
6073d948e6
fix duplicate keys in tests
...
The tests suddenly failed because the unique key constraint
is more strict and does no longer include the type.
2020-02-12 11:29:33 +01:00
Sarah Hoffmann
b9171dd10b
clean up intermediate tables earlier with --drop
...
When --drop is given, we can remove all node geometry information
already after the import with osm2pgsql. Also drop all unnecessary
tables before creating the final indices.
2020-02-12 11:03:20 +01:00
Sarah Hoffmann
97b892fac2
Merge pull request #1675 from lonvia/refresh-connection-while-indexing
...
Fix a couple of issues with the new Python nominatim script
2020-02-12 08:18:09 +01:00
Sarah Hoffmann
b3fdf19b85
Merge pull request #1674 from mtmail/testdb-how-to-select-tiger-data
...
document how to extract subset of TIGER data needed for API tests
2020-02-11 22:57:39 +01:00
Sarah Hoffmann
8c89e16ad2
Merge pull request #1673 from mtmail/wikidata-wget-incomplete
...
wikipedia: wget didnt download, skip index generation
2020-02-11 22:56:45 +01:00
Sarah Hoffmann
960409c701
psycopg 2.6 is now usable on ubuntu 16
2020-02-11 22:49:03 +01:00
Sarah Hoffmann
d1eeaa59a6
nominatim.py: use async in connect() function
...
The _async parameter name is only supported since psycopg 2.7.
However, async is a keyword in Python >= 3.7, so using this
gives us a syntax error. Working around this by defining the
parameters in a dict and handing that into the connect function.
2020-02-11 22:16:17 +01:00
Sarah Hoffmann
882f496e0a
nominatim.py: also catch deadlocks on final wait
2020-02-11 22:16:17 +01:00
Sarah Hoffmann
8b8aa1b4e6
regularly close connection while indexing
...
Postgres sooner or later runs out of memory when the connection
is used for too long.
2020-02-11 22:16:17 +01:00
marc tobias
932ac23f18
document how to extract subset of TIGER data needed for API tests
2020-02-11 18:50:27 +01:00
marc tobias
6c6560ca53
wikipedia: wget didnt download, skip index generation
2020-02-10 17:20:11 +01:00
Sarah Hoffmann
0698757e6e
Merge pull request #1670 from lonvia/permalinks-for-tiger-and-interpolation
...
Enable Permalinks to dtails for tiger and interpolation
2020-02-09 21:07:19 +01:00
Sarah Hoffmann
3a3f9b3496
fix formatting
2020-02-09 16:57:55 +01:00
Sarah Hoffmann
97d87895bf
details: also look for interpolations when way id is given
2020-02-09 16:50:04 +01:00
Sarah Hoffmann
c36fd72f99
use detailsPermaLink function on main website as well
2020-02-09 16:05:22 +01:00
Sarah Hoffmann
57ae3d03a1
return place_id link to details when not an OSM object
...
Stop-gap solution to find the right object for Tiger and
interpolation objects.
2020-02-09 15:45:38 +01:00
Sarah Hoffmann
3737712044
Merge pull request #1667 from mtmail/setup-delete-invalid-indices
...
setup: delete invalid indices in create-search-indices step
2020-02-09 14:21:17 +01:00
Sarah Hoffmann
8531339b4e
Remove hack that changes the class/type of cities
...
This interferes badly with the details view.
Fixes #1668 .
2020-02-09 12:14:32 +01:00
marc tobias
540b12537a
setup: delete invalid indices in create-search-indices step
2020-02-08 15:16:20 +01:00
Sarah Hoffmann
9e2fb45783
Merge pull request #1665 from mtmail/centos7-php7
...
CentOS7: update from PHP 5.4 to 7.2, add psycopg2
2020-02-07 20:43:49 +01:00
Sarah Hoffmann
e7c128b973
Merge pull request #1666 from mtmail/ubuntu-installs-add-psycopg2
...
Vagrant Ubuntu: psycopg2 is required
2020-02-07 20:42:38 +01:00
marc tobias
d4a3470c9e
Vagrant Ubuntu: psycopg2 is required
2020-02-07 15:26:09 +01:00
marc tobias
4165b8c011
CentOS7: update from PHP 5.4 to 7.2
2020-02-07 15:18:46 +01:00
Sarah Hoffmann
357ba2f64d
Merge pull request #1663 from mtmail/vagrant-centos-8
...
Vagrant setup for CentOS 8
2020-02-06 21:12:28 +01:00
Sarah Hoffmann
3ce8818045
Merge pull request #1664 from mtmail/check-import-finished-for-reverse-only
...
check_import_finished.php - reverse_only mode has less indices
2020-02-06 21:07:04 +01:00
marc tobias
76082ac7cb
check_import_finished.php - reverse_only mode has less indices
2020-02-06 16:48:06 +01:00
marc tobias
4a451671d3
Vagrant setup for CentOS 8
2020-02-06 00:43:30 +01:00
marc tobias
a3728b7188
details html page: no longer use place_id in URLs
2020-02-02 01:16:31 +01:00
Sarah Hoffmann
a8711ab013
fix verboseness of nominiatim script during updates
2020-01-31 18:18:50 +01:00
Sarah Hoffmann
3e4754febd
Merge pull request #1648 from lonvia/nominatim-as-python-script
...
Replace C Nominatim indexer with Python script
2020-01-31 17:53:49 +01:00
Sarah Hoffmann
da1d661fa0
remove libxml dependency for travis as well
2020-01-31 15:15:35 +01:00
Sarah Hoffmann
1801db523b
fix typo
2020-01-29 11:50:30 +01:00
Sarah Hoffmann
2979c39628
also adapt indexing command in update script
2020-01-29 11:36:12 +01:00
Sarah Hoffmann
bb9bb40287
update cMake build documentation
...
Remove the dependency on libxml, no longer needed.
2020-01-24 22:53:26 +01:00
Sarah Hoffmann
8f6fdfeb0b
forgot to index last rank
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
b4e6d72fde
replace nominatim C program
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
a338ebfce0
fix log levels
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
4144364a15
add time display for nominatim.py
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
11c0dd235b
clean up and document script
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
4a9502bf88
fix SQL and some other stuff
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
6c0d6d3178
Revert "switch to threading"
...
This reverts commit 8b1c2181be5aa5335c68d36a49cab9c4e2cd8bef.
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
0a26ca7104
switch to threading
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
2a15b2522f
use generator for thread choice
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
c11d1d78e9
add prepared statement
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
7e51aa4cef
simple implementation
2020-01-24 22:06:30 +01:00
Sarah Hoffmann
9abb96fa6b
Merge pull request #1647 from lonvia/split-out-linking
...
Split up placex update trigger code
2020-01-24 21:55:19 +01:00
Sarah Hoffmann
879aafc916
fix indent
2020-01-24 21:16:26 +01:00
Sarah Hoffmann
5ec25122f6
rename functions where return parameter changed
...
Postgresql cannot cleanly reimport these functions when
upgrading, so simply rename to avoid errors.
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
9371b1aeb9
forgot new trigger sql
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
6f6d116451
adapt index for changes name lookup
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
3ff6eccfd7
move trigger creation later in setup
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
5d1fa597ea
clean up get_word_id function
...
Replaced by addr_ids_from_name() which also normalises the
string.
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
3b6c2c9155
getNearestNamed*Feature functions better return values
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
f863040b38
factor out parent search from addr:street/addr:place
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
1033f8bce7
factor out searching for parent road for pois
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
cf4dbbd681
remove unused function
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
6dccc693d0
factor out computation of default names
...
Also moves the computation down the line so that we never
have to do it twice.
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
c3dc66ce9c
factor out place linking sql
2020-01-23 22:28:43 +01:00
Sarah Hoffmann
4856f56d61
adapt test to change in hamlet classification
2020-01-23 22:26:47 +01:00
Sarah Hoffmann
2edc15dfb8
doc: clarify the influence of autovacuum on memory
2020-01-22 12:02:38 +01:00
Sarah Hoffmann
69e31baf68
docs: add a note that the faltnode file is needed for updates
...
Fixes #1644 .
2020-01-22 11:44:05 +01:00
Sarah Hoffmann
586ff0c364
Merge pull request #1638 from mtmail/check-for-invalid-indices
...
check_import_finished: check for invalid indices
2020-01-14 21:34:35 +01:00
Sarah Hoffmann
f3ba358d50
hint that invalid indices must be manually deleted
2020-01-14 21:33:09 +01:00
Sarah Hoffmann
54bf4c3339
Merge pull request #1637 from mtmail/fix-warnings-in-verbose-warm
...
warm.php verbose mode was printing errors
2020-01-14 21:30:46 +01:00
Sarah Hoffmann
acda4344de
Merge pull request #1636 from lonvia/update-introduction
...
Update help text on website
2020-01-14 21:29:25 +01:00
marc tobias
6b0afd5d9b
check_import_finished: check for invalid indices
2020-01-14 19:36:40 +01:00
marc tobias
850910ed9e
warm.php verbose mode was printing errors
2020-01-14 18:24:49 +01:00
Sarah Hoffmann
4ffa11a26c
update report a problem page
2020-01-13 22:42:49 +01:00
Sarah Hoffmann
f5e60f8c40
update help links
...
All links should go to nominatim.org now. Also add links
to Help OSM and the Github repository.
2020-01-13 22:20:53 +01:00
Sarah Hoffmann
ddaf1b79d4
remove special handling of rail
...
Skip railway=rail in the style, so that installations can remove
it if they wish.
2020-01-08 23:53:23 +01:00
Sarah Hoffmann
d732dc3bb2
update place address levels
...
Adds province and allotments and downgrades hamlet.
2020-01-08 23:53:03 +01:00
Sarah Hoffmann
f0af5c5643
Merge pull request #1628 from lonvia/split-sql-functions
...
Split monstrous functions.sql
2020-01-08 21:36:40 +01:00
Sarah Hoffmann
7a194789bc
remove remaining sql functions into function/ directory
2020-01-08 11:45:51 +01:00
Sarah Hoffmann
827d7a9a62
move postcode table triggers to own file
2020-01-08 11:22:23 +01:00
Sarah Hoffmann
dae2761137
move placex triggers into own file
2020-01-08 11:18:42 +01:00
Sarah Hoffmann
4304c1a7bb
move place triggers into own file
2020-01-07 23:55:38 +01:00
Sarah Hoffmann
c537ea18a4
move functions for interpolation table in own file
2020-01-05 16:36:46 +01:00
Sarah Hoffmann
28fa7be75a
move functions for address lookup into own file
2020-01-05 16:16:21 +01:00
Sarah Hoffmann
f1a5862f3d
move creation function for aux data into own file
...
This function is currently unused, so don't even load it.
2020-01-05 16:04:04 +01:00
Sarah Hoffmann
4088e4e371
move importance/wikipedia functions into separate file
2020-01-05 15:55:39 +01:00
Sarah Hoffmann
0ef6425847
move SQL functions for normalisation in separate file
2020-01-05 15:38:20 +01:00
Sarah Hoffmann
7489deb1b7
Merge pull request #1627 from lonvia/cleanup-setup-scripts
...
Minor cleanup of setup scripts
2020-01-05 14:17:39 +01:00
Sarah Hoffmann
2059e18e8b
setup: factor out parameter replacement in SQL scripts
...
Put all into a single function and use for all SQL
templates.
2020-01-04 23:48:49 +01:00
Sarah Hoffmann
d11ee4c6d9
fix osm link in polygon error view
2020-01-04 21:51:14 +01:00
Sarah Hoffmann
c74cbde329
Merge pull request #1626 from lonvia/move-tests-to-osm2pgsql
...
Move tests to osm2pgsql
2020-01-04 20:08:35 +01:00
Sarah Hoffmann
20d541af06
remove osm2pgsql tag tests
...
These tests are now part of the osm2pgsql test suite.
2020-01-04 16:23:29 +01:00
Sarah Hoffmann
2c163b3959
update osm2pgsql (gazetteer output tests)
2020-01-04 16:20:52 +01:00
Sarah Hoffmann
c6a7ef5574
Merge pull request #1624 from lonvia/add-extratags-style
...
Add new extratags style
2020-01-03 10:06:47 +01:00
Sarah Hoffmann
7005c6af12
add new extratags style
...
This is the same as the full style but also adds all unused tags
except for a couple of internal tags to the extratags column.
2020-01-02 14:24:51 +01:00
Sarah Hoffmann
256986f01f
Merge pull request #1622 from mtmail/clang-faq-entry
...
Documentation: add FAQ entry about clang not found
2020-01-02 14:14:00 +01:00
Sarah Hoffmann
33d322df9d
update osm2pgsql (exclude country and postcode from address tags)
2019-12-28 22:36:02 +01:00
marc tobias
631013be02
Documentation: add FAQ entry about clang not found
2019-12-28 21:21:39 +01:00
Sarah Hoffmann
89a990e000
Merge pull request #1612 from mtmail/cleanup-wiki-scripts
...
refactor import_wiki* script for readability
2019-12-23 22:05:39 +01:00
Sarah Hoffmann
ccddd9d1de
Merge pull request #1619 from mtmail/document-check-import-script
...
Use check_import_finished in test suite, document
2019-12-23 22:04:25 +01:00
marc tobias
9587fc9909
refactor import_wiki* script for readability
2019-12-23 21:38:33 +01:00
marc tobias
22b7aed769
Use check_import_finished in test suite, document
2019-12-23 21:25:06 +01:00
marc tobias
7db0da40ad
new script utils/check_import_finished.php
2019-12-23 15:13:18 +01:00
Sarah Hoffmann
2be70b2c36
Merge pull request #1596 from mtmail/remove-obsolete-wikidata-scripts
...
remove old wikidata script. See data-sources/wikipedia-wikidata/ for new process
2019-12-18 21:55:17 +01:00
Sarah Hoffmann
0e03668cf2
Merge pull request #1601 from mtmail/spheric-distance-on-details-page
...
details page: differentiate between spheric distance and distance in meters
2019-12-18 21:54:06 +01:00
Sarah Hoffmann
28b89daa22
remove duplicate addr:country from style
2019-12-17 20:48:27 +01:00
Sarah Hoffmann
2bfa2f4292
Merge pull request #1609 from txtor/master
...
typo - fixes openstreetmap#1606
2019-12-17 20:46:20 +01:00
Francesc Hervada-Sala
3b22b9911b
typo - fixes openstreetmap#1606
2019-12-17 17:24:29 +01:00
Sarah Hoffmann
bc68ff1e43
update osm2pgsql (deletion and address updates)
2019-12-16 21:27:41 +01:00
Sarah Hoffmann
f59af7483b
Merge pull request #1604 from mtmail/wiki-create-pagelinkcount-earlier
...
wikipedia: create all language pagelinkcount tables before querying them
2019-12-14 21:43:16 +01:00
marc tobias
394f85a96b
wikipedia: create all language pagelinkcount tables before querying them
2019-12-14 20:36:54 +01:00
marc tobias
626e3238f2
details page: differentiate between spheric distance and distance in meters
2019-12-11 00:49:32 +01:00
marc tobias
2051a84a09
remove old wikidata script. See data-sources/wikipedia-wikidata/ for new process
2019-12-03 19:27:32 +01:00
Sarah Hoffmann
f8bd4f5133
add test for finding housenumber 0
2019-12-01 20:36:59 +01:00
Sarah Hoffmann
a4e514033d
Merge branch 'housenumber-zero' of https://github.com/mtmail/Nominatim into mtmail-housenumber-zero
2019-12-01 20:17:27 +01:00
Sarah Hoffmann
95f20ed7ab
Merge pull request #1585 from mmd-osm/patch-1
...
Mention FAQ / troubleshooting page in README
2019-12-01 20:13:35 +01:00
Sarah Hoffmann
bfe92ea191
bdd tests: enforce use of full import style
2019-12-01 16:25:39 +01:00
Sarah Hoffmann
d3bacf475a
Revert "update osm2pgsql (reduce memory usage)"
...
This reverts commit 3474464894 .
2019-12-01 16:25:02 +01:00
Sarah Hoffmann
3474464894
update osm2pgsql (reduce memory usage)
2019-11-29 19:31:48 +01:00
mmd
5b25bff2d8
Mention FAQ / troubleshooting page in README
2019-11-26 22:33:00 +01:00
Sarah Hoffmann
c36896c524
Merge pull request #1578 from lonvia/docs-installation-support
...
Update installation documentation wrt memory usage
2019-11-26 22:21:45 +01:00
Sarah Hoffmann
d9fe25ac2e
Merge pull request #1581 from mtmail/wrap-leaflet-map
...
Allow leaflet map to wrap-around, still longitude should be -180..+180
2019-11-26 21:54:26 +01:00
Sarah Hoffmann
0bd006eef8
fix typo
2019-11-26 21:52:37 +01:00
Sarah Hoffmann
081d1f9779
Merge pull request #1582 from mtmail/documentation-direct-link-osm2pgsql
...
add wiki link to osm2psql README
2019-11-26 21:51:30 +01:00
Sarah Hoffmann
546c975e28
Merge pull request #1583 from mtmail/documentation-pear-db-no-longer-prerequisite
...
PHP PEAR::DB is not longer a prerequisite
2019-11-26 21:51:01 +01:00
marc tobias
05fb037edb
PHP PEAR::DB is not longer a prerequisite
2019-11-25 19:11:08 +01:00
marc tobias
5cdc196df1
add wiki link to osm2psql README
2019-11-25 19:08:34 +01:00
marc tobias
0896c07972
Allow map to wrap-around, still longitude should be -180..+180
2019-11-25 18:56:46 +01:00
Sarah Hoffmann
be9f54d0a9
set default osm2pgsql to 0 when using flatnode file
2019-11-24 14:36:36 +01:00
Sarah Hoffmann
88fab44006
update minimum required RAM to 64GB
...
Also adds more background explanation on time and RAM use,
as well as a hint that github issues are not good for
installation support.
2019-11-24 10:31:34 +01:00
Sarah Hoffmann
000fe3ddff
remove reference to nominatim.xml OpenSearch description
...
The file was meant for the openstreetmap instance only.
Fixes #1554 .
2019-11-20 11:53:04 +01:00
Sarah Hoffmann
f180f99a95
Merge pull request #1570 from lonvia/wikipedia-importance-updates
...
Wikipedia importance updates
2019-11-20 11:25:23 +01:00
Sarah Hoffmann
8d9aa9bf33
formatting: avoid long lines
2019-11-20 10:57:36 +01:00
Sarah Hoffmann
9fed91a47f
adapt tests for new wikipedia tables
2019-11-20 09:57:40 +01:00
Sarah Hoffmann
12f830fbbb
fix loading of data without wikipedia files
...
Also removes unused place_boundingbox table.
2019-11-17 23:58:43 +01:00
Sarah Hoffmann
6d764a05b0
prefer English wikipedia for wikidata matches
2019-11-17 19:53:42 +01:00
Sarah Hoffmann
cd3ddec746
Switch to sql.gz format for wikipedia data
...
The dump import is no longer needed.
2019-11-17 10:09:31 +01:00
Sarah Hoffmann
e4555a208d
fix wikidata import
...
The loop was not skipping empty results of get_wikipedia_match().
2019-11-17 10:06:34 +01:00
Sarah Hoffmann
d53af96aa4
update documentation for new wikipedia data
2019-11-16 16:52:23 +01:00
Sarah Hoffmann
d1a9dc0f24
use wikidata links for importance as well
2019-11-16 16:52:23 +01:00
Sarah Hoffmann
a1bcb28cea
also update wikipedia from linked places
2019-11-16 16:52:23 +01:00
Sarah Hoffmann
3fbba8b9db
add command for recomputing importance
2019-11-16 16:52:23 +01:00
Sarah Hoffmann
5fb850982a
move importance computation into its own function
2019-11-16 16:52:23 +01:00
Sarah Hoffmann
6f2e767c77
Merge pull request #1557 from mtmail/document-boundingbox
...
documentation: add note what bounding box can be used for
2019-11-13 10:30:22 +01:00
Sarah Hoffmann
1ead5b0f3f
Merge pull request #1563 from mtmail/remove-pear-db-faq-entries
...
documentation: remove FAQ entries related to PEAR::DB
2019-11-13 10:29:52 +01:00
Sarah Hoffmann
eb6681d486
Merge pull request #1564 from mtmail/typo-sql-in-postcodes-md
...
typo in SQL in Postcodes.md
2019-11-13 10:28:57 +01:00
marc tobias
7503987630
typo in SQL in Postcodes.md
2019-11-11 23:34:44 +01:00
marc tobias
1d337e8a76
documentation: remove FAQ entries related to PEAR::DB, we no longer use that
2019-11-11 16:54:12 +01:00
Sarah Hoffmann
f42e40712e
Merge pull request #1555 from mtmail/setup-escape-shell-args
...
setup: escape arguments when executing shell commands (psql, createdb)
2019-11-06 22:47:00 +01:00
Sarah Hoffmann
b5fb8608ba
some reformatting of documentation changes and typo fixes
...
The newest mkdocs is more demanding when it comes to code block
formatting.
2019-11-06 22:34:43 +01:00
marc tobias
dea1d67d03
documentation: new page explaining calculated postcodes
2019-11-06 22:15:44 +01:00
Sarah Hoffmann
9e6fc8f073
Merge pull request #1548 from mtmail/centos7-postgresql-11
...
Update CentOS7 instruction to postgresql 11 (default was 9.2)
2019-11-06 21:52:45 +01:00
marc tobias
db6da75683
documentation: add note what bounding box can be used for
2019-11-06 17:33:20 +01:00
marc tobias
9cfd891fb9
setup: escape arguments when executing shell commands (psql, createdb)
2019-11-05 23:50:46 +01:00
marc tobias
f985680d2c
Update CentOS instruction to postgresql 11 (default was 9.2)
2019-11-02 14:17:53 +01:00
Sarah Hoffmann
8ae317e002
Merge pull request #1545 from mtmail/details-index-html-page
...
HTML page with search form when /details.php called without params
2019-10-31 18:30:35 +01:00
marc tobias
36e99c43ce
HTML page with search form when /details.php called without params
2019-10-31 17:13:43 +01:00
marc tobias
eeb26aaa6f
Addresses with housenumber 0 are found
2019-10-31 13:52:10 +01:00
Sarah Hoffmann
260dbe302a
Merge pull request #1542 from mtmail/tiger-import-more-verbose
...
Tiger data import: display which path is searched for files
2019-10-31 10:24:02 +01:00
marc tobias
c297584726
Tiger data import: display which path is searched for files
2019-10-30 15:50:29 +01:00
Sarah Hoffmann
5930383404
Merge branch 'fix-getcol-zero' of https://github.com/eyusupov/Nominatim into eyusupov-fix-getcol-zero
2019-10-28 23:07:28 +01:00
Sarah Hoffmann
7395eb9791
Merge pull request #1532 from eyusupov/use-extradir
...
Use ExtraDataPath for country grid
2019-10-28 23:01:42 +01:00
Sarah Hoffmann
e0de838b13
adapt tests to short_name demotion
2019-10-28 22:53:41 +01:00
Sarah Hoffmann
5292239714
demote short_name in the list of names to display
...
The usage of short_name in OSM has changed with time. It is no
longer suitable as a display name.
Fixes #783 .
2019-10-28 22:12:21 +01:00
Eldar Yusupov
b54fca4f7e
Handle zero in getCol()
2019-10-26 20:19:36 +03:00
Sarah Hoffmann
26f47d2eb7
switch to pygments for mkdocs hilighting
2019-10-25 23:57:23 +02:00
Sarah Hoffmann
233e064f0b
prepare for 3.4.0 release
2019-10-25 22:04:59 +02:00
Eldar Yusupov
72c0898409
Add optional compilation of osm2pgsl
2019-10-25 23:01:19 +03:00
Eldar Yusupov
92d1f5122b
Separate Nominatim build
2019-10-25 23:01:19 +03:00
Eldar Yusupov
314de3c3c0
Add options to compile only PG module/frontend
...
It makes it easier to install Nominatim server and PostgresSQL on
separate servers or use separate docker images for them.
2019-10-25 23:01:19 +03:00
Eldar Yusupov
544db43026
Separate more dependencies
2019-10-25 23:01:19 +03:00
Eldar Yusupov
4aca3700b2
Move nominatim lib deps to its dir
2019-10-25 23:01:19 +03:00
Eldar Yusupov
af833ff042
Include CheckSymbolExists CMake module
2019-10-25 23:01:19 +03:00
Eldar Yusupov
96c1a0a101
Use ExtraDataPath for country grid
2019-10-23 06:19:04 +03:00
Sarah Hoffmann
203e210d3a
update osm2pgsql (bound COPY buffers)
2019-10-22 22:47:03 +02:00
Sarah Hoffmann
ff1c78fef5
Merge pull request #1502 from mtmail/specialphrases-quotes
...
Specialphrases quotes
2019-10-22 21:41:53 +02:00
Sarah Hoffmann
d3a731dae4
Merge pull request #1528 from chatelao/patch-2
...
Typo - Wekipedia (Wikipedia)
2019-10-22 00:21:33 +02:00
chatelao
73a4433d8e
Typo - Wekipedia (Wikipedia)
2019-10-21 15:35:55 +02:00
Sarah Hoffmann
3b4ffea690
Merge pull request #1526 from lonvia/index-concurrently
...
create/drop indexes concurrently
2019-10-19 18:23:59 +02:00
Sarah Hoffmann
05d7f91392
fix rank of postcode results
...
Fixes #1487 .
2019-10-19 18:12:22 +02:00
Sarah Hoffmann
e3e9f69654
fix rank of postcode results
...
Fixes #1487 .
2019-10-19 17:57:57 +02:00
Sarah Hoffmann
34a4a9b08f
create/drop indexes concurrently
...
Fixes #1507 .
2019-10-19 17:13:05 +02:00
Sarah Hoffmann
e0836664e5
Merge pull request #1524 from MatthiasLohr/bugfix/uninitialized-string-offset
...
Fix for #1523 : Fix PHP warning
2019-10-15 09:51:20 +02:00
Matthias Lohr
8d7499342f
Fixed PHP warning from #1523
...
Signed-off-by: Matthias Lohr <mail@mlohr.com >
2019-10-15 08:46:19 +02:00
Sarah Hoffmann
a7b24627b5
Merge pull request #1484 from mtmail/ignore-errors-on-setup-drop
...
on --drop warn on non-existing tables, dont croak
2019-10-15 00:37:33 +02:00
Sarah Hoffmann
452324cf01
Merge pull request #1519 from mtmail/doc-viewbox-parameters2
...
documentation: add note what x,y mean for viewbox parameter
2019-10-15 00:34:30 +02:00
Sarah Hoffmann
15c5c8db24
add place=city_block/quarter to address hierarchy
...
Fixes #1516 .
2019-10-14 23:49:06 +02:00
marc tobias
423efd54e4
documentation: add note what x,y mean for viewbox parameter
2019-10-08 19:22:51 +13:00
TC Haddad
5e45e0b3d7
Gsoc2019 contributions for adding Wikidata to Nominatim ( #1475 )
...
Complete rewrite of wikipedia processing scripts, addition of processing wikidata, new data source, new documentation by @tchaddad during Google Summer of Code 2019 project.
2019-10-06 15:56:39 +08:00
Sarah Hoffmann
a60e7f2376
Merge pull request #1511 from cbpetersen/patch-1
...
Remove duplicate format query param
2019-10-01 13:52:24 +02:00
Christoffer Bo Petersen
ac7f0f7581
Remove duplicate format query param
2019-10-01 12:37:53 +02:00
marc tobias
9c872345d6
special phrases: use printf, line length below 120char
2019-09-19 01:12:42 +02:00
marc tobias
bd312fa747
special phrases: sometimes quotes are not escaped
2019-09-19 00:20:30 +02:00
marc tobias
573fba55af
SetupClass: on --drop check if table exists first
2019-09-04 13:12:11 +02:00
Sarah Hoffmann
39787f7d62
Merge pull request #1474 from mtmail/tiger-data-2019
...
US TIGER 2019 data got released
2019-09-03 22:54:22 +02:00
Sarah Hoffmann
f4c067d527
Merge pull request #1478 from tbertels/patch-1
...
Remove administrative arrondissements from Belgian addresses
2019-09-02 17:50:51 +02:00
Thomas Bertels
8d3595c3e2
Remove administrative arrondissements from Belgian addresses
...
"administrative7" -> [14, 0]
2019-08-27 14:15:18 +02:00
Sarah Hoffmann
b81a57f1e4
Merge pull request #1477 from dpasqualin/fix-python-shebang
...
Fix python shebang following PEP 394 recommendation
2019-08-26 22:40:43 +02:00
Diego Pasqualin
a624f8b599
Fix python shebang following PEP 394 recommendation
2019-08-26 14:54:19 +02:00
marc tobias
74f49a9d89
US TIGER 2019 data got released
2019-08-23 14:59:03 +02:00
TC Haddad
b7b89b30ea
fix spelling on US-Tiger documentation page ( #1459 )
2019-08-12 01:40:13 +02:00
Sarah Hoffmann
fb012504b2
Merge pull request #1444 from lonvia/require-python-3
...
Require python 3
2019-08-07 22:38:43 +02:00
Sarah Hoffmann
7ed9ecf350
Merge pull request #1453 from mtmail/add-boundingbox-to-lookup-results
...
lookup endpoint returns boundingbox
2019-08-06 20:40:06 +02:00
marc tobias
3af1520461
lookup endpoint returns boundingbox
2019-08-05 23:32:46 +02:00
Sarah Hoffmann
a7edda32ba
Merge pull request #1445 from mtmail/hierarchy-endpoint-broke
...
/hierarchy.php was missing namespace calling AddressDetails
2019-07-28 23:11:02 +02:00
marc tobias
7b09e320a8
/hierarchy.php was missing namespace calling AddressDetails
2019-07-28 22:05:51 +02:00
Sarah Hoffmann
46e077c40b
adapt TIGER conversion script for python 3
2019-07-28 20:56:02 +02:00
Sarah Hoffmann
7753ba6019
require python 3 for all tools used in updates
2019-07-28 20:36:35 +02:00
Sarah Hoffmann
511204c158
Merge pull request #1443 from lonvia/reorganize-search-name-partition-tables
...
Reorganize search name partition tables
2019-07-28 15:18:12 +02:00
Sarah Hoffmann
65daef70c1
Merge pull request #1433 from mtmail/us-postcode-import-optional
...
make US postcode data to an optional download
2019-07-28 14:50:13 +02:00
Sarah Hoffmann
7ab373e86d
add cmake mode for building documentation only
2019-07-28 14:27:14 +02:00
Sarah Hoffmann
79b81d39d8
streamline indexes of search_name partition tables
...
Remove index on name_vector. We always do near search where the
geometry index is sufficient. Also split centroid index in low
and high rank indexes. Reduces index size by about 25%.
2019-07-28 13:29:35 +02:00
Sarah Hoffmann
2bbe5017d4
use bbox of geometry when searching for attached streets
...
As we are doing a distance search, this improves results for
large places like airports.
Fixes #1442 .
2019-07-28 13:28:27 +02:00
marc tobias
765a932561
make US postcode data to an optional download
2019-07-24 01:13:57 +02:00
Sarah Hoffmann
4a2c9431ee
Merge pull request #1432 from mtmail/two-outputformats-for-lookup-endpoint
...
lookup endpoint supports jsonv2 and geocodejson output now
2019-07-22 23:31:56 +02:00
Sarah Hoffmann
de15d10f86
Merge pull request #1430 from mtmail/exclude-negative-tiger-housenumber-ranges
...
during TIGER import skip records with negative house number range
2019-07-22 23:30:06 +02:00
Sarah Hoffmann
55d414bd72
Merge pull request #1427 from mtmail/documentation-how-to-build-documentation
...
New readme file on how to build the documentation
2019-07-22 21:24:32 +02:00
marc tobias
1560685020
lookup endpoint supports jsonv2 and geocodejson output now
2019-07-21 23:20:48 +02:00
marc tobias
0e44659033
during TIGER import skip records with negative house number range
2019-07-21 21:41:12 +02:00
marc tobias
3b39cfb1cf
New readme file on how to build the documentation
2019-07-21 21:31:14 +02:00
Sarah Hoffmann
15bca71b0d
Merge pull request #1422 from lonvia/remove-country-from-addressline
...
Remove country from addressline
2019-07-16 22:29:17 +02:00
Sarah Hoffmann
3c12455c5b
Merge pull request #1421 from asantoz/patch-1
...
Minor change on lookup endpoint doc
2019-07-11 10:09:33 +02:00
Sarah Hoffmann
927b4c928e
add migration hints for country table
2019-07-10 22:54:32 +02:00
Sarah Hoffmann
be47cd2549
remove country from place_addressline
...
The country information can be determined sufficiently from
the country code. We only loose the specific OSM object
behind the address.
Also streamlines the location_area_country table.
2019-07-10 21:29:47 +02:00
André Santos
a4a17f93f5
Minor change on lookup endpoint doc
...
Fix documentation about lookup endpoint on output formats available on filter `format`
2019-07-10 19:26:38 +01:00
Sarah Hoffmann
745e52b798
Merge pull request #1419 from asantoz/minor-fix-doc
...
Minor issue on api docs
2019-07-08 22:23:10 +02:00
André Santos
bbc2da2a4b
Minor issue on api docs
...
Fix a minor issue on API docs in details endpoint example 🙏
2019-07-08 20:08:43 +01:00
Sarah Hoffmann
4c1793b4e3
recreate interpolations when one of their support nodes changes
...
A simple update is not enough because the interpolation splits
might change as well as the housenumbers.
Fixes #1360 .
2019-07-03 23:15:54 +02:00
Sarah Hoffmann
d1ca73f813
Reset housenumber on every place update
...
As it is a computed field, it needs to be computed from scratch
to take into account any surrounding changes.
Fixes #1395 .
2019-07-03 20:56:35 +02:00
Sarah Hoffmann
cdc7d0fe0e
remove visibility modifier from constants again
...
Only supported on PHP >= 7.1.
2019-07-02 23:24:49 +02:00
Sarah Hoffmann
a27a271034
Merge pull request #1415 from nslxndr/fix-db-log
...
Fix DB log
2019-07-02 20:47:42 +02:00
Sandor Nagy
6c097d24b1
Fix SQL concatenation for new query log
2019-07-02 01:19:59 +02:00
Sandor Nagy
0115b655bd
lib/log.php broke after switch to PDO DB abstraction
2019-07-02 01:19:55 +02:00
Sarah Hoffmann
e8f1463cc2
Merge pull request #1414 from lonvia/remove-more-places-from-address
...
Remove more places from address ranking
2019-07-01 22:33:20 +02:00
Sarah Hoffmann
e164d53fcc
adapt tests to new place address ranks
2019-06-30 23:09:43 +02:00
Sarah Hoffmann
b8f7b3cc8d
Remove county places and Regierungsbezirke vom German addresses
2019-06-30 22:27:44 +02:00
Sarah Hoffmann
b0e6fb73c6
generally remove all country and state places from address
...
Gets rid of the hard-coded expection for place nodes and sets
the address rank generally via the address level config instead.
That means only administrative boundaries are now used at that
level in addresses.
2019-06-30 22:27:44 +02:00
Sarah Hoffmann
dd50f1737b
Merge pull request #1412 from lonvia/rewrite-wordset-computation
...
Rework word set computation
2019-06-30 10:48:09 +02:00
Sarah Hoffmann
38a99856c0
Rework word set computation
...
Switch from an recursive algorithm for computing the word sets
to an iterative one that benefits from caching intermediate
results. This considerably reduces the amount of memory needed,
so that the depth restriction can be dropped. To ensure that
the number of word sets remains manageable, only sets up to
a certain length are accepted and only a certain number of
total word sets. If word sets need to be dropped, we drop
the ones with more words per word set first.
To further reduce the number of potential word sets, the valid
tokens are looked up first and then only word sets containing
valid tokens are computed.
Fixes #1403 , #1404 and #654 .
2019-06-29 18:22:31 +02:00
Sarah Hoffmann
09e7f0d013
remove historic:neighbourhood from address ranks
...
Should not be reverse searchable.
Fixes #1379 .
2019-06-10 20:12:27 +02:00
Sarah Hoffmann
e05e413cc4
use real centroid when looking for near roads
...
The point-on-surface may be at the corner in large objects, so
that roads are too far away.
Fixes #1389 .
2019-06-10 18:23:12 +02:00
Sarah Hoffmann
2c21cbb5e6
update osm2pgsql (downgrading unnamed places)
...
Also adds tests for updating unnamed places.
2019-06-10 18:22:11 +02:00
Sarah Hoffmann
3bc4b4bf9f
update osm2pgsql (import special tags)
2019-06-09 13:58:05 +02:00
Sarah Hoffmann
a09f2a6987
Merge pull request #1381 from mtmail/faq-entry-about-managed-database-services
...
FAQ entry about managed database services
2019-06-09 11:04:47 +02:00
Sarah Hoffmann
1f57d730df
Merge pull request #1394 from mtmail/update-postcodes-without-colon
...
exclude postcode ranges separated by colon from centre point calculation
2019-06-09 11:03:10 +02:00
Sarah Hoffmann
eebc72b2bc
Merge pull request #1388 from mtmail/register-shutdown-function
...
register shutdown function to handle out-of-memory errors
2019-06-09 10:20:19 +02:00
rlytleatrel8edto
2f3cf19afa
Ubuntu18-nginx install instructions - fix php-fpm socket path ( #1398 )
...
Ubuntu18-nginx install instructions - fix php-fpm socket path
2019-06-02 17:04:02 +02:00
marc tobias
10fbda702b
exclude postcode ranges separated by colon from centre point calculation
2019-05-25 20:43:38 +02:00
Sarah Hoffmann
17f130550e
Merge pull request #1387 from joto/master
...
Fix some minor issues in docs.
2019-05-23 23:54:29 +02:00
Jochen Topf
251f335fe3
Revert layout changes in list.
2019-05-22 09:25:41 +02:00
marc tobias
ed2fb84e82
register shutdown function to handle out-of-memory errors
2019-05-21 18:41:06 +02:00
Jochen Topf
634684236c
Fix some minor issues in docs.
2019-05-21 13:55:16 +02:00
marc tobias
11e0d9ec14
FAQ entry about managed database services
2019-05-14 19:45:56 +02:00
Sarah Hoffmann
5fd8f5aa27
Merge pull request #1372 from lonvia/raise-postgres-version
...
increase minimum versions for PostgreSQL, Postgis and PHP
2019-05-02 22:56:08 +02:00
Sarah Hoffmann
c05ddb6119
increase minimum versions for PostgreSQL, Postgis and PHP
...
Remove checks and hacks for older versions.
2019-05-02 21:48:40 +02:00
Sarah Hoffmann
ec86a972a2
prepare for 3.3.0 release
2019-05-01 09:38:45 +02:00
Sarah Hoffmann
62da8a34f3
add documentation for new reverse zoom 17
2019-04-30 23:27:04 +02:00
Sarah Hoffmann
6511ec3aa8
Convert importance to float value
...
Fixes #1369 .
2019-04-30 23:21:53 +02:00
Sarah Hoffmann
1707157c4d
fix indent in docs
2019-04-29 23:13:37 +02:00
Sarah Hoffmann
ee49ab84a4
Merge branch 'markdown-syntax-fix-gb-postcodes' of https://github.com/mtmail/Nominatim into mtmail-markdown-syntax-fix-gb-postcodes
2019-04-29 23:12:37 +02:00
marc tobias
b92a55f5fe
Readme for GB postcodes had markdown syntax error
2019-04-28 23:18:36 +02:00
Sarah Hoffmann
7d3b16f24c
Ignore no-fatal errors during dump file restore
...
The owner should never be restored, the table should be owned
by the caller instead. Non-existing indexes and similar only
started to throw a warning with Postgresql 9.4 and later, so
ignore them explicitly there.
2019-04-28 22:44:42 +02:00
Sarah Hoffmann
b612b99421
Merge pull request #1321 from mtmail/interpolating-0-housenumbers
...
Support housenumber=0 in interpolations
2019-04-19 18:29:43 +02:00
Sarah Hoffmann
5a5b3de79a
Merge pull request #1359 from mtmail/fix-export-script
...
utils/export.php broke after switch to PDO DB abstraction
2019-04-17 23:04:51 +02:00
marc tobias
0862e21a1b
utils/export.php broke after switch to PDO DB abstraction
2019-04-17 22:29:50 +02:00
Sarah Hoffmann
c148b768f4
Merge pull request #1358 from mtmail/travis-php-7dot1
...
travis-CI: use PHP 7.1
2019-04-17 22:05:28 +02:00
marc tobias
fab9f684af
travis-CI: use PHP 7.1
2019-04-17 16:05:49 +02:00
Sarah Hoffmann
0af48fe802
exclude all objects without address rank from reverse
...
This was forgotten when looking for a housenumber for
a street point.
Fixes #1319 .
2019-04-16 23:13:27 +02:00
Sarah Hoffmann
a9ae2c7457
add reverse zoom level that includes minor streets
...
Zoom 17 now also resolves service roads and similar.
Fixes #1350 .
2019-04-15 22:43:07 +02:00
Sarah Hoffmann
87c0049e75
isaddress field may be missing in details view
2019-04-14 12:03:37 +02:00
Sarah Hoffmann
e5eb7ecdc1
Merge branch 'observe-bounded-viewbox-in-postcode-search' of https://github.com/mtmail/Nominatim into mtmail-observe-bounded-viewbox-in-postcode-search
2019-04-14 11:29:28 +02:00
Sarah Hoffmann
a7e7823535
Merge pull request #1336 from mtmail/faq-entry-about-buffer-not-owned
...
New FAQ entry about -buffer is not owned by resource owner-
2019-04-14 11:27:36 +02:00
Sarah Hoffmann
33ff96fd83
Merge pull request #1348 from mtmail/checkmodulepresence-to-raise-exception
...
checkModulePresence now raises exception instead of its callers
2019-04-14 11:25:52 +02:00
Sarah Hoffmann
58852b3eeb
Merge pull request #1347 from mtmail/pdo-returns-proper-boolean
...
PDO library returns proper boolean. We dont need string comparison
2019-04-14 11:24:23 +02:00
Sarah Hoffmann
403ee260f6
Ensure that postcode relations are used in addresses
...
Postcode nodes are normally thrown away as they only play
a role for computing artifical postcodes. However, if we
have a postcode area this still should take part of the
address.
Fixes #1330 .
2019-04-14 11:20:03 +02:00
marc tobias
84149f26df
checkModulePresence now raises exception instead of its callers
2019-04-02 18:37:11 +02:00
marc tobias
2ab836c11c
PDO library returns proper boolean. We dont need string comparison
2019-04-02 16:52:37 +02:00
marc tobias
7d9dbd62c7
Support housenumber=0 in interpolations
2019-04-02 15:13:45 +02:00
marc tobias
c9a6350894
On postcode searches observe given bounded viewbox
2019-04-02 14:49:31 +02:00
Sarah Hoffmann
2a4198f94d
add test for issue #1343
...
Keyword details for countries (which don't have address details).
2019-03-26 21:49:44 +01:00
marc tobias
850ab6999c
if nameaddress_vector was {} the database queries failed
2019-03-26 18:03:26 +01:00
marc tobias
2946e81995
New FAQ entry about -buffer is not owned by resource owner-
2019-03-19 01:52:35 +01:00
Sarah Hoffmann
c78a64ec9b
Merge pull request #1334 from mtmail/fix-PDOException-call
...
PDOException call in catch was causing exception itself
2019-03-18 21:26:23 +01:00
marc tobias
61386c5b4d
PDOException call in catch was causing exception itself
2019-03-17 02:47:28 +01:00
Sarah Hoffmann
279eae4b92
Merge pull request #1333 from Arun179/patch-1
...
Rectified a small spelling mistake
2019-03-14 19:06:07 +01:00
Arun Kumar
37f7af56e4
Rectified a small spelling mistake
...
changed "mailinglist" to "mailing list"
2019-03-14 22:53:09 +05:30
Sarah Hoffmann
ec2d491dc8
Merge pull request #1328 from mtmail/php-pdo-with-prepare
...
Nominatim::DB support input variables, custom error messages
2019-03-13 11:10:17 +01:00
marc tobias
890d415e1f
Nominatim::DB support input variables, custom error messages
2019-03-10 16:56:36 +01:00
Sarah Hoffmann
75f951d254
Merge pull request #1318 from mtmail/php-pdo
...
replace database abstraction DB with PDO
2019-03-09 11:27:51 +01:00
marc tobias
d4b633bfc5
replace database abstraction DB with PDO
2019-03-09 00:18:15 +01:00
marc tobias
b20a534e0c
add logEnd to reverse.php, just like search.php
2019-02-27 20:22:50 +01:00
Sarah Hoffmann
64f7b13888
Merge pull request #1315 from mtmail/ui-initialize-switch-to-reverse-link
...
UI: update the switch-to-reverse link after each map click
2019-02-24 17:51:09 +01:00
Sarah Hoffmann
7523359aba
Merge pull request #1314 from mtmail/query-php-5dot4
...
query.php - we no longer support PHP < 5.4
2019-02-24 17:50:09 +01:00
marc tobias
eae9e1cbfa
UI: update the switch-to-reverse link after each map click
2019-02-24 16:34:21 +01:00
marc tobias
178cb98795
query.php - we no longer support PHP < 5.4
2019-02-24 16:22:55 +01:00
Sarah Hoffmann
8f0c628310
downgrade housenumbers without numbers
...
Fixes #1312 .
2019-02-24 14:39:14 +01:00
Sarah Hoffmann
16794a84de
Change accepted features for reverse geocoding at rank 30
...
Always exclude line features (removes railways, tunnels,
piers, historical streets etc.) and boundaries (removes
electoral, historical boundaries etc.)
Fixes #1313 .
2019-02-24 11:00:33 +01:00
Sarah Hoffmann
189da9afb3
add osm_id index for osmline table
...
Needed when deleting address interpolation.
2019-02-21 23:26:31 +01:00
Sarah Hoffmann
af97682cca
add hint that setup.php must be run from build directory
...
Fixes #1307 .
2019-02-13 21:58:59 +01:00
Sarah Hoffmann
bdd64093e5
Merge pull request #1295 from mtmail/move-searchrank-labels-to-php
...
Remove get_addressrank_label. Move get_searchrank_label to PHP
2019-02-10 17:22:49 +01:00
Sarah Hoffmann
1dc5a6e5f8
Merge pull request #1294 from mtmail/behave-support-for-DB-PORT
...
BDD: support for DB_PORT environment variable
2019-02-10 17:20:57 +01:00
Sarah Hoffmann
89a888de76
Merge pull request #1305 from mtmail/travis-ci-ubuntu-16
...
Travis CI Ubuntu 14 => Ubuntu 16
2019-02-10 17:20:06 +01:00
marc tobias
3be797c759
BDD: support for DB_PORT environment variable
2019-02-09 20:54:18 +01:00
marc tobias
ad585771e7
Travis CI Ubuntu 14 => Ubuntu 16
2019-02-09 20:47:35 +01:00
marc tobias
853b536394
Remove get_addressrank_label. Move get_searchrank_label to PHP
2019-02-09 20:38:36 +01:00
Sarah Hoffmann
bfb20aaa47
Merge pull request #1282 from lonvia/remove-self-from-place-addressline
...
Remove self from place addressline
2019-02-09 16:00:46 +01:00
Sarah Hoffmann
cf4dcb12ed
docs: adapt sizes to smaller place_address table
2019-02-09 15:26:10 +01:00
Sarah Hoffmann
3811d916b9
remove self-reference from place-addressline
2019-02-09 15:26:10 +01:00
Sarah Hoffmann
db6d3ba486
Merge pull request #1304 from mtmail/travis-use-composer-instead-of-pear-install
...
pear.php.net offline. Use composer instead of pear install
2019-02-09 15:24:04 +01:00
Sarah Hoffmann
dd5315cbaa
Merge pull request #1303 from mtmail/remove-deprecated-phpunit-config-key
...
remove phpunit config key deprecated since version 3.5
2019-02-09 09:54:34 +01:00
marc tobias
f8ac0ef0b9
pear.php.net offline. Use composer instead of pear install
2019-02-09 02:19:00 +01:00
marc tobias
b56f7e8ad2
remove phpunit config key deprecated since version 3.5
2019-02-09 00:37:11 +01:00
Sarah Hoffmann
57ca1e0cf6
Merge pull request #1296 from mtmail/readme-markdown-syntax-error
...
README: tiny markdown syntax error
2019-01-28 21:19:46 +01:00
marc tobias
d9e0ef0ebf
README: tiny markdown syntax error
2019-01-28 19:42:40 +01:00
Sarah Hoffmann
8237aba840
Do not allow --no-index together with --import-osmosis-all
...
Fixes #1283 .
2019-01-26 15:25:00 +01:00
Sarah Hoffmann
63781c4953
set import_status when indexing only
...
Makes sure that things work as expected when running
`--import-osmosis --no-index` and `--index` separately.
Fixes #1284 .
2019-01-26 15:01:39 +01:00
Sarah Hoffmann
c822012aad
ignore admin boundary ways for countries and states
...
Countries and states are mapped world-wide as relations by now.
Fixes #543 and #1291 .
2019-01-26 13:37:10 +01:00
Sarah Hoffmann
7d192ace6d
Merge pull request #1277 from lonvia/osm2pgsql-import-from-json
...
Osm2pgsql import from json style file
2019-01-10 20:36:20 +01:00
Sarah Hoffmann
58e461e4c7
postcodes also need fallback
2019-01-08 23:46:18 +01:00
Sarah Hoffmann
5dc10bd5a2
add final missing import numbers
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
f9a098743b
update osm2pgsql (custom style)
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
f1fe70656f
more style docs
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
e24ea7c1bb
add tests for import of interpolations
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
8e2e852b89
add postcodes and interpolations to osm2pgsql style
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
4c10294a29
document import style variants
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
31bf7443a6
fix typo
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
e6d18fc948
fixup admin import style and add two new ones
...
Remove unnamed landuses and postcode points from
importing. The latter will cause all objects with
address tags to be imported after all. Not expected
in the admin import style.
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
a90ace7fa1
add documentation for new import style
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
caa8210112
Switch to configurable style for osm2pgsql
...
Includes the full style, which is the same as now (minus
sidwalk exclusion) and a minimal style for boundaries only.
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
1c85edbda9
adapt warm.php to new Result objects
...
Fixes #1276 .
2019-01-08 22:45:21 +01:00
Sarah Hoffmann
72d19cd523
keep country_osm_grid table when dropping update tables
2019-01-08 22:44:33 +01:00
Sarah Hoffmann
cc17aa8d6b
Remove postcodes also from word table when they no longer exist
...
Also adds tests for postcode updates.
Fixes #1273 .
2019-01-04 23:11:47 +01:00
Sarah Hoffmann
181e238b55
Do not log file sizes in the index step on updates
...
Fixes #1274 .
2019-01-04 21:51:18 +01:00
Sarah Hoffmann
7d74bf781c
correctly discard partially matching duplicates
...
The same result may be found with different result ranks
in the same search loop when housenumber or postcode are
part of the name or address. In this case we need to keep
the result with the lower result rank.
Fixes #1264 .
2019-01-03 21:49:50 +01:00
Sarah Hoffmann
a0fde50c08
Merge pull request #1263 from mtmail/add-new-postcodes-to-searchnames
...
when updating GB postcodes, also run SQL getorcreate_postcode_id
2018-12-11 21:39:28 +01:00
marc tobias
8224cc34ea
documentation: when updating GB postcodes, also run SQL getorcreate_postcode_id [SKIP CI]
2018-12-11 21:34:56 +01:00
Sarah Hoffmann
411f361fcb
traverse address list backwards when computing admin levels
...
By starting with the lowest address level, when collecting
administrative boundaries by level, there is a better chance
to actually get the boundary when the capital of the
administrative boundary is tagged with the level of the
boundary as well.
This is just a heuristics adaption to make the best out of
the imprecise admin_level definition for place nodes.
Fixes #1261 .
2018-12-06 21:18:47 +01:00
Sarah Hoffmann
e080bdff0f
Don't escape slashes in json output
...
Fixes #1256 .
2018-12-04 22:28:29 +01:00
Sarah Hoffmann
fae8da2bcb
Merge pull request #1252 from mtmail/update-and-document-gb-postcode-data2
...
GB postcode: new conversion script, documentation
2018-12-04 22:20:55 +01:00
Sarah Hoffmann
2d1337e190
Merge pull request #1255 from mtmail/faq-about-permanent-ids
...
new FAQ entry about place_id values
2018-12-04 22:03:41 +01:00
Sarah Hoffmann
ec4e3c36af
Merge pull request #1258 from lonvia/cleanup-utils
...
Restructure script and website installation
2018-12-04 22:00:31 +01:00
marc tobias
1489e6c00e
Explain place_id, i.e. shouldn't be use as permanent id
2018-12-03 19:05:18 +01:00
Marc Tobias Metten
61769a1bad
GB postcode: new conversion script, documentation
2018-12-03 18:43:28 +01:00
Sarah Hoffmann
56839ba50f
No longer install phrase configuration
...
Instead add it as a configurable path with the one from
the source directory as the default.
Also reinstates that settings/defaults.php is installed as
settings/settings.php.
2018-12-02 11:50:44 +01:00
Sarah Hoffmann
fe6a2e9f14
Remove server_compare from list of installed scripts
...
This is a stand alone script and does not depend on
the configured environment.
2018-12-02 11:21:09 +01:00
Sarah Hoffmann
11c91e3b8d
Remove settings/settings.php
...
This was only a stub to warn when something was
executed directly from utils/ in the source directory.
This is no longer possible.
2018-12-02 11:16:41 +01:00
Sarah Hoffmann
e70f405abd
Restructure script and website installation
...
Just make cmake install a small stub that includes
the settings from the build directory and then the
script from the source directory. Remove executable
rights from php files in utils/ so that they cannot
be accidentally executed.
2018-12-02 11:13:48 +01:00
Sarah Hoffmann
8b8ee00725
remove blocks script
...
Belongs to the rate-limiting code that has been
removed a long time ago.
2018-12-02 10:18:54 +01:00
Sarah Hoffmann
121126cb50
Migration hint for address levels
2018-12-01 23:20:04 +01:00
Sarah Hoffmann
9a13086122
fixup typos and linking of data-source docs
...
Can't create symbolic links to a directory and then
to files within.
2018-12-01 22:40:37 +01:00
Sarah Hoffmann
c68833cd7f
Merge branch 'document-osm-country-grid' of https://github.com/mtmail/Nominatim
2018-12-01 22:20:50 +01:00
Sarah Hoffmann
d4fa528d5c
Merge pull request #1245 from lonvia/address-levels-from-json
...
Make rank assignments configurable
2018-12-01 21:43:53 +01:00
marc tobias
8e19336f49
document what country_osm_grid does
2018-11-29 17:06:04 +01:00
Sarah Hoffmann
52178caa98
fix tests
2018-11-28 23:40:17 +01:00
Sarah Hoffmann
e5cb5d439d
Merge pull request #1251 from mtmail/remove-naturalearth-boundary-fallback
...
remove Natural Earth dataset
2018-11-28 22:29:41 +01:00
Sarah Hoffmann
e28fa6c787
Merge pull request #1253 from RhinoDevel/patch-1
...
Fix typo.
2018-11-28 22:28:16 +01:00
RhinoDevel
313574ce97
Fix typo.
2018-11-28 13:11:06 +01:00
Sarah Hoffmann
96a84294f4
use consistent naming in doc pages
2018-11-27 22:59:18 +01:00
Sarah Hoffmann
7611aa2f65
Move address level config into settings/
2018-11-27 22:32:27 +01:00
Sarah Hoffmann
97fa7e0817
Merge pull request #1250 from mtmail/correct-builddir-variable-in-test-readme
...
test/README.txt: BUILDDIR should be BUILD_DIR [SKIP CI]
2018-11-27 22:27:25 +01:00
marc tobias
417b5b031b
test/README.txt: BUILDDIR should be BUILD_DIR [SKIP CI]
2018-11-27 20:17:27 +01:00
marc tobias
a7e26e8f59
remove Natural Earth dataset
2018-11-27 20:13:33 +01:00
Sarah Hoffmann
7665e5a035
Merge pull request #1247 from mtmail/exit-with-error-code
...
settings.php: when printing error, also exit with error code
2018-11-26 14:53:11 +01:00
marc tobias
c9a553fdb4
settings.php: when printing error, also exit with error code
2018-11-26 14:28:09 +01:00
Sarah Hoffmann
5e072dabc3
remove PHP parameter typing
...
Older PHPs don't seem to like it.
2018-11-24 19:05:13 +01:00
Sarah Hoffmann
e5b7424592
travis: make sure to start with fresh template for DB tests
2018-11-24 16:22:05 +01:00
Sarah Hoffmann
e99dc2a3da
Add function to update address levels
2018-11-24 16:21:16 +01:00
Sarah Hoffmann
211214a8d3
Add documentation for new ranking level configuration
2018-11-24 16:21:16 +01:00
Sarah Hoffmann
e10d11c6c7
Make rank assignments configurable
...
The initial search and address rank is saved in a table
that is set up from a json configuration file. Ranks may
be assigned on a country level according to class and
type of the object. Special handling that depends on the
geometry or OSM type is still hard-coded in placex insert.
The new default config file mimicks the current assignment
as close as possible. A couple of exceptions have been
removed, most notably the exception for Irish townlands.
2018-11-24 16:21:16 +01:00
Sarah Hoffmann
f0088ca2be
Merge pull request #1237 from ckquentvp/fix-accept-language-underscore-parsing
...
match languages such as ja_rm (or any other with underscore) properly
2018-11-24 16:20:00 +01:00
name
3cd3d1f5ae
test languages with underscores (e.g. ja_rm)
2018-11-24 16:52:24 +02:00
Sarah Hoffmann
14cef94e61
fix variable name in setup --drop
2018-11-24 12:29:00 +01:00
Sarah Hoffmann
71ef94dae6
add Makefile for tests
2018-11-24 12:25:28 +01:00
Sarah Hoffmann
fc99954b2e
Merge pull request #1242 from lonvia/import-for-reverse-only
...
Add a reverse-only mode
2018-11-21 21:36:11 +01:00
Sarah Hoffmann
1526501ed7
add documentation for reverse-only
2018-11-21 19:38:39 +01:00
Sarah Hoffmann
5d98c09ee9
Add reverse-only parameter to setup
...
Avoids creating the search_name table. Useful when only /reverse
is used or the content is directly exported to photon.
Fixes #939 .
2018-11-21 19:36:21 +01:00
Sarah Hoffmann
7da5196bac
setup: add convenience function for executing SQL commands
2018-11-21 12:18:13 +01:00
Sarah Hoffmann
7fd40cb0e6
Merge pull request #1238 from lonvia/simplify-version-check
...
Simplify parsing of postgres and postgis versions
2018-11-20 23:07:55 +01:00
Sarah Hoffmann
b6b1c23575
fix phpcs offences
2018-11-20 23:05:56 +01:00
Sarah Hoffmann
409ded385f
simplify connection handling in setup script
...
- factor out runWithEnv
- require explicit connect() call to avoid rechecking for oDB
(more for readability than for speed)
- clean DSNInfo of empty strings and simplify check for entries
2018-11-20 22:51:37 +01:00
Sarah Hoffmann
e2d0c9f3c1
fix variable prefix
2018-11-20 21:07:24 +01:00
Sarah Hoffmann
9cf85f90fb
Simplify parsing of postgres and postgis versions
...
Switch to functions server_version_num and postgis_lib_version
which both only return the version string, so that no elaborate
string parsing is necessary anymore. The version string could
become especially cumbersome in pre-release versions.
2018-11-18 17:27:20 +01:00
Sarah Hoffmann
fb796d14ec
Always ignore continents for addresses
...
Fixes #1236 .
2018-11-18 17:00:59 +01:00
Sarah Hoffmann
43c2eb383e
Remove country and state nodes from address computation
...
OSM has by now almost complete coverage of admin
boundaries up to state level. Place nodes will do more
harm than good in this case.
2018-11-17 23:32:08 +01:00
name
2bc46b8f21
match languages such as ja_rm (or any other with underscore) properly
2018-11-17 20:20:06 +02:00
Sarah Hoffmann
c84648c157
update osm2pgsql (restrict operator)
...
Fixes #1176 .
2018-11-17 17:32:30 +01:00
Sarah Hoffmann
b15441df1c
Document the mmap requirement for flatnode files
...
Fixes #877 .
2018-11-17 15:37:46 +01:00
Sarah Hoffmann
85f32d6c0f
Keep matches without house number
...
Now that we have result ranking, we can keep the street results
for housenumber searches and reuse them in the next group round
if required. Also fixes an issue where postcode and housenumber
are in the query and one of them is wrong.
Fixes #1200 .
2018-11-17 00:35:38 +01:00
Sarah Hoffmann
9908c93d4c
Add result ranking for missing housenumber and postcode
...
Fixes #988 .
2018-11-17 00:00:01 +01:00
Sarah Hoffmann
388c7f706d
Merge pull request #1233 from mtmail/better-gbpostcode-setup-warning
...
Improved warning message when looking for optional GB postcode file
2018-11-15 23:28:04 +01:00
Sarah Hoffmann
36398eedca
docs: more specific chapter title
2018-11-15 23:01:08 +01:00
marc tobias
aa41b813b8
2018 TIGER data conversion scripts, add documentation to /docs/data-sources
2018-11-15 23:01:08 +01:00
Sarah Hoffmann
4e2fe6427c
Merge pull request #1188 from mtmail/prototype-setup-ubuntu18-nginx
...
copy of the Ubuntu18 vagrant setup but with nginx as webserver
2018-11-15 22:25:41 +01:00
Sarah Hoffmann
7f0a0ce5e5
make HTML error message less technical
2018-11-15 21:19:31 +01:00
Sarah Hoffmann
2a39bc6e68
Merge branch 'set-exception-handler-by-request-format' of https://github.com/mtmail/Nominatim into mtmail-set-exception-handler-by-request-format
2018-11-15 20:57:20 +01:00
marc tobias
07c47eed54
Improved warning message when looking for optional GB postcode file
2018-11-09 10:06:17 +00:00
marc tobias
a165072915
copy of the Ubuntu18 vagrant setup but with nginx as webserver
2018-10-31 16:13:02 +01:00
Sarah Hoffmann
c5109d39d0
increase limit when searching for street w/ house number
...
Increase the chance that the correct street is found.
2018-10-20 17:26:45 +02:00
marc tobias
e4a51e460e
set exception handler by request format, not always HTML
2018-10-03 22:58:20 +02:00
Sarah Hoffmann
2467e9996e
fix permissions for CMakeLists.txt
2018-10-02 23:42:33 +02:00
Sarah Hoffmann
3afd12f977
simplify constructor of SetupFunctions
...
Also cleans up spacing.
2018-10-02 23:42:33 +02:00
Sarah Hoffmann
f45b3fa3f2
Merge branch 'updatePHP' of https://github.com/ThomasBarris/Nominatim into ThomasBarris-updatePHP
2018-10-02 22:46:53 +02:00
Sarah Hoffmann
fc6b08c8ab
Merge branch '201809-test-db' of https://github.com/mtmail/Nominatim into mtmail-201809-test-db
2018-10-02 21:41:57 +02:00
Sarah Hoffmann
441cd27a53
Merge pull request #1193 from mtmail/postgresql-10-postgis-scripts
...
also install postgis.control for postgresql-10
2018-09-30 21:14:55 +02:00
marc tobias
c73737f77f
adjust BDD api test cases to 2018 test database
2018-09-28 18:46:35 +02:00
marc tobias
ecd92d5e71
also install postgis.control for postgresql-10
2018-09-27 19:38:56 +02:00
Sarah Hoffmann
d1143b4580
docs: rewrite functions when migrating
...
Fixes #1183 .
2018-09-22 13:22:08 +02:00
Sarah Hoffmann
09595697cc
Merge pull request #1189 from mtmail/classtypes-unit-tests
...
PHP unit tests for Nominatim\ClassTypes
2018-09-22 10:48:32 +02:00
Sarah Hoffmann
1f887a6ca0
Merge pull request #1187 from mtmail/faq-about-pear-db-warning
...
Installation FAQ entry about a PHP warning that started with PHP7.2
2018-09-22 10:47:01 +02:00
Sarah Hoffmann
eba6e46c74
Merge pull request #1186 from mtmail/getAddressDetails-fix
...
fix AddressDetails->getAddressDetails, add tests
2018-09-22 10:46:08 +02:00
marc tobias
f0daf11375
PHP unit tests for Nominatim\ClassTypes
2018-09-20 19:15:58 +02:00
marc tobias
71341a623a
Installation FAQ entry about a PHP warning that started with PHP7.2 [SKIP CI]
2018-09-20 13:41:43 +02:00
marc tobias
e2a7a795d4
fix AddressDetails->getAddressDetails, add tests
2018-09-20 02:16:01 +02:00
Sarah Hoffmann
ed7d7a9ad9
Merge pull request #1185 from mtmail/three-faq-entries
...
three further FAQ entries regarding timezone, continents, exports
2018-09-19 20:24:34 +02:00
marc tobias
9b69bde613
three further FAQ entries regarding timezone, continents, exports
2018-09-19 19:31:54 +02:00
Sarah Hoffmann
119ffbab40
address tokens get a double search rank also as full terms
...
Fixes #1170 .
2018-09-18 21:54:08 +02:00
ThomasBarris
e92b54b869
Merge branch 'updatePHP' of https://github.com/ThomasBarris/Nominatim into updatePHP
2018-09-18 21:29:24 +02:00
ThomasBarris
0273e128f4
change variables for class SetupClass.php instantiation
2018-09-18 21:28:05 +02:00
ThomasBarris
a948050015
typo
2018-09-18 09:17:54 +02:00
ThomasBarris
a0dbeabed1
move setupclass, move command line array, remove args from update array
2018-09-17 10:28:00 +02:00
Mateusz Konieczny
eb615347d2
link CONTRIBUTING file from README file
...
This change should also encourage to read "how to report bugs" guide before reporting bugs
fixes #1133
2018-09-16 20:49:02 +02:00
Sarah Hoffmann
2d4063234a
Merge pull request #1180 from mtmail/php-testsuite-phpunit6-compatible
...
make PHP testsuite work with PHPUnit6
2018-09-16 20:45:41 +02:00
Sarah Hoffmann
4fcb66df92
Merge pull request #1179 from mtmail/import-table-higher-batchsize
...
import_osmosis_log table: increase possible batch size
2018-09-15 18:58:37 +02:00
marc tobias
a9bdac836c
make PHP testsuite work with PHPUnit6
2018-09-15 15:23:10 +02:00
marc tobias
bb696f3fd0
import_osmosis_log table: increase possible batch size
2018-09-15 11:36:46 +02:00
Sarah Hoffmann
bc26244114
docs: remove tablespace placeholder from index commands
...
Fixes #1171 .
2018-09-10 21:00:15 +02:00
ThomasBarris
08c2f03ccc
moving comment to right position
2018-09-08 10:14:08 +02:00
ThomasBarris
9e35e5c2b0
move checkModilePresence to class, delete own debug echo
2018-09-08 09:26:23 +02:00
ThomasBarris
d10f63b666
format change revert, removed bogus CL options, SetupClass to a new dir
2018-09-05 22:01:03 +02:00
ThomasBarris
aa6ac5a751
more format changes for Mr. Travis
2018-08-31 22:01:53 +02:00
ThomasBarris
42e79bfab9
delete an empty line to make the pendantic Mister Travis happy
2018-08-31 21:44:49 +02:00
ThomasBarris
a3b4f80c99
small fixes on setup.php and a bring update.php to work
2018-08-31 21:31:38 +02:00
ThomasBarris
b2f3cfde0b
splitted createTables and changed formatting to please Travis
2018-08-29 22:54:28 +02:00
ThomasBarris
c036480ce2
first draft of setupClass
2018-08-29 21:31:19 +02:00
Ganesh Krishnan
043f9d8298
allow nginx to serve files without php extensions
...
The apache config allows api calls without extension for eg /search?q=query string.
This does not work on nginx and we need to enable this via this patch
2018-08-29 12:59:29 -04:00
ThomasBarris
14aca11dcd
moving functions from setup.php to a lib file in lib/setup_functions.php and change a passthru in setup.php by calling the function with this new lib
2018-08-24 16:15:39 +02:00