Commit Graph

2140 Commits

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