]> git.openstreetmap.org Git - nominatim.git/log
nominatim.git
22 months agoport legacy tokenizer to new postcode handling
Sarah Hoffmann [Wed, 8 Jun 2022 06:19:55 +0000 (08:19 +0200)]
port legacy tokenizer to new postcode handling

Also documents the changes to the SQL functions of the tokenizer.

22 months agofix postcode pattern for Mozambique
Sarah Hoffmann [Wed, 8 Jun 2022 05:42:35 +0000 (07:42 +0200)]
fix postcode pattern for Mozambique

Optional groups are not implemented yet.

22 months agoadd tests for discarding bad postcodes
Sarah Hoffmann [Wed, 8 Jun 2022 05:24:53 +0000 (07:24 +0200)]
add tests for discarding bad postcodes

22 months agofix liniting problems
Sarah Hoffmann [Wed, 8 Jun 2022 04:33:11 +0000 (06:33 +0200)]
fix liniting problems

22 months agocache postcode normalization
Sarah Hoffmann [Tue, 7 Jun 2022 10:08:22 +0000 (12:08 +0200)]
cache postcode normalization

22 months agoonly add well-formatted postcodes to location table
Sarah Hoffmann [Mon, 6 Jun 2022 21:44:51 +0000 (23:44 +0200)]
only add well-formatted postcodes to location table

22 months agomove postcode matcher in a separate file
Sarah Hoffmann [Mon, 6 Jun 2022 21:37:04 +0000 (23:37 +0200)]
move postcode matcher in a separate file

22 months agomove postcode centroid computation to Python
Sarah Hoffmann [Mon, 6 Jun 2022 08:46:48 +0000 (10:46 +0200)]
move postcode centroid computation to Python

22 months agoadd class for online centroid computation
Sarah Hoffmann [Mon, 6 Jun 2022 07:49:00 +0000 (09:49 +0200)]
add class for online centroid computation

22 months agoicu: switch postcodes to using the pre-formatted one
Sarah Hoffmann [Fri, 3 Jun 2022 15:12:01 +0000 (17:12 +0200)]
icu: switch postcodes to using the pre-formatted one

22 months agointroduce and use analyzer for postcodes
Sarah Hoffmann [Tue, 24 May 2022 19:45:06 +0000 (21:45 +0200)]
introduce and use analyzer for postcodes

22 months agopostcodes: introduce a default pattern for countries without postcodes
Sarah Hoffmann [Tue, 24 May 2022 16:25:37 +0000 (18:25 +0200)]
postcodes: introduce a default pattern for countries without postcodes

22 months agopostcode: generate a generic form
Sarah Hoffmann [Tue, 24 May 2022 15:11:40 +0000 (17:11 +0200)]
postcode: generate a generic form

22 months agoadd postcodes for most of the remaining countries
Sarah Hoffmann [Mon, 23 May 2022 14:11:16 +0000 (16:11 +0200)]
add postcodes for most of the remaining countries

Now includes all postcodes that have optional parts.

22 months agopostcodes: add support for optional spaces
Sarah Hoffmann [Mon, 23 May 2022 12:04:22 +0000 (14:04 +0200)]
postcodes: add support for optional spaces

22 months agoadd postcode formats with optional country code
Sarah Hoffmann [Mon, 23 May 2022 09:10:35 +0000 (11:10 +0200)]
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.

22 months agopostcodes: strip leading country codes
Sarah Hoffmann [Mon, 23 May 2022 09:01:57 +0000 (11:01 +0200)]
postcodes: strip leading country codes

22 months agoadd postcodes patterns without optional spaces
Sarah Hoffmann [Thu, 19 May 2022 14:26:51 +0000 (16:26 +0200)]
add postcodes patterns without optional spaces

22 months agoinitial postcode cleaner for simple patterns
Sarah Hoffmann [Thu, 19 May 2022 13:49:36 +0000 (15:49 +0200)]
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.

22 months agoadd postcode patterns for numeric postcodes
Sarah Hoffmann [Thu, 19 May 2022 10:03:26 +0000 (12:03 +0200)]
add postcode patterns for numeric postcodes

Adds patterns for countries that have simple numeric-only postcodes.

22 months agoremove postcodes from countries that don't have them
Sarah Hoffmann [Thu, 12 May 2022 09:43:47 +0000 (11:43 +0200)]
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.

22 months agoadd info about countries without a postcode
Sarah Hoffmann [Wed, 11 May 2022 15:23:28 +0000 (17:23 +0200)]
add info about countries without a postcode

