Commit Graph

2792 Commits

Author SHA1 Message Date
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