Commit Graph

95 Commits

Author SHA1 Message Date
Sarah Hoffmann
933cc8b068 more bigint fixes 2013-03-06 13:57:20 +00:00
Brian Quinion
9320dbfd4b another int => bigint issue in addressline 2013-02-12 23:49:42 +01:00
Brian Quinion
9661159b59 fix some mised INTEGER to BIGINT conversions 2013-02-09 20:33:37 +01:00
Sarah Hoffmann
9c88f32615 delete outdated entries from location_area_country 2013-01-23 23:01:24 +01:00
Sarah Hoffmann
49a3864d2c split partition.sql into table and function parts
Makes it easier to patch partition functions on an already existing
database.
2013-01-23 23:01:13 +01:00
Sarah Hoffmann
491bc8c339 remove country name from address name vector
Country is already covered by the country_name entries in the
word table, so removing the country from the address vector will
not change results but reduce the size of search_name significantly.

Patch in names from OSM into the word table
to make sure we have complete coverage. Note that bad entries
still need to be removed by hand.
2012-10-08 00:05:23 +02:00
Sarah Hoffmann
ee2863200c Merge remote-tracking branch 'lonvia/partial-search-terms' 2012-09-30 09:51:54 +02:00
Sarah Hoffmann
ce1df51d6e remove mountain ranges from addresses 2012-09-29 18:25:22 +02:00
Sarah Hoffmann
199308ca5e skip is_in items already in address vector 2012-09-29 18:02:32 +02:00
Sarah Hoffmann
3337515052 check for empty relation before linking
Empty relations may indeed appear, if the members of a relation
have been deleted but the tags have been retained. That is
detected as accidental error and the old geometry is retained
in placex while the slim tables contain the new version without members.
2012-09-28 22:58:29 +02:00
Sarah Hoffmann
e73e67001e ignore frequent partial search terms
Adds word counts from a full planet to the word table. There is a
new configuration option CONST_Max_Word_Frequency which allows to
take into account the word count: the value that was set on import
is used to determine if a word is added to the search_name table.
The value during runtime determines if a single term should be
used for partial search or simply be ignored.
2012-09-25 00:36:34 +02:00
Sarah Hoffmann
f1063497ef use rank_address for linking places and boundaries
This manages to match up a lot more places and boundaries below city level.
2012-09-24 20:32:43 +02:00
Sarah Hoffmann
2b8a563b52 fix edge cases when linking nodes
edge cases are: missing node in placex, empty name, empty extratags
2012-09-23 18:06:41 +02:00
Brian Quinion
1c75adb39f defered delete should be done even if the place is otherwise blocked 2012-09-03 14:52:49 +01:00
Brian Quinion
afe30880b4 revert attempt to fix house number re-indexing on update, far too slow 2012-08-31 12:21:07 +01:00
Brian Quinion
8eb39d6a6f limit reindexing to buildings / addresses 2012-08-29 11:33:33 +01:00
Brian Quinion
b1bd98f070 mark placex as needed re-indexin based on parent_place_id too 2012-08-28 19:05:01 +01:00
Brian Quinion
53466bb817 linked places not being updated on road modification 2012-08-28 18:41:02 +01:00
Sarah Hoffmann
9ab82a4f1f avoid reassigning address rank of place itself 2012-08-20 23:33:35 +02:00
Sarah Hoffmann
8e004dca44 make sure first of each address rank is used
get_addressdata should not really return duplicates but if there are
the first result will be the best one, so make sure that one is used
2012-08-19 23:08:51 +02:00
Sarah Hoffmann
55b59ea139 import TIGER data into temporary table
Import TIGER data into a temporary table first that later replaces
the current location_property_tiger table. This way index creation
on the table can be delayed until after the import which should
speed up the import and result in significantly smaller indexes.