22 months agoavoid near searches in very large areas
Sarah Hoffmann [Thu, 23 Jun 2022 20:06:48 +0000 (22:06 +0200)]
avoid near searches in very large areas

At some point the contains call becomes too expensive.

22 months agoMerge pull request #2755 from Luflosi/fix-typo
Sarah Hoffmann [Mon, 20 Jun 2022 20:23:36 +0000 (22:23 +0200)]
Merge pull request #2755 from Luflosi/fix-typo

Fix typo

22 months agoFix typo
Luflosi [Mon, 20 Jun 2022 18:41:00 +0000 (20:41 +0200)]
Fix typo

22 months agoMerge pull request #2751 from mtmail/issue-2750
Sarah Hoffmann [Mon, 20 Jun 2022 08:21:06 +0000 (10:21 +0200)]
Merge pull request #2751 from mtmail/issue-2750

Documentation fix: should be "nominatim refresh"

22 months agoDocumentation fix: should be "nominatim refresh"
marc tobias [Mon, 20 Jun 2022 00:32:23 +0000 (02:32 +0200)]
Documentation fix: should be "nominatim refresh"

22 months agoMerge pull request #2746 from bgo-eiu/patch-2
Sarah Hoffmann [Sat, 18 Jun 2022 07:40:47 +0000 (09:40 +0200)]
Merge pull request #2746 from bgo-eiu/patch-2

Added additional languages for Pakistan in country settings

22 months agoMerge pull request #2749 from stefkiourk/patch-1
Sarah Hoffmann [Fri, 17 Jun 2022 20:11:55 +0000 (22:11 +0200)]
Merge pull request #2749 from stefkiourk/patch-1

Typos and syntax on Reverse.md

22 months agoTypos and syntax on Reverse.md
Stef Ki [Fri, 17 Jun 2022 19:01:38 +0000 (21:01 +0200)]
Typos and syntax on Reverse.md

22 months agoMerge pull request #2748 from lonvia/bdd-grid-origin
Sarah Hoffmann [Fri, 17 Jun 2022 13:25:29 +0000 (15:25 +0200)]
Merge pull request #2748 from lonvia/bdd-grid-origin

BDD tests: remove support for scenes

22 months agobdd: remove support for scenes
Sarah Hoffmann [Fri, 17 Jun 2022 08:06:56 +0000 (10:06 +0200)]
bdd: remove support for scenes

Only keep support for the special point geometry 'country:xx'.

22 months agobdd: move query tests from scene to grid description
Sarah Hoffmann [Thu, 16 Jun 2022 20:08:30 +0000 (22:08 +0200)]
bdd: move query tests from scene to grid description

22 months agobdd: remove step for scene setup
Sarah Hoffmann [Thu, 16 Jun 2022 19:59:35 +0000 (21:59 +0200)]
bdd: remove step for scene setup

22 months agobdd: move update tests from scenes to grid descriptions
Sarah Hoffmann [Thu, 16 Jun 2022 19:56:39 +0000 (21:56 +0200)]
bdd: move update tests from scenes to grid descriptions

22 months agobdd: move import tests from scenes to grid descriptions
Sarah Hoffmann [Wed, 15 Jun 2022 20:22:13 +0000 (22:22 +0200)]
bdd: move import tests from scenes to grid descriptions

22 months agobdd: clear lof buffer after a successful import run
Sarah Hoffmann [Mon, 13 Jun 2022 09:49:38 +0000 (11:49 +0200)]
bdd: clear lof buffer after a successful import run

22 months agobdd: allow to set an origin of the grid
Sarah Hoffmann [Mon, 13 Jun 2022 07:44:37 +0000 (09:44 +0200)]
bdd: allow to set an origin of the grid

22 months agoMerge pull request #2745 from lonvia/city-in-city-fix
Sarah Hoffmann [Thu, 16 Jun 2022 13:36:39 +0000 (15:36 +0200)]
Merge pull request #2745 from lonvia/city-in-city-fix

Improve hierarchy computation for place areas

22 months agoadded additional languages for pakistan in country settings
bgo-eiu [Thu, 16 Jun 2022 10:26:44 +0000 (06:26 -0400)]
added additional languages for pakistan in country settings

22 months agouse default ranks when reorganising rank_address
Sarah Hoffmann [Thu, 16 Jun 2022 09:20:23 +0000 (11:20 +0200)]
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.

22 months agoimprove address ordering with mixes of place and admin areas
Sarah Hoffmann [Thu, 16 Jun 2022 08:44:16 +0000 (10:44 +0200)]
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.

