UK 'missing postcode' information prompt.

Bug #579426 reported by chris_debian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSatNav
Fix Released
Medium
Guillaume Rosaire

Bug Description

Hi, all.

I would like to suggest something that will help both our users and OSM.

When I used to use AndNav, I found that people repeatedly commented that when they entered a UK postcode, it wasn't recognised. Can I suggest that when the postcode is not recognised, OSN produces a message saying:

"The postcode is not recognised, the most likely reason for this is that it has not been entered into the 'Free The Postcode' database (www.freethepostcode.org).

As you are using the Android platform, you can download an open-source (GPLv3) application from Android Market, it will allow you to easily submit new postcodes. To do this,
Navigate to 'Market' on your handset and search for 'freethepostcode'."

This proposed feature has been discussed on the mailing list and was accepted.

This is a 'nice to have' feature, but because it will save a lot of repeated discussion on the mailing lists and in the forum, I would like to aim for release 1.0. When discussed on the mailing list, it was suggested that this should be an easy to implement feature, so I feel a little better about asking for 1.0.

Thanks special coders.

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

I'll try to have a look at this issue, but as I don't know anything about UK postcodes, could anyone validate what I intend to do?

By looking at http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom, I guess the postcode follows this regexp pattern, so when a user type anything into the the search field, I should try to match it to this regexp :
[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}

If this is the case and no result is returned, a dialog window with the text written by Chris on top could be displayed, if not, nothing special happens.

Are you ok with this ?

Moreover, in this dialog, I could add a direct link to the freethepostcode app on Android market. That could reduce the description :
"To do this, Navigate to 'Market' on your handset and search for 'freethepostcode'."

Revision history for this message
chris_debian (cjhandrew) wrote :

ZeroG,

Thanks for looking at this. As you know, the target release is 1.0, but it would be great if we could get it in, sooner. :-)

A link to the postcode database can be found at the freethepostcode page, and the data looks like this:

http://www.freethepostcode.org/currentlist

Not sure about the regexp, but I would suggest that if the postcode that is entered is not listed here (http://www.freethepostcode.org/currentlist), then it has not been submitted, already. This is checked already i think, with the destination look-up.

As you say, if the postcode is not recognised, then the message needs to be displayed. Your idea of the link to 'Market', is even better.

Many, many thanks,

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

Dialog added in rev r118

This ability to use/download the freethepostcode android app will only be shown to users having a GB locale.

I used a rather simple dialog, not really sexy. Feel free to test it.

(You can use the following code to test : AB10 6BB)

The code is recognized as a postcode either in lower or upper case.

I added a JUnit test that can automatically check every codes appearing on the following list : http://www.freethepostcode.org/currentlist, so I guess my test is rather exhaustive with the given regex. (a few codes - 29 - are not recognized by my validator, these are :
"BB1 3H", "BB1 3B", "BN6 2NK", "BD23 2Q", "D13 0HO",
"D15 8CK", "DN14 7H", "E14 3Q", "E3 3D", "F62 1CA",
"F80 2SO", "G41 2P", "HD1 6A", "HD1 6Q", "M19 1", "M23 M40",
"NW1 8OA", "PL3 6R", "PL4 8S", "PR2 2Y", "PR23 PR2", "RH1 1MN",
"RM20 E1", "S62 6B", "TW17 9AV", "W3 6U", "W3 0T", "WR11 4EI",
"WV2 3L")

Revision history for this message
chris_debian (cjhandrew) wrote :

ZeroG wrote:
> Dialog added in rev r118
>
> This ability to use/download the freethepostcode android app will only be shown to users having a GB locale.
>
> I used a rather simple dialog, not really sexy. Feel free to test it.
>
> (You can use the following code to test : AB10 6BB)
>
> The code is recognized as a postcode either in lower or upper case.
>
> I added a JUnit test that can automatically check every codes appearing on the following list : http://www.freethepostcode.org/currentlist, so I guess my test is rather exhaustive with the given regex. (a few codes - 29 - are not recognized by my validator, these are :
> "BB1 3H", "BB1 3B", "BN6 2NK", "BD23 2Q", "D13 0HO",
> "D15 8CK", "DN14 7H", "E14 3Q", "E3 3D", "F62 1CA",
> "F80 2SO", "G41 2P", "HD1 6A", "HD1 6Q", "M19 1", "M23 M40",
> "NW1 8OA", "PL3 6R", "PL4 8S", "PR2 2Y", "PR23 PR2", "RH1 1MN",
> "RM20 E1", "S62 6B", "TW17 9AV", "W3 6U", "W3 0T", "WR11 4EI",
> "WV2 3L")

Great work; you have been busy! I'll test as soon as I can download.

'This ability to use/download the freethepostcode android app will only be shown to users having a GB locale.' Does this mean that if people are visiting the UK, that they cannot contribute/ benefit?

Do you know why the 29 codes are not validated? I could contact 'freethepostcode' and tell them.

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

> Do you know why the 29 codes are not validated? I could contact 'freethepostcode' and tell them.
>
> Chris.

They do not match with the rule explained in http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom in the Validation paragraph.

As they are user given in the freethepostcode db, that could mean they're indeed not valid or that they are special case not consistent with the British standard BS7666

Revision history for this message
chris_debian (cjhandrew) wrote :

ZeroG wrote:
> > Do you know why the 29 codes are not validated? I could contact 'freethepostcode' and tell them.
> >
> > Chris.
>
> They do not match with the rule explained in http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom in the Validation paragraph.
>
> As they are user given in the freethepostcode db, that could mean they're indeed not valid or that they are special case not consistent with the British standard BS7666

'Freethepostcode' team emailed.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

I still have problems if I do not put a space between test postcode (dl7 0sn). This was not the objective of this issue, though.

Good feature added.

Closing.

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

chris_debian wrote:
> I still have problems if I do not put a space between test postcode (dl7 0sn). This was not the objective of this issue, though.
>
> Good feature added.
>
> Closing.
>
> Chris.

That must mean that this code with a missing space is not recognized by nominatim, whereas it now should be recognized for the message about freethepostcode app and the dialog be displayed if no result is returned. (it is when I test it)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.