Zip Codes: what about the rest of us?

Roudi

First Post
So ENWorld 2 will store user's zip codes for event notification. Will there be any love for us non-American users?
 

log in or register to remove this ad

A zip code database must be installed for each country. That database must contain a latitude and longitude entry for each zipcode. The SQL query then uses a trig function to find all entries within X miles by joining the user or event table to the zip code table.

I need to get a prototype working with just one type of postal code first. After that I will expand to using a country code to determine which postal code table to search on. Canadian postal code tables do exist, indeed most countries publish databases like this. Finding free ones aren't easy and free ones aren't usually as accurate. I've seen pay ones run as high a $1000. For EN World I will be using such a db since it's the same one I install for clients at work.
 

Why use zip or postal codes? Couldn't an equally eddective system be written just using the divisions we have in the Gamers seeking Gamers forum? After all, I don't imagine there will be all that many events.
 

Morrus said:
Why use zip or postal codes? Couldn't an equally eddective system be written just using the divisions we have in the Gamers seeking Gamers forum? After all, I don't imagine there will be all that many events.
A zip code database provides a means to calculate the distance between a person and an event to within a few miles, and return the results by distance from. Nowhere on the net exists an effective sorting of gamer events by this measure - EN World will have the first and I guarantee once built it will be heavily used enough that you won't want to look through all the possible events.

This isn't just for games at one's home - it will also cover brick & mortar stores, conventions and the like. Stores and conventions will have fields to enter in their entire addresses, not just the zipcode, so that a query string to Google Maps can be constructed and returned to the user to present a map straight to said con or store.
 

Ah, cool. Sounds good.

But, in the absence of codes for non-US folks, why not use those regions for them? Admittedly, it won't be as cool as the features US residents will enjoy, but at least the system will be useable for them.
 

Michael Morris said:
A zip code database must be installed for each country. That database must contain a latitude and longitude entry for each zipcode. The SQL query then uses a trig function to find all entries within X miles by joining the user or event table to the zip code table.

I need to get a prototype working with just one type of postal code first. After that I will expand to using a country code to determine which postal code table to search on. Canadian postal code tables do exist, indeed most countries publish databases like this. Finding free ones aren't easy and free ones aren't usually as accurate. I've seen pay ones run as high a $1000. For EN World I will be using such a db since it's the same one I install for clients at work.
Here's a free one for the UK: http://www.easypeasy.com/guides/article.php?article=64

No idea how accurate it is.

These guys claim to derive the data from the Post Office Address File (PAF), but there is a license fee: http://www.graticule.com/data/postcode/index.html

The PAF (or Ordnance Survey MasterMap) data is the most accurate in the UK, and lists every address with postcode and co-ordinates. We're using the OS MasterMap at work.
 

Ok, I'll bookmark that and come back to it. I must first get it working for one before I do multiples.

BTW, depending on the formulae I use I can have the results returned in miles or kilometers. I suppose I should put a preference switch in there - defaulting to miles for the US and kilometers for everyone else.
 

Michael Morris said:
Ok, I'll bookmark that and come back to it. I must first get it working for one before I do multiples.
Oh yeah, I meant to say that I was just posting it for future use, not that I was expecting you to do it now :) I just knew about the PAF and OS MM because I've worked on the Scottish and Northern Ireland Land Registries projects.
BTW, depending on the formulae I use I can have the results returned in miles or kilometers. I suppose I should put a preference switch in there - defaulting to miles for the US and kilometers for everyone else.
Miles for the UK, too. Even though we are metric with virtually everything else, we all still think in miles when it comes to travel distances (all signs are in miles, and car speedometers are in MPH).

Cheers,
Liam
 

Michael Morris said:
BTW, depending on the formulae I use I can have the results returned in miles or kilometers. I suppose I should put a preference switch in there - defaulting to miles for the US and kilometers for everyone else.

Like Liam says, we don't do KM here.
 

really? no kidding - i never knew. :) even canada is metric from what i remember driving through ontario (though IIRC, in some places distances and speeds are listed in both KM and miles)
 

Remove ads

Top