23 months agoMerge pull request #2737 from lonvia/reset-linking-ranks
Sarah Hoffmann [Mon, 6 Jun 2022 07:29:32 +0000 (09:29 +0200)]
Merge pull request #2737 from lonvia/reset-linking-ranks

Fix rank inheritance from linked places

23 months agoadd testcase for #2551
Sarah Hoffmann [Sun, 5 Jun 2022 19:39:17 +0000 (21:39 +0200)]
add testcase for #2551

This test proves that places that are linked need to be reindexed.

23 months agofix rank inheritance from linked places
Sarah Hoffmann [Sun, 5 Jun 2022 17:38:14 +0000 (19:38 +0200)]
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.

23 months agoMerge pull request #2736 from lonvia/reverse-interpolation-index-order
Sarah Hoffmann [Fri, 3 Jun 2022 08:42:54 +0000 (10:42 +0200)]
Merge pull request #2736 from lonvia/reverse-interpolation-index-order

Change indexing order for interpolations and non-addressable objects

23 months agochange indexing order for interpolations
Sarah Hoffmann [Tue, 31 May 2022 12:16:06 +0000 (14:16 +0200)]
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.

23 months agoMerge pull request #2735 from lonvia/geocodejson-type-reverse
Sarah Hoffmann [Wed, 1 Jun 2022 20:14:06 +0000 (22:14 +0200)]
Merge pull request #2735 from lonvia/geocodejson-type-reverse

Also fix type output in geocodejson for reverse

23 months agouse getattr() instead of __getattr__
Sarah Hoffmann [Wed, 1 Jun 2022 19:26:13 +0000 (21:26 +0200)]
use getattr() instead of __getattr__

Makes the linter happy.

23 months agoalso fix type output in geocodejson for reverse
Sarah Hoffmann [Tue, 24 May 2022 08:57:45 +0000 (10:57 +0200)]
also fix type output in geocodejson for reverse

23 months agoMerge pull request #2732 from lonvia/fix-ordering-address-parts
Sarah Hoffmann [Tue, 31 May 2022 18:26:05 +0000 (20:26 +0200)]
Merge pull request #2732 from lonvia/fix-ordering-address-parts

Fix order when searching for addr:* components

23 months agoMerge pull request #2731 from lonvia/cleanup-special-phrases
Sarah Hoffmann [Tue, 31 May 2022 15:13:56 +0000 (17:13 +0200)]
Merge pull request #2731 from lonvia/cleanup-special-phrases

Minor code reorganisation around special phrase parsing

23 months agoMerge pull request #2730 from lonvia/exclude-inclusion-tag
Sarah Hoffmann [Tue, 31 May 2022 15:13:37 +0000 (17:13 +0200)]
Merge pull request #2730 from lonvia/exclude-inclusion-tag

Exclude addr:inclusion from search

23 months agofix order when searching for addr:* components
Sarah Hoffmann [Tue, 31 May 2022 14:57:37 +0000 (16:57 +0200)]
fix order when searching for addr:* components

When matching addr:* components the preference was given to
matches that do not intersect with the place.

23 months agoexclude addr:inclusion from search
Sarah Hoffmann [Tue, 31 May 2022 09:23:42 +0000 (11:23 +0200)]
exclude addr:inclusion from search

23 months agoCI: always use the latest version of pylint
Sarah Hoffmann [Tue, 31 May 2022 07:12:26 +0000 (09:12 +0200)]
CI: always use the latest version of pylint

This makes it easier to reproduce issues locally.

23 months agocustom comparison for SpecialPhrase
Sarah Hoffmann [Mon, 30 May 2022 14:30:41 +0000 (16:30 +0200)]
custom comparison for SpecialPhrase

Duplicate elemination only works when a custom hash/equal function
is implemented that is based on the members.

23 months agomove quoting hack to wiki loader
Sarah Hoffmann [Mon, 30 May 2022 12:32:36 +0000 (14:32 +0200)]
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.

23 months agoconvert special phrase loaders to generators
Sarah Hoffmann [Mon, 30 May 2022 12:12:46 +0000 (14:12 +0200)]
convert special phrase loaders to generators

Generators simplify the code quite a bit compared to the previous
Iterator approach.

23 months agoremove the language parameter in the SPWikiLoader
Sarah Hoffmann [Sun, 29 May 2022 12:06:05 +0000 (14:06 +0200)]
remove the language parameter in the SPWikiLoader

Languages must always be configured through config or environment.
Also use monkeypatched environment in tests.

