NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

4
1

I have just started using OpenStreetMap/Nominatim and I am struggling to understand what the current status of postcodes is, how they are used to find results, best practices and so on...

For example, querying the following Northern Irish address returns a single accurate result: "220 Ravenhill Avenue, Belfast".

However, if I append the correct postcode to the query (either the full postcode or the first segment), no results are returned: "220 Ravenhill Avenue, Belfast, BT6 8LL" or "220 Ravenhill Avenue, Belfast, BT6"

I have encountered similar behaviour for a number of NI addresses but have noted that this isn't always the case when searching, for example, addresses in London.

  • Is this the intended behaviour?
  • Can I assume from this that Postcode information for NI is simply incomplete?
  • If so, is there somewhere I can go to see how complete postcode information for a particular area is?
  • How are other people handling situations where they may have a list of addresses that require geocoding, all of which contain postcodes?

Thanks

asked 24 May '13, 15:50

Stevie's gravatar image

Stevie
76123
accept rate: 0%

edited 28 May '13, 09:52

I entered a post code for a few houses where I live a few months ago. When I did a search with my post code, 7 characters no space. The result nominatim returned my street and others in the area that do not have that post code. Note the post codes were added to the house tags not the streets. This is a similar problem I found with town nodes (which spread out) compared to town boundaries (which worked). Tried again with same 7 characters with a space after 4th one and I only got one result to the search, a pointer near my house. with a source label NPEMap / FreeThe Postcode

