Commit Graph

190 Commits

Author SHA1 Message Date
Sarah Hoffmann
5581bb67f8 respect --osm2pgsql-cache setting
fixes #260
2015-08-08 18:15:14 +02:00
Marc Tobias Metten
7c8c206818 new method /lookup.php - Reverse search by multiple osm ids 2015-06-16 21:11:21 +02:00
Sarah Hoffmann
3257c04d94 make Tiger data path configurable 2015-05-08 19:48:27 +02:00
Marc Tobias Metten
3b809c40f1 update Tiger import script to use 2014 data 2015-05-04 01:13:20 +02:00
Sarah Hoffmann
48e0b318f2 remove create-road function, no longer used
The road tables are filled during indexing. Fixes #21.
2015-05-03 19:56:08 +02:00
Sarah Hoffmann
0930f6e728 state setup: get latest node from place, planet_osm_nodes may be empty 2015-03-09 21:33:02 +01:00
Sarah Hoffmann
f156da6b63 support tablespaces and www user config in tiger import 2015-01-11 13:44:39 +01:00
Sarah Hoffmann
c391479c58 reorganise table creation
- remove unused tables
- make apache user configurable
- introduce configurable tablespaces
2014-12-02 00:05:21 +01:00
Sarah Hoffmann
04a20a2a0a remove debug output 2014-11-28 22:16:56 +01:00
Sarah Hoffmann
6382b1c111 more tolerant regexp for parsing replication state directories
Apache 2.4 has changed the date format, so that the current regexp
doesn't match anymore, so be more tolerant with the date format.
Also force less fancy output formatting without tables.
2014-11-27 22:23:04 +01:00
Sarah Hoffmann
8f09b9378f only check for postgres major and minor version
fixes #192
2014-10-29 21:04:28 +01:00
Sarah Hoffmann
2d6f00945a rewrite address interpolation so that planet_osm_node is not needed
This allows address interpolations to work correctly when flatnode storage
is used for node coordinates.

To fix interpolations in an existing database, follow these steps:

  * invalidate all interpolations (in psql):
    `UPDATE placex SET indexed_status=2 WHERE rank_search = 28`
  * disable updates:
    ./utils/setup.php --create-functions --create-partition-functions
  * reindex the whole lot:
    ./utils/update.php --index --index-instances <number of your cpus>
  * enable updates again:
    ./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
2014-10-05 22:16:02 +02:00
Sarah Hoffmann
a1a136778d add finished message to setup.php 2014-09-29 19:31:37 +02:00
Sarah Hoffmann
6a5b5b3c36 revert error checking on pgsql restore
wikipedia dumps create expected errors on restore, fixes #142
2014-06-05 22:31:59 +02:00
Sarah Hoffmann
71883fc341 add setup option to ignore SQL errors
needed when restoring partial backups
2014-05-13 23:23:31 +02:00
Sarah Hoffmann
08b6fffc36 break out of write loop when psql fails
fixes hanging in --create-functions
2014-05-13 23:17:05 +02:00
Sarah Hoffmann
090e9e7fb6 make errors from psql in setup fatal 2014-04-13 16:09:27 +02:00
Sarah Hoffmann
cf35f19318 split gb_postcode in table creation and data loading
Data for gb_postcode now needs to be downloaded first.
Also fixes table creation for postgis 2.0.
2014-02-21 23:07:41 +01:00
Sarah Hoffmann
98b93df83d recreate place objects when admin_level changes
Also added a sanity check to ensure that accidental removal of admin_level
tags on large areas doesn't cause huge reindexing load. That can be disabled
by setting CONST_Limit_Reindexing to false.
2014-02-07 23:37:54 +01:00
Sarah Hoffmann
e0b1e3b66d replace ST_Line_Interpolate_Point with ST_LineInterpolatePoint (DB adaption needed)
Name of function was changed in postgis 2.1 and now prints ugly
deprecation warnings. For older versions of postgis, function
will be renamed to the new name during the setup of the DB.

To update existing databases with postgis < 2.1 run:

ALTER FUNCTION st_line_interpolate_point(geometry, double precision) RENAME TO ST_LineInterpolatePoint

and then reinstall the SQL functions:

./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
2014-02-07 20:10:14 +01:00
Sarah Hoffmann
8675a2607a use postgis as an extension for versions >= 2.0 2013-10-10 23:13:58 +02:00
Sarah Hoffmann
80b4121aca allow setup without partitions 2013-09-15 22:45:47 +02:00
Brian Quinion
d8f9b27c93 make missing osmosis non-fatal for 'all' option - just skip it 2013-09-06 10:58:48 +01:00
Brian Quinion
5e6fdc467c Check to see if we can access the website at the configured CONST_Website_BaseURL 2013-06-13 18:07:19 +01:00
Frederik Ramm
87519de8ab fix indentation 2013-05-16 09:11:19 +02:00
Frederik Ramm
1f2a262ee0 Add osm2pgsql flat node support via settings.php 2013-05-16 09:03:16 +02:00
Sarah Hoffmann
ddc46acd26 add support for house numbers without street 2013-04-27 00:57:18 +02:00
Sarah Hoffmann
913341ee86 remove worldboundaries.sql
fixes #22
2013-04-20 10:27:56 +02:00
Sarah Hoffmann
87ad4fb82f make osmosis-init also work for older planets
Use planet_osm_nodes instead of places to get the very last node even if it is
untagged. Then ask for version 1 to avoid being mislead if the node has been
changed in the meantime.
2013-04-07 15:34:29 +02:00
Brian Quinion
6ec5a40c82 better osmosis error message 2013-04-03 17:03:39 +01:00
IrlJidel
3eea62363d fix typo for baseUrl when configuring configuration.txt
use osmosis --read-replication-lag to determine if there are changes before trying to process updates, useful when we are tracking hourly or daily replication updates

set CONST_Replication_Recheck_Interval to 60

skip lag check if CONST_Replication_Update_Interval > 60, for minutelies there's always new diffs to process

use tabs for indent

change sleep for non-minutely updates so that we dont drift tto much or poll excessively

unset $aReplicationLag before each exec attempt