23 months agoadd get_str_list() for config
Sarah Hoffmann [Sun, 29 May 2022 11:53:50 +0000 (13:53 +0200)]
add get_str_list() for config

Converts a config value written as a comma-sparated list into
a Python list of strings.

23 months agoMerge pull request #2728 from lonvia/allow-more-partials
Sarah Hoffmann [Fri, 27 May 2022 16:09:11 +0000 (18:09 +0200)]
Merge pull request #2728 from lonvia/allow-more-partials

Allow search for partials consisting of 3 or more words

23 months agoallow search for partials consisting of 3 or more words
Sarah Hoffmann [Fri, 27 May 2022 14:49:14 +0000 (16:49 +0200)]
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.

23 months agoMerge pull request #2715 from otbutz/patch-2
Sarah Hoffmann [Tue, 24 May 2022 12:40:28 +0000 (14:40 +0200)]
Merge pull request #2715 from otbutz/patch-2

Simplify apache rewrite rules

23 months agoChange to regular regex group
otbutz [Tue, 24 May 2022 09:32:59 +0000 (11:32 +0200)]
Change to regular regex group

23 months agoMerge pull request #2718 from nslxndr/fix-log-endtime
Sarah Hoffmann [Mon, 23 May 2022 14:25:41 +0000 (16:25 +0200)]
Merge pull request #2718 from nslxndr/fix-log-endtime

Undefined offset in error log

23 months agoMerge pull request #2722 from lonvia/fix-relinking-on-updates
Sarah Hoffmann [Mon, 23 May 2022 09:36:20 +0000 (11:36 +0200)]
Merge pull request #2722 from lonvia/fix-relinking-on-updates

Fix bug with keeping linking on updates

23 months agofix bug with keeping linking on updates
Sarah Hoffmann [Mon, 23 May 2022 08:11:28 +0000 (10:11 +0200)]
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.

23 months agocorrect end time computation
Sandor Nagy [Mon, 9 May 2022 20:00:36 +0000 (22:00 +0200)]
correct end time computation

23 months agoSimplify apache rewrite rules
otbutz [Fri, 20 May 2022 08:15:28 +0000 (10:15 +0200)]
Simplify apache rewrite rules

23 months agoMerge pull request #2713 from lonvia/remove-county-nodes-in-canada
Sarah Hoffmann [Thu, 19 May 2022 08:21:09 +0000 (10:21 +0200)]
Merge pull request #2713 from lonvia/remove-county-nodes-in-canada

Remove county nodes in Canada from addresses

23 months agoremove county nodes in Canada from addresses
Sarah Hoffmann [Wed, 18 May 2022 08:19:05 +0000 (10:19 +0200)]
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.

23 months agoMerge pull request #2710 from lonvia/offline-import-mode
Sarah Hoffmann [Thu, 12 May 2022 09:08:29 +0000 (11:08 +0200)]
Merge pull request #2710 from lonvia/offline-import-mode

Assorted performance improvements for BDD tests

2 years agobdd: restrict imports to four languages
Sarah Hoffmann [Wed, 11 May 2022 14:40:53 +0000 (16:40 +0200)]
bdd: restrict imports to four languages

This mainly restricts the number of country names that are loaded.

2 years agoMerge pull request #2709 from lonvia/less-strict-country-assignment
Sarah Hoffmann [Wed, 11 May 2022 14:24:47 +0000 (16:24 +0200)]
Merge pull request #2709 from lonvia/less-strict-country-assignment

Be more strict with country assignments

2 years agobdd: recreate functions on template DB
Sarah Hoffmann [Wed, 11 May 2022 13:50:22 +0000 (15:50 +0200)]
bdd: recreate functions on template DB

Avoids calling function refresh on every scenario. The content won't
change between runs.

2 years agoavoid calling OSM servers during bdd tests
Sarah Hoffmann [Wed, 11 May 2022 13:33:01 +0000 (15:33 +0200)]
avoid calling OSM servers during bdd tests

2 years agoadd offline import mode
Sarah Hoffmann [Wed, 11 May 2022 13:03:02 +0000 (15:03 +0200)]
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.

2 years agoMerge pull request #2708 from lonvia/use-format-literals
Sarah Hoffmann [Wed, 11 May 2022 12:29:56 +0000 (14:29 +0200)]
Merge pull request #2708 from lonvia/use-format-literals

Assorted fixes for new pylint warnings

2 years agono longer allow fuzzy assignment of country
Sarah Hoffmann [Wed, 11 May 2022 09:54:25 +0000 (11:54 +0200)]
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.