Also removed index on parent_place_id as it is covered by
idx_location_property_tiger_housenumber_parent_place_id.
2012-08-18 10:30:42 +02:00
Sarah Hoffmann
8ebc673ebf places that cannot be part of an address still should get an address themselves 2012-07-31 08:27:59 +02:00
Sarah Hoffmann
5c3cb8f2f8 don't create index idx_placex_sector twice 2012-07-31 00:42:55 +02:00
Sarah Hoffmann
f5dfd93c5c Merge remote-tracking branch 'lonvia/address-order' 2012-07-21 00:53:53 +02:00
Sarah Hoffmann
21b0bac4e7 adapt distance heuristics for nodes
Include only those nodes that are closer than 1.5 times the distance
of the closest feature of the same address rank.
2012-07-21 00:41:18 +02:00
Sarah Hoffmann
4423592de0 gracefully fail if nodes from an address interpolation are missing 2012-07-13 22:33:09 +02:00
Sarah Hoffmann
afc429fd92 excluded place nodes outside parent boundaries from addresses
Changes slightly the logic which decides if a guessed places
(i.e. a place node) is included in an address: it will be
part of the address only if it is inside the next lower
available boundary. This fixes problematic cases where
neighbouring entities have additional admin levels.
2012-07-03 22:44:06 +02:00
Sarah Hoffmann
8ff0aabaf3 make sure invalid geometries are always deleted from place
This solves a bug with updating large invalid geometries. These
geometries have an entry in place but not in placex. Thus, place_insert
tries to delete the place entry and reinsert it on update. Deletion would
fail because self-intersecting polygons still have an area and large
areas are not deleted.
2012-06-29 22:11:40 +02:00
Sarah Hoffmann
bd529c1f9d be less verbose 2012-06-28 22:09:44 +02:00
Sarah Hoffmann
c433a2d739 remove distinct, causes nearest feature results to be badly reordered 2012-05-24 22:47:34 +02:00
Sarah Hoffmann
1e307392b2 rename ambiguous variables to make postgresql 8.4 happy 2012-05-24 00:25:15 +02:00
Brian Quinion
c36e3d9c7e can't have a unique index on placex - only on place 2012-05-22 20:25:18 +02:00
Brian Quinion
f1e381fdd4 fix broken field name / committed debug 2012-05-22 20:21:58 +02:00
Brian Quinion
77f646410e deal with some indexing edge cases 2012-05-22 19:43:49 +02:00
Brian Quinion
8d221e2c82 DB Scheme changes: alter table placex add column calculated_country_code varchar(2);
function changes:
-----------------
Move to ST_PointOnSurface from ST_Centroid in various places to avoid looking up a point outside the polygon
Move to ST_Covers from ST_Contains to include points on admin boundaries
Re-order preference for get_country_code now our data is better. country_osm_grid is now the preffered source.
Fix code to calculate country code in placex_insert, rank_search test was too early
Add extra field to placex 'calculated_country_code' to improve structure of code
Move split_geometery function out of add_location into its own function
Rewrite split_geometery to be more efficient.
Change place_insert to do more updates and less delete/inserts (delete is slow)
Include wikipedia links in details.php ouput
Cleanup no longer used geometry validation (adding overhead)
Include debug statements in function.sql (--DEBUG: ) and add flag to setup.php to turn them on

setup.php:
----------
add flag --disable-token-precalc to speed up debuging
add flag --index-noanalyse to disable analysising DB at rank 4 and 26 (previously removed, but on my local DB it seems to be required)
add flag --enable-diff-updates (modifier to --create-functions) to turn on the code required for diff updates without having to modify functions.sql
add flag --enable-debug-statements (modifier to --create-functions) to turn on debug warning statements

update.php:
-----------
added flag --no-index to import osmosis changes without indexing them
extend the hack to allow import of JOSM generated osm files

country_grid.sql - reference copy of the sql used to generate the country_osm_grid table, needs cleanup
2012-05-22 16:27:42 +02:00
Brian Quinion
f17c5345ec Merge branch 'master' of github.com:twain47/Nominatim 2012-05-15 03:06:12 +02:00
Sarah Hoffmann
7c4b68d2ea move index over nameaddress_vector back to delayed index creation
No longer needed for linking places.
2012-05-13 11:38:50 +02:00
Sarah Hoffmann
c32fa2172d pre-create word list to avoid duplicates due to parallel indexing 2012-05-13 09:15:56 +02:00
Brian Quinion
0ab9c90708 Can't filter on rank_search before it has been assigned 2012-05-11 19:23:44 +02:00
Brian Quinion
b9a3e52a67 updated wikipedia article code to allow for mutliple languages and remove code duplication 2012-05-07 00:18:31 +01:00
Sarah Hoffmann
cc43bedd21 modifiers to encourage use of indices 2012-05-05 11:38:26 +02:00
Brian Quinion
ee0afe8c64 catch utf8 encoding errors and at least stop them aborting processing 2012-05-04 00:58:26 +01:00
Brian Quinion
7164fd310d Merge branch 'master' of github.com:twain47/Nominatim 2012-04-30 01:05:13 +01:00
Brian Quinion
1c0fa81d88 calculate importance from wikipedia 2012-04-30 01:05:06 +01:00
Brian Quinion
709ab1bb03 more name checks in point and poly mergeing, and put the index creation earlier in the process 2012-04-29 16:40:44 +01:00
Sarah Hoffmann
ec9a4ac61b make it run with 64bit and 32bit osm2pgsql
Needs tweaking on the osm2pgsql side, too: the osmid column
needs to have the same format as in osm2pgsql. That means
that the changes are still not compatible with existing installations.
2012-04-26 21:11:51 +02:00
Sarah Hoffmann
cb01226f29 change code to work with a 64-bit node size osm2pgsql
This breaks the 32-bit node size version.
2012-04-26 21:11:51 +02:00
Brian Quinion
210a899fc9 depreciate place=region due to common miss-use 2012-04-26 13:11:56 +01:00
Brian Quinion
f55e3c1ef8 link nodes and relations using name->'name' index lookup instead of search_name 2012-04-26 13:01:26 +01:00
Sarah Hoffmann
7b430bc731 Merge branch 'continent' of https://github.com/datendelphin/Nominatim 2012-04-20 23:19:52 +02:00