Hi I have set up Nominatim on my own server.

I have tried several searches using just street names and the results have been good.

However, whenever I include a postcode in the search I get a lot of errors appearing like as follows:

string(125) "select 'AA', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = 'E8 9JH'" object(DB_Error)#2 (8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> int(-18) ["message"]=> string(23) "DB Error: no such table" ["userinfo"]=> string(322) "select 'AA', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = 'E8 9JH' [nativecode=ERROR: relation "gb_postcode" does not exist LINE 1: ...)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcod... ^]" ["backtrace"]=> array(9) { [0]=> array(6) { ["file"]=> string(21) "/usr/share/php/DB.php" ["line"]=> int(966) ["function"]=> string(10) "PEAR_Error" ["class"]=> string(10) "PEAR_Error" ["type"]=> string(2) "->" ["args"]=> array(5) { [0]=> string(23) "DB Error: no such table" [1]=> int(-18) [2]=> int(1) [3]=> int(1024) [4]=> string(322) "select 'AA', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = 'E8 9JH' [nativecode=ERROR: relation "gb_postcode" does not exist LINE 1: ...)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcod... ^]" } } [1]=> array(7) { ["file"]=> string(23) "/usr/share/php/PEAR.php" ["line"]=> int(531) ["function"]=> string(8) "DB_Error" ["class"]=> string(8) "DB_Error" ["object"]=> *RECURSION* ["type"]=> string(2) "->" ["args"]=> array(4) { [0]=> int(-18) [1]=> int(1) [2]=> int(1024) [3]=> string(322) "select 'AA', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = 'E8 9JH' [nativecode=ERROR: relation "gb_postcode" does not exist LINE 1: ...)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcod... ^]" } } [2]=> array(7) { ["file"]=> string(28) "/usr/share/php/DB/common.php" ["line"]=> int(1908) ["function"]=> string(10) "raiseError" ["class"]=> string(4) "PEAR" ["object"]=> object(DB_pgsql)#1 (28) { ["phptype"]=> string(5) "pgsql" ["dbsyntax"]=> string(5) "pgsql" ["features"]=> array(7) { ["limit"]=> string(5) "alter" ["new_link"]=> string(5) "4.3.0" ["numrows"]=> bool(true) ["pconnect"]=> bool(true) ["prepare"]=> bool(false) ["ssl"]=> bool(true) ["transactions"]=> bool(true) } ["errorcode_map"]=> array(0) { } ["connection"]=> resource(14) of type (pgsql link) ["dsn"]=> array(9) { ["phptype"]=> string(5) "pgsql" ["dbsyntax"]=> string(5) "pgsql" ["username"]=> string(8) "www-data" ["password"]=> bool(false) ["protocol"]=> string(3) "tcp" ["hostspec"]=> string(0) "" ["port"]=> bool(false) ["socket"]=> bool(false) ["database"]=> string(9) "nominatim" } ["autocommit"]=> bool(true) ["transaction_opcount"]=> int(0) ["affected"]=> int(0) ["row"]=> array(0) { } ["_num_rows"]=> array(0) { } ["fetchmode"]=> int(2) ["fetchmode_object_class"]=> string(8) "stdClass" ["was_connected"]=> NULL ["last_query"]=> string(125) "select 'AA', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = 'E8 9JH'" ["options"]=> array(8) { ["result_buffering"]=> int(500) ["persistent"]=> bool(false) ["ssl"]=> bool(false) ["debug"]=> int(0) ["seqname_format"]=> string(6) "%s_seq" ["autofree"]=> bool(false) ["portability"]=> int(0) ["optimize"]=> string(11) "performance" } ["last

Anyone know why this might be?

I see within the error that it says relation "gb_postcode" does not exist.

I followed the following tutorial: http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Ubuntu.2FDebian

So I would have thought everything needed should have been installed.

Thanks

asked 21 Jan '13, 10:49

srose's gravatar image

srose
146101015
accept rate: 0%

Whole question needs rephrasing, and the detail error message removing. It's obvious that you are lacking a table called gb_postcodes & that's why this is failing.

Try something like asking "What is required to run a private nominatim instance for UK postcodes": the question may then be more useful to others.

(21 Jan '13, 11:43) SK53 ♦

This isn't really a suitable forum for reporting a bug because once it is fixed it won't be of any help to anyone. Can you create an issue here https://github.com/twain47/Nominatim/issues. Please include the version of postgresql that you are running.

permanent link

answered 21 Jan '13, 12:58

twain's gravatar image

twain
2.4k2538
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×555
×546
×13

question asked: 21 Jan '13, 10:49

question was seen: 3,174 times

last updated: 21 Jan '13, 12:58

powered by OSQA