2 years agofix spacing
Sarah Hoffmann [Wed, 11 May 2022 08:36:09 +0000 (10:36 +0200)]
fix spacing

Some versions of pylint are oddly picky.

2 years agopylint: disable no-self-use check
Sarah Hoffmann [Wed, 11 May 2022 08:25:00 +0000 (10:25 +0200)]
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.

2 years agosolve assorted issue with newer pylint versions
Sarah Hoffmann [Wed, 11 May 2022 08:22:14 +0000 (10:22 +0200)]
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.

2 years agouse context management when processing Tiger data
Sarah Hoffmann [Wed, 11 May 2022 07:45:15 +0000 (09:45 +0200)]
use context management when processing Tiger data

2 years agoremove redundant 'u' prefixes for unicode strings
Sarah Hoffmann [Wed, 11 May 2022 07:06:32 +0000 (09:06 +0200)]
remove redundant 'u' prefixes for unicode strings

2 years agopylint: avoid explicit use of format() function
Sarah Hoffmann [Wed, 11 May 2022 06:59:28 +0000 (08:59 +0200)]
pylint: avoid explicit use of format() function

Use psycopg2 SQL formatters for SQL and formatted string literals
everywhere else.

2 years agoadd a function to return a formatted version
Sarah Hoffmann [Tue, 10 May 2022 21:00:18 +0000 (23:00 +0200)]
add a function to return a formatted version

Replaces the various repeated format strings throughout the code.

2 years agoMerge pull request #2707 from lonvia/make-icu-tokenizer-the-default
Sarah Hoffmann [Wed, 11 May 2022 06:52:49 +0000 (08:52 +0200)]
Merge pull request #2707 from lonvia/make-icu-tokenizer-the-default

Make ICU tokenizer the default

2 years agono longer need postgresql-server-dev packages
Sarah Hoffmann [Tue, 10 May 2022 15:34:58 +0000 (17:34 +0200)]
no longer need postgresql-server-dev packages

2 years agomake legacy tokenizer tests the extra on CI
Sarah Hoffmann [Tue, 10 May 2022 13:52:15 +0000 (15:52 +0200)]
make legacy tokenizer tests the extra on CI

2 years agoMerge pull request #2704 from mtmail/migrate-phpunit-xml-schema
Sarah Hoffmann [Tue, 10 May 2022 15:44:34 +0000 (17:44 +0200)]
Merge pull request #2704 from mtmail/migrate-phpunit-xml-schema

PHPUnit 9 changed configuration schema slightly

2 years agoalways state encoding when opening files in text mode
Sarah Hoffmann [Tue, 10 May 2022 13:36:29 +0000 (15:36 +0200)]
always state encoding when opening files in text mode

Also applies to Path.write_text().

2 years agoPHPUnit 9 changed configuration schema slightly
Marc Tobias [Tue, 10 May 2022 13:18:02 +0000 (15:18 +0200)]
PHPUnit 9 changed configuration schema slightly

2 years agoswitch tests to ICU tokenizer as default
Sarah Hoffmann [Tue, 10 May 2022 12:54:50 +0000 (14:54 +0200)]
switch tests to ICU tokenizer as default

2 years agoadd migration hint for the new tokenizer default
Sarah Hoffmann [Tue, 10 May 2022 10:07:21 +0000 (12:07 +0200)]
add migration hint for the new tokenizer default

2 years agomake ICU the default tokenizer
Sarah Hoffmann [Tue, 10 May 2022 10:02:50 +0000 (12:02 +0200)]
make ICU the default tokenizer

2 years agoMerge pull request #2702 from lonvia/move-country-names-into-includes
Sarah Hoffmann [Tue, 10 May 2022 07:21:16 +0000 (09:21 +0200)]
Merge pull request #2702 from lonvia/move-country-names-into-includes

Clean up country name settings

2 years agoMerge pull request #2695 from mtmail/git-commit-hash-to-version
Sarah Hoffmann [Tue, 10 May 2022 07:14:15 +0000 (09:14 +0200)]
Merge pull request #2695 from mtmail/git-commit-hash-to-version

add git commit hash to 'nominatim --version' output

2 years agoadd git commit hash to --version output
Marc Tobias [Wed, 4 May 2022 13:48:23 +0000 (15:48 +0200)]
add git commit hash to --version output

2 years agosupport arbitrary prefixes in country name list
Sarah Hoffmann [Thu, 5 May 2022 15:16:15 +0000 (17:16 +0200)]
support arbitrary prefixes in country name list

This means we can now get rid of the last special cases for names.