unset $aReplicationLag inside while loop
2013-04-02 21:30:12 +01:00
IrlJidel
7cb27dc881 make planet replication url configurable so we can use geofabrik's awesome daily country diffs 2013-03-22 12:44:21 +00:00
Brian Quinion
fca2d00617 Basic status page for monitoring nominatim is working 2013-01-24 12:42:42 +00:00
Sarah Hoffmann
87b250e739 split partition.sql into table and function parts
Makes it easier to patch partition functions on an already existing
database.
2013-01-19 17:23:21 +01:00
Sarah Hoffmann
20a852b554 support custom psql port in setup.php
patch by b3nn0 (see http://trac.openstreetmap.org/ticket/4736)
2013-01-14 22:48:52 +01:00
Brian Quinion
4a3121b52f release in postgis version string is optional 2012-12-18 17:39:01 +00:00
Brian Quinion
96d3cb61c8 add constant to define postgis version. Verify definted version constants are correct during database creation. 2012-12-18 13:09:50 +00:00
Sarah Hoffmann
e9535b3607 check return of DB creation command 2012-12-15 11:31:25 +01:00
Brian Quinion
cc24d998e4 move deletable and polygons into default website 2012-12-03 14:26:29 +00:00
IrlJidel
74f5929c2a Add css dir to create-website 2012-11-19 16:00:19 +00:00
Brian Quinion
678dcbd82a hstore in 9.2 replaces k=>v with hstore(k,v). Update sql to reflect change and introduce compatability function for pre 9.1 postgresql 2012-11-01 01:47:30 +00:00
Brian Quinion
6db3b2328d don't exit during osmosis setup 2012-10-29 14:23:05 +00:00
Brian Quinion
7dbbc43a85 Automatically calculate the state file for replication from the last node in the db 2012-10-22 03:09:38 +01:00
Sarah Hoffmann
c691217901 typo 2012-10-09 22:20:05 +02:00
Sarah Hoffmann
b0242c7901 use calculated_country_code for postcodes 2012-10-09 22:05:37 +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
c37a145dc6 patch replication path on --osmosis-init
planet server layout has changed. Patch in the new path to
minute replications after having osmosis initialise configuration.txt.
2012-09-23 22:03:28 +02:00
sprengm
7ff1395b96 make setup.php fail early on missing osm-file
make setup.php fail early if:
  - no osm-file argument was supplied for --all or --import-data
  - the supplied osm-file is not existing or not readable (file permissions)
2012-08-25 10:00:46 +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
b11718699e fail on error
- stop indexing if there is any other error than deadlock from the DB
- stop import if osm2pgsql or indexing fails
2012-07-31 00:31:38 +02:00
Daniele Forsi
38e40cd014 Fix more typos 2012-07-10 15:47:21 +02:00
Brian Quinion
c325e1b039 Merge branch 'master' of github.com:twain47/Nominatim 2012-05-24 01:43:23 +02:00
Brian Quinion
a32fe96e16 truncate road partition tables during load 2012-05-24 01:42:59 +02:00
Sarah Hoffmann
35fdb7af0f more verbose error messages 2012-05-24 00:26:16 +02:00
Brian Quinion
4be160bd4b revert to plain text dump for 8.4 compatibility (+ permissions fix) 2012-05-23 19:25:43 +02:00
Brian Quinion
f1e381fdd4 fix broken field name / committed debug 2012-05-22 20:21:58 +02:00
Brian Quinion
d74cf03492 use the new country data files 2012-05-22 19:48:35 +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
fd448170c5 remove intermediate ANALYSE while indexing
Autovacuum does a much better job.
2012-05-13 10:50:08 +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
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
mfn
fd3fcea539 Do not swallow PEAR error. 2012-04-26 13:30:49 +02:00
Brian Quinion
9b01ddd641 set osm2pgsql cache memory to a default based on memory in the machine 2012-04-26 01:35:06 +01:00
Sarah Hoffmann
653c05329d Format of replicate-sequence URL has changed
Additionally update/init import_status in the DB. If this is not
initialized here, subsequent updates of the status won't work.
2012-04-15 17:45:01 +02:00
Sarah Hoffmann
3f8fcd4055 add switch for osm2pgsql cache size
also increased the default to 15GB to accaommodate growing planet
2012-04-11 23:39:07 +02:00
Sarah Hoffmann
7ed4c28405 force UTF-8 database 2012-04-11 22:16:35 +02: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
c186a4ead0 extend scripts for Tiger 2011 data 2012-02-17 20:34:28 +00:00
Sarah Hoffmann
8c7bd6beab during initial setup defer creation of non-vital until after nominatim indexing,
analyse DB during nominatim indexing so the query planer uses indexes correctly
2012-02-10 21:01:35 +00:00
Sarah Hoffmann
acadfcb2c5 extensions where introduced in postgresql in 9.1, not in 9.0 2012-01-21 12:09:43 +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
1028c2444c move partiondef config file to settings, add --create-website option to build symlinks automatically 2011-04-06 18:19:40 +00:00
Frederik Ramm
b83af9c248 fix potential deadlock when writing a lot of data to a psql pipe and not reading what comes back;
stdout/stderr weren't used anyway so just connect them through
2011-02-21 00:02:17 +00:00
Frederik Ramm
a4c63c094f * use osm2pgsql from $PATH if none present locally
* do not display usage() on successful postcode generation
2011-02-18 09:18:37 +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
a6453a808d remove the road buffer code - made things slower. Plus some more tiger import code 2010-11-17 15:19:25 +00:00
Brian Quinion
7df80bbc6f tigger data import 2010-11-15 16:34:27 +00:00
Brian Quinion
bfe56e6a45 change partition from char to int, partition search_name on country 2010-11-09 10:19:36 +00:00
Brian Quinion
cb40aa41d5 more partitioning work, os open data postcodes, country list fixes 2010-11-01 15:09:10 +00:00
Brian Quinion
57583f09e3 hstore names / refactoring 2010-10-27 14:05:42 +00:00
Brian Quinion
e6d983474b data partitioning 2010-10-26 15:22:41 +00:00
Brian Quinion
4c2c499860 default path fixes 2010-10-25 12:22:22 +00:00
Brian Quinion
ab6a996772 nominatim refactoring 2010-10-23 23:12:37 +00:00