Questions tagged [postal-code]

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

In February 2005, 117 of the 190 member countries of the Universal Postal Union had postal code systems. Countries that do not have national systems include Ireland and Panama. Although Hong Kong and Macau are now Special Administrative Regions of China, each maintains its own long-established postal system, which does not utilize postal codes for domestic mail, and no postal codes are assigned to Hong Kong and Macau. Mail between Hong Kong, Macau and mainland China is treated as international.

399 questions
1
vote
0 answers

Query doesn't retrieve all records in my CakePHP application

I'm developing an application using CakePHP 1.3. I have a page which allows users to search through 'Outlet' table records. I have three fields in the search form; name, cuisine and postcode. This is what the view for search looks like;…
Mr B
  • 3,980
  • 9
  • 48
  • 74
1
vote
2 answers

Library to calculate distances between postcodes in the UK

I am looking for a way to calculate approximate distance between two UK postcodes (distance in the straight line is good enough) for analysing data. Preferably easily accessible from java, but C#, native C++ etc. are fine as well.
Grzenio
  • 35,875
  • 47
  • 158
  • 240
1
vote
1 answer

Finding Closest Postcode of a Given Post Code

In my php application I want to get the nearest postal code of the given post code. That means I enter a post code as 680721 I want to get the nearest post code of this from my database. How can I do this? This is the table I used for store postal…
Kichu
  • 3,284
  • 15
  • 69
  • 135
1
vote
1 answer

Search engine by distance

I am looking to make an option of my serach engine on my site so that users can search for items within a set distance, e.g. search items within 10 miles, or 20 miles etc. I was wondering how this could be done? The user would have to enter thier…
Euan Hume
  • 119
  • 1
  • 4
  • 10
1
vote
2 answers

Generate UK postcode from lat,lon search in Google Maps

I'm trying to generate a UK postcode from a latitude and longitude search in Google Maps. For example, a search for 57.350237,-1.977539 in Google Maps returns this: https://i.stack.imgur.com/mSULM.png I want to be able to extract that postcode -…
KerrM
  • 5,139
  • 3
  • 35
  • 60
1
vote
4 answers

LINQ query to check if a postcode is within a range of starting and ending postcodes?

I need to check if a postcode is within a given start and end postcode, using linq. Here is what I have so far but it's not right at all, can someone point me in the right direction? List stations =…
Carl Weis
  • 6,794
  • 15
  • 63
  • 86
1
vote
3 answers

Sort Postcode for menu/list

I need to sort a list of UK postcodes in to order. Is there a simple way to do it? UK postcodes are made up of letters and numbers: see for full info of the format: http://en.wikipedia.org/wiki/UK_postcodes But my problem is this a simple alpha…
Mesh
  • 6,262
  • 5
  • 34
  • 53
1
vote
3 answers

How to get my regular expression to extract information, not just check

I have a regular expression for checking whether a string is zip/postal code or not. But I would really like to also to be able to extract that from a full address (or, if possible, any string). Here is my current regular…
xyhhx
  • 6,384
  • 6
  • 41
  • 64
1
vote
1 answer

Validation of postcodes in several countries

I am wanting a code to check all postcodes in say column A and turn the cell green if it passes the REGEX pattern and red if it doesn't. I have been using the below code: sub postcode() Dim strPattern As String Dim regEx As Object Dim…
JohnA
  • 31
  • 5
1
vote
2 answers

MYSQL filtering conditionally on first 2 characters

I have a table of Outcodes (in the UK, the first part of postcodes/zipcode) for example id,outcode 1, AB1 2, AB2... and so on 27, AL1 28, AL2...and so on 52, B1 52, B2 52, B3 61, BA1 etc. I am trying to get a list of unique first parts of the…
Keith Ivison
  • 387
  • 4
  • 11
1
vote
1 answer

Geocoding - Different Postal Code In Response

I am using the geocoding API passing postal codes (GB mainly) to validate if the postal code is valid or not (using the address_components and types where if it returns "postal_code" I take that it is valid) but I have found 2 issues. Also is this…
1
vote
1 answer

Nearest neighbour for postcodes (Germany)

I have two lists of postcodes for Germany (different length). I need to find the closest postcode neighbour for each one in the first dataframe with respect to the second list. I do have longitutde and latitude information as well. It would be great…
Marco
  • 2,368
  • 6
  • 22
  • 48
1
vote
0 answers

How to make sure a string postal code follows the 6 character letter digit, letter digit, letter digit, pattern

My current code is: System.out.println(DATA_DIV); System.out.println("Enter the Postal Code:"); postalCode = uIn.next(); postalCode = postalCode.toUpperCase(); what is the easiest and quickest way to check that every odd character is a letter and…
1
vote
4 answers

Formatting UK Postcodes in R

I am trying to format UK postcodes that come in as a vector of different input in R. For example, I have the following postcodes: postcodes<-c("IV41 8PW","IV408BU","kY11..4hJ","KY1.1UU","KY4 9RW","G32-7EJ") How do I write a generic code that…
Cinnamon
  • 43
  • 4
1
vote
1 answer

How to extract longitude and latitude using postal code and `ggmap` function

I have a list of postal codes and I want to find their associated longitude and latitude in order to plot them on a map. For example, I showed couple of postal codes below: code <- c("V6G 1X5", "V6J 2A4", "V5V 3N2") Now, I want to find longitude…
Ross_you
  • 881
  • 5
  • 22