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.
Sarah Hoffmann [Thu, 30 Jul 2020 21:39:55 +0000 (23:39 +0200)]
make house number reappear in display name on named POIs
After 6cc6cf950c3c08103e6159a079c85b5a4f1c09fa 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.
Sarah Hoffmann [Tue, 28 Jul 2020 20:15:25 +0000 (22:15 +0200)]
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.
Sarah Hoffmann [Sun, 26 Jul 2020 09:56:00 +0000 (11:56 +0200)]
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.