(24 May '13, 19:13) andy mackey

4 days later and i only get the NPEMap / FreeThe Postcode result.

(28 May '13, 05:48) andy mackey

Hi Stevie,

Using Nominatim's map search site I searched for that address minus the postcode and this is the details page on that address http://nominatim.openstreetmap.org/details.php?place_id=24847069. There is no postcode nodes in that list which leads me to believe that your assumption is correct.

As for completeness of postcode information, I have no idea. My home city has no suburb boundaries or postcode boundaries. It appears it's rather difficult getting this information in a usable format, both technically and legally.

permanent link

answered 25 May '13, 10:40

Russkel's gravatar image

Russkel
1612310
accept rate: 0%

1

Originally Nominatim used OS Open Data Code Point for postcode search, which did not contain any Northern Ireland postcodes. I suspect that it still does. The ONS postcode data set does contain Northern Ireland postcodes, but became available much more recently. Matt Williams' Postcode Finder is useful for checking postcodes in OSM http://milliams.dev.openstreetmap.org/postcodefinder/

(26 May '13, 12:15) SK53 ♦

Thanks for the reply @Russkel, I appreciate your help but I'm reluctant to mark your answer as accepted until the answer is clear.

@SK53 - are you saying that OSM is still using OS Open Data Code-Point? Where then, for example, is American post code information sourced? Surely there must be some sort of road map to show how complete this data is on a global scale? I would expect, with post code being such a vital part of an address, that it would be pivotal to ensure as much completeness of this information as possible? Especially in a Geocoding context.

(27 May '13, 12:04) Stevie
1

It entirely depends on the availability of suitable data sets (& then the code & other legwork to use them). Remember OSM is a project where the work is done by volunteers and handling a couple of hundred ways of doing it is a hard work. Adding postcodes to Northern Ireland data is a way which automatically helps the Nominatim results: whether from detailed survey, ONS data or using other address complete data sets such as the Food Hygiene Rating Scheme.

(27 May '13, 23:05) SK53 ♦

@SK53 I absolutely understand Nominatim is an Open Source project - which is exactly why I'm confused that the information I'm looking for (i.e. the current coverage of postcode data) isn't readily available? Or any information pertaining to how much data a particular area/city/country has for that matter.

As a volunteer/contributor, how am I to know which areas need attention? Or as a Nominatim user, how am I to know which areas I can safely try to Geocode with a Postcode in the query?

(28 May '13, 09:43) Stevie

@Stevie Being an open source project the available postcode data is available, it just takes some effort to turn it into the coverage data that you want. You're free to pitch the idea/raise an issue and maybe someone can code the tool up for us, or you could try your hand at it.

(28 May '13, 12:36) Russkel

@Russkel Thank for you taking the time to get back to me; I appreciate all your help. After doing a bit of digging I'm beginning to think this should be raised as an issue - whether it's specifically a Nominatim issue or OSM, I think this information needs to exist somewhere.

(28 May '13, 14:24) Stevie

@Stevie, it's my pleasure. I agree, I too would like to see proper suburb and postcode coverage in the areas I frequent. It's important for routing which I believe is one of the more impressive features that this open data lets us utilise.

But how post codes and suburb boundaries isn't public data released by Governments is beyond me and another topic altogether.

(28 May '13, 14:34) Russkel
3

@Stevie, Nominatim as implemented is a address & reverse geocode engine for OSM data, not necessarily just an OpenSource geocoder. It's efficiency will depend on the quality of data in OSM. A quick inspection of taginfo gb (http://taginfo.openstreetmap.org.uk/keys/addr%3Apostcode#overview sorry no NI) shows that there are 240k objects tagged addr:postcode with around 36k distinct values. compare this with around 27 million residential addresses in GB (OS GB data) and perhaps 2 million postcodes for the UK, and you can appreciate why it might be unusual for postcode searches to work.

The relevant data file is here https://github.com/twain47/Nominatim/tree/master/data and is loaded in php/utils. All code / data fixes welcome.

(28 May '13, 14:50) SK53 ♦

That's great @SK53 - TagInfo looks like what I've been looking for! Thank you.

Additionally, I believe the points you make highlight a problem with Nominatim. Clearly there is a need for a "best guess" based on what it does know. I would expect, if there is no post code data, that it would fall back and execute the query sans post code - not to fail altogether. Like @Russkel said, this is maybe something to raise as an issue.

(28 May '13, 15:05) Stevie
showing 5 of 9 show 4 more comments

@SK53 and @Russkel really answered this in the comments of the other proposed answer, but for clarity, the approximate explanation/answer is as follows:

  • Nominatim is based on the OSM data
  • OSM Post Code data is largely incomplete
    • The current status of Post Code data can be viewed on the OSM TagInfo website.
  • Currently, if a Post Code is added to a Nominatim Query and the Post Code is not within the OSM data set, Nominatim will return no results

This appears to be the intended behaviour, which I believe to be wrong and have raised as an issue on Nominatim.

Issue on OSM Trac

Issue on Nominatim Github

permanent link

answered 29 May '13, 10:51

Stevie's gravatar image

Stevie
76123
accept rate: 0%

edited 29 May '13, 16:44

Just for the record, can you provide your ticket URL? It doesn't seem to exist here.

(29 May '13, 16:27) scai ♦
1

Updated my answer to provide the ticket URL.

(29 May '13, 16:36) Stevie

Nominatim is not good at dropping terms because doing so makes the search graph very complex.

With regards to the specific issue of dropping postcodes from the search there is a chicken and egg problem - how does nominatim identify something as a postcode when the postcode isn't in the data?

Probably the suggestion would be some sort of regex matching but since postcodes follow a different format for every country this rapidly becomes a very difficult problem. At the moment the solution is that we ignore the whole issue and just find what is in the data and leave this as a problem for the user.

This is a known issue with several tickets against it in one form or another but it will require significant developer time before it is solved.

permanent link

answered 29 May '13, 17:32

twain's gravatar image

twain
2.4k2538
accept rate: 40%

Twain, just the guy! I apologise for digging up an already known issue. This place isn't really suited for discussion, is there another more suited place to discuss developer issues such as this?

(29 May '13, 18:02) Stevie

http://lists.openstreetmap.org/pipermail/geocoding/2013-May/000819.html

But as I say this is a known issue - unless you are able to code a solution there may not be a lot of point to discussion. It is a question of developer time.

(29 May '13, 18:38) twain

Not the answer but a work around. If i can't find a place using a post code search i do a street and town, some times country is needed as well. Zoom in and centre over the place. Next note down the URL ( it's at the top ) like this one https://www.openstreetmap.org/#map=19/52.32929/-0.18013 The co-ords from that, 19 is the zoom level followed by co-ords 52.32929/-0.18013 N and W, NOTE negative - values are used for south and west. I can use these in most SatNavs and GPSes as long as you set the device to decimal degrees. DDD.ddddd. Check the place and map on Sat Nav before setting off, so that all looks correct!! I usually use the routing on OSM map page to get an idea of route and travelling time, as another confirmation.
I have added a few Postcodes to the addresses of places that i have visited and have noticed a mapper who is working hard on this, so Post code coverage is improving.

permanent link

answered 25 Aug '20, 11:06

andy%20mackey's gravatar image

andy mackey
13.2k87143285
accept rate: 4%

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:

×689
×133
×55
×15
×5

question asked: 24 May '13, 15:50

question was seen: 23,126 times

last updated: 25 Aug '20, 11:06

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum