Sarah Hoffmann [Tue, 22 Sep 2020 13:51:04 +0000 (15:51 +0200)]
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.
Sarah Hoffmann [Wed, 23 Sep 2020 15:33:42 +0000 (17:33 +0200)]
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.
Sarah Hoffmann [Wed, 23 Sep 2020 09:55:18 +0000 (11:55 +0200)]
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.
Sarah Hoffmann [Tue, 22 Sep 2020 11:27:05 +0000 (13:27 +0200)]
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.
Sarah Hoffmann [Thu, 3 Sep 2020 19:42:00 +0000 (21:42 +0200)]
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.
Sarah Hoffmann [Thu, 3 Sep 2020 08:38:33 +0000 (10:38 +0200)]
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.
Sarah Hoffmann [Sat, 19 Sep 2020 15:23:40 +0000 (17:23 +0200)]
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.
Sarah Hoffmann [Fri, 18 Sep 2020 13:09:35 +0000 (15:09 +0200)]
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.
Sarah Hoffmann [Fri, 18 Sep 2020 09:08:47 +0000 (11:08 +0200)]
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.
Sarah Hoffmann [Thu, 17 Sep 2020 16:17:01 +0000 (18:17 +0200)]
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.
Sarah Hoffmann [Thu, 17 Sep 2020 15:11:22 +0000 (17:11 +0200)]
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.
Sarah Hoffmann [Thu, 17 Sep 2020 07:54:46 +0000 (09:54 +0200)]
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.
Sarah Hoffmann [Wed, 16 Sep 2020 09:19:38 +0000 (11:19 +0200)]
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.
Sarah Hoffmann [Wed, 16 Sep 2020 09:15:55 +0000 (11:15 +0200)]
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.
Sarah Hoffmann [Tue, 1 Sep 2020 16:00:40 +0000 (18:00 +0200)]
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.
Sarah Hoffmann [Tue, 1 Sep 2020 15:55:40 +0000 (17:55 +0200)]
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.
Sarah Hoffmann [Thu, 27 Aug 2020 07:33:21 +0000 (09:33 +0200)]
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.
Sarah Hoffmann [Wed, 26 Aug 2020 15:42:43 +0000 (17:42 +0200)]
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.
Sarah Hoffmann [Wed, 26 Aug 2020 10:12:52 +0000 (12:12 +0200)]
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.
Sarah Hoffmann [Thu, 20 Aug 2020 14:37:33 +0000 (16:37 +0200)]
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%.
Sarah Hoffmann [Wed, 19 Aug 2020 09:37:21 +0000 (11:37 +0200)]
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.
Sarah Hoffmann [Tue, 18 Aug 2020 14:58:58 +0000 (16:58 +0200)]
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.
Sarah Hoffmann [Sat, 15 Aug 2020 20:37:45 +0000 (22:37 +0200)]
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.
Sarah Hoffmann [Thu, 13 Aug 2020 14:59:11 +0000 (16:59 +0200)]
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.
Sarah Hoffmann [Thu, 6 Aug 2020 07:20:42 +0000 (09:20 +0200)]
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.
Sarah Hoffmann [Thu, 6 Aug 2020 14:15:17 +0000 (16:15 +0200)]
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.