Commit Graph

57 Commits

Author SHA1 Message Date
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
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
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
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
Sarah Hoffmann
6522e531e4 add support for Irish townlands
To work properly, osm2pgsql needs to be updated to the latest version.
2012-04-20 22:13:03 +02:00
Datendelphin
5e6a9638a8 only calculate country for search ranks country and below 2012-04-20 16:17:13 +02:00
Sarah Hoffmann
5f036d9923 ignore postcode boundaries without postcode 2012-04-14 09:27:10 +02:00
Sarah Hoffmann
1a9f05fd3f missing brackets in default name assignment 2012-04-14 08:56:07 +02:00
Datendelphin
6aa42cb36a ranking for mountain_pass 2012-04-06 18:34:45 +02:00
Brian Quinion
e62e75f1a7 Only link polygons on admin_centre is not already found a label AND if exactl search_rank match 2012-04-02 12:48:51 +01:00
Brian Quinion
bfe5119742 Update details.php to show linked places 2012-04-01 02:38:40 +01:00
Brian Quinion
c8c8471e73 Merge branch 'master' of github.com:twain47/Nominatim 2012-04-01 01:48:45 +01:00
Brian Quinion
041b3edf89 Adds code to merge place polygon and points using:
label relation member
  admin_center, admin_centre relation member (with same name)
  exact name, search_rank and location match

Adding this requires a new column and index:
  SELECT AddGeometryColumn('placex', 'centroid', 4326, 'GEOMETRY', 2);
  CREATE INDEX idx_placex_linked_place_id ON placex USING BTREE (linked_place_id);
2012-04-01 01:40:50 +01:00
Sarah Hoffmann
7391e00bc3 postgresq 8.4 backward compatibility: count hash size with akeys instead of hash_to_array 2012-03-30 00:52:08 +02:00
Sarah Hoffmann
9d1845a338 don't use column names for variable names, 8.4 fails on them 2012-03-29 23:48:29 +02:00
Brian Quinion
80cf5df1cd Merge branch 'master' of github.com:twain47/Nominatim 2012-03-26 23:57:24 +01:00
Brian Quinion
b99a043c78 Use GB postcode table as definitive source. resort by pressence of search word in output address and other misc very minor changes not commited from MQ servers 2012-03-22 00:34:56 +00:00
Sarah Hoffmann
57ef20cc7c only re-index addressable places
exclude places from hierarchical updates when they are only addressed
through their parent and do not have a name (thus no entry in search
name)
2012-03-18 16:15:45 +01:00
Sarah Hoffmann
84ca84982d remove array_agg
shipped with postgresql in all supported versions
2012-03-18 16:12:41 +01:00
Sarah Hoffmann
1fa9441113 sanity check for address interpolation 2012-03-10 00:08:06 +01:00
Sarah Hoffmann
e8b43eeaad avoid deletes for new places 2012-03-10 00:06:28 +01:00
Sarah Hoffmann
44f5058deb restrict deferred delete to concerned place
Deleting by osm_type/osm_id goes wrong if the place was reimported
because of a change in geometry, admin_level etc. The newly created
place is deleted as well in this case.
2012-03-09 23:47:25 +01:00
Sarah Hoffmann
01f4723b7b update classtype tables for special phrases along with the places 2012-02-19 10:33:21 +00:00
Sarah Hoffmann
b07185c934 move place=isolated_dwelling up to the same rank as place=locality 2012-02-12 10:12:51 +00:00
Sarah Hoffmann
cc564e2f31 - remove dependency on intarray extension
- new config options for postgresql version and 
  location of osm2pgsql and osmosis binaries
- new option --no-npi for update.php that supresses writing of NPIs in
  osmosis update mode
- add more GRANTs for www-data
2012-01-21 10:21:42 +00:00
Brian Quinion
4d16677d2e update place_id to BIGINT 2011-06-14 13:42:46 +00:00
Brian Quinion
2148d81474 calculate search position based to 'importance' rather than address rank 2011-03-18 09:52:16 +00:00
Brian Quinion
cc6b90b490 drop requirement for zero distance record for each place_addressline, add import_npi_log for import logging 2011-03-11 14:03:18 +00:00
Brian Quinion
c71cb63f38 stop treating capital cities as villages, memory leak on deadlock 2011-02-08 12:09:11 +00:00
Brian Quinion
3ea1b35b32 add logging of broken polygons, improve address export, better diff output in export, bug in address calculation(#3522), reaply #3520, lost in migration 2011-02-07 11:13:18 +00:00
Brian Quinion
31273a42bd aux properties, memory leaks, tweaks to search order 2011-01-21 10:40:44 +00:00
Brian Quinion
2be00f37c1 finally fix adminitrative spelling error, disable fast_update on indexes by default (performance), fixes for incremental updates on new codebase 2011-01-05 14:07:26 +00:00
Brian Quinion
631e8d09ab postcode/zipcode improvements, finish work on handling extratags 2010-12-07 13:41:02 +00:00
Brian Quinion
f5ca016e98 make rank_search consistent 2010-11-18 14:59:39 +00:00
Brian Quinion
a6453a808d remove the road buffer code - made things slower. Plus some more tiger import code 2010-11-17 15:19:25 +00:00