postal-code

How to convert postal code to city name, is there an API available? [closed]

吃可爱长大的小学妹 提交于 2019-11-29 07:05:09
问题 How to convert post code to city name, is there an API available? 回答1: You need a service that does geocoding. Yahoo's Geocoder API is getting much better results globally. 110021 is the postal code for New Delhi among several other places in the world. This seems to get them all. Google Maps API is another such service but I'm not happy with the geocoded results as I don't get all results back for 110021 . geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': '110021'},

mySQL select zipcodes within x km/miles within range of y

岁酱吖の 提交于 2019-11-29 05:17:38
Note: Although I use a zipcode database with Dutch zipcodes, this question is country independent. I have a database with every zipcode in the Netherlands + its x and y coordinate (lat/long). I have for example zipcode: $baseZipCode = 1044; with the following coordinates: x coordinate = 4,808855 y coordinate = 52,406332 Now, I want to find all other zipcodes with $range from $baseZipCode . For example: SELECT zipcode FROM zipcodes WHERE ????? // Need help here The problem is that the earth is not completely round. I find a lot of tutorials with from a to b calculations but that's not what I

Where can I get postal codes for all countries?

爱⌒轻易说出口 提交于 2019-11-28 15:39:54
问题 I once read about an open source database for postal codes with geolocation data but now I can't remember its name. Can someone help? 回答1: My guess is that your lost friend is GeoNames. 回答2: You're looking for an Open GIS database - the main keyword being "GIS". This will help you find results. The information you're looking for is usually Commercial grade (i.e. you need to pay for the data), but you can see what's available on the open-source GIS websites: http://www.osgeo.org/ http:/

Retrieving Postal Code with Google Maps Javascript API V3 Reverse Geocode

人盡茶涼 提交于 2019-11-28 05:02:28
I'm trying to submit a query using the postal code to my DB whenever the googlemaps viewport center changes. I know that this can be done with reverse geocoding with something like: google.maps.event.addListener(map, 'center_changed', function(){ newCenter(); }); ... function newCenter(){ var newc = map.getCenter(); geocoder.geocode({'latLng': newc}, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var newzip = results[0].address_components['postal_code']; } }); }; Of course, this code doesn't actually work. So I was wondering how I would need to change this in order

United Kingdom (GB) postal code validation without regex

你离开我真会死。 提交于 2019-11-28 03:09:15
问题 I have tried several regexes and still some valid postal codes sometimes get rejected. Searching the internet, Wikipedia and SO, I could only find regex validation solutions. Is there a validation method which does not use regex? In any language, I guess it would be easy to port. I supose the easiest would be to compare against a postal code database, yet that would need to be maintained and updated periodically from a reliable source. Edit: To help future visitors and keep you from posting

UK Royal Mail PAF address finder via postcode alternatives? [closed]

你说的曾经没有我的故事 提交于 2019-11-28 01:42:23
问题 We need an address finder (premise level) based on postcode. We have a budget of 40k for this. But I have been assigned to find some cheaper alternatives for Royal mail PAF database. Is Google any good to find premise level address when you send full postcode. Any recommendation over Royal Mail PAF file. Any web services out there for this to accomplish? Please share your knowledge. Cheers, Naren 回答1: We use products from AFD for this, they work well for us. Edit just saw Best way to geocode

mySQL select zipcodes within x km/miles within range of y

社会主义新天地 提交于 2019-11-27 22:42:41
问题 Note: Although I use a zipcode database with Dutch zipcodes, this question is country independent. I have a database with every zipcode in the Netherlands + its x and y coordinate (lat/long). I have for example zipcode: $baseZipCode = 1044; with the following coordinates: x coordinate = 4,808855 y coordinate = 52,406332 Now, I want to find all other zipcodes with $range from $baseZipCode . For example: SELECT zipcode FROM zipcodes WHERE ????? // Need help here The problem is that the earth is

mySQL select zipcodes within x km/miles within range of y

耗尽温柔 提交于 2019-11-27 19:06:52
问题 Note: Although I use a zipcode database with Dutch zipcodes, this question is country independent. I have a database with every zipcode in the Netherlands + its x and y coordinate (lat/long). I have for example zipcode: $baseZipCode = 1044; with the following coordinates: x coordinate = 4,808855 y coordinate = 52,406332 Now, I want to find all other zipcodes with $range from $baseZipCode . For example: SELECT zipcode FROM zipcodes WHERE ????? // Need help here The problem is that the earth is

Retrieving Postal Code with Google Maps Javascript API V3 Reverse Geocode

流过昼夜 提交于 2019-11-27 00:46:41
问题 I'm trying to submit a query using the postal code to my DB whenever the googlemaps viewport center changes. I know that this can be done with reverse geocoding with something like: google.maps.event.addListener(map, 'center_changed', function(){ newCenter(); }); ... function newCenter(){ var newc = map.getCenter(); geocoder.geocode({'latLng': newc}, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var newzip = results[0].address_components['postal_code']; } }); }; Of

Is it a good idea to use an integer column for storing US ZIP codes in a database?

我与影子孤独终老i 提交于 2019-11-27 00:35:29
From first glance, it would appear I have two basic choices for storing ZIP codes in a database table: Text (probably most common), i.e. char(5) or varchar(9) to support +4 extension Numeric, i.e. 32-bit integer Both would satisfy the requirements of the data, if we assume that there are no international concerns. In the past we've generally just gone the text route, but I was wondering if anyone does the opposite? Just from brief comparison it looks like the integer method has two clear advantages: It is, by means of its nature, automatically limited to numerics only (whereas without