street-address

How to obtain longitude and latitude for a street address programmatically (and legally)

安稳与你 提交于 2019-11-26 18:19:46
Supposedly, it is possible to get this from Google Maps or some such service. (US addresses only is not good enough.) Sijin The term you're looking for is geocoding and yes Google does provide this service. New V3 API : http://code.google.com/apis/maps/documentation/geocoding/ Old V2 API: http://code.google.com/apis/maps/documentation/services.html#Geocoding Tim Farley In addition to the aforementioned Google geocoding web service , there is also a competing service provided by Yahoo . In a recent project where geocoding is done with user interaction, I included support for both. The reason is

Is there common street addresses database design for all addresses of the world?

 ̄綄美尐妖づ 提交于 2019-11-26 18:03:56
I am a programmer and to be honest don't know street address structures of the world, just how in my country is structured :) so which is the best and common database design for storing street addresses? It should be so simple to use, fast to query and dynamic to store all street addresses of the world which is identifying just by one id Thanks a lot Edward Ross It is possible to represent addresses from lots of different countries in a standard set of fields. The basic idea of a named access route (thoroughfare) which the named or numbered buildings are located on is fairly standard, except

mysql datatype for telephone number and address

ぐ巨炮叔叔 提交于 2019-11-26 17:59:32
问题 I want to input telephone number in a form, including country code, extension create table if not exists employee( ` country_code_tel int(11), tel_number int(10), extension int(10), mobile bigint(20) ); If tel_number is larger than 15 bit, which datatype can I use, I'd better use Bigint(20) ? create table address( address varchar(255), city varchar(255), country varchar(255), post_code int(11) ); For example, if I have a country code for Canada I can use +2 or 002. Which is better for

Google Geocoder service is unavaliable (Coordinates to address)

荒凉一梦 提交于 2019-11-26 17:32:03
问题 I have to get an address by coordinates, but it doesnt work and outputs "Couldnt get address": public String GetAddress(String lat, String lon) { Geocoder geocoder = new Geocoder(this, Locale.ENGLISH); String ret = ""; try { List<Address> addresses = geocoder.getFromLocation(Double.parseDouble(lat), Double.parseDouble(lon), 1); if(addresses != null) { Address returnedAddress = addresses.get(0); StringBuilder strReturnedAddress = new StringBuilder(""); for(int i=0; i<returnedAddress

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

谁都会走 提交于 2019-11-26 17:27:43
问题 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

Best practices for storing postal addresses in a database (RDBMS)?

廉价感情. 提交于 2019-11-26 17:06:10
Are there any good references for best practices for storing postal addresses in an RDBMS? It seems there are lots of tradeoffs that can be made and lots of pros and cons to each to be evaluated -- surely this has been done time and time again? Maybe someone has at least written done some lessons learned somewhere? Examples of the tradeoffs I am talking about are storing the zipcode as an integer vs a char field, should house number be stored as a separate field or part of address line 1, should suite/apartment/etc numbers be normalized or just stored as a chunk of text in address line 2, how

Where is a good Address Parser [closed]

两盒软妹~` 提交于 2019-11-26 15:59:08
问题 I'm looking for a good tool that can take a full mailing address, formatted for display or use with a mailing label, and convert it into a structured object. So for instance: // Start with a formatted address in a single string string f = "18698 E. Main Street\r\nBig Town, AZ, 86011"; // Parse into address Address addr = new Address(f); addr.Street; // 18698 E. Main Street addr.Locality; // Big Town addr.Region; // AZ addr.PostalCode; // 86011 Now I could do this using RegEx. But the tricky

get city from geocoder results?

这一生的挚爱 提交于 2019-11-26 15:40:15
问题 Having problems getting the different arrays content from geocoder results. item.formatted_address works but not item.address_components.locality? geocoder.geocode( {'address': request.term }, function(results, status) { response($.map(results, function(item) { alert(item.formatted_address+" "+item.address_components.locality) } }); // the array returned is; "results" : [ { "address_components" : [ { "long_name" : "London", "short_name" : "London", "types" : [ "locality", "political" ] } ],

How do you perform address validation?

百般思念 提交于 2019-11-26 11:48:25
问题 Is it even possible to perform address (physical, not e-mail) validation? It seems like the sheer number of address formats, even in the US alone, would make this a fairly difficult task. On the other hand, it seems like a task that would be necessary for several business requirements. 回答1: Here's a free and sort of "outside the box" way to do it. Not 100% perfect, but it should reject blatantly non-existent addresses. Submit the entire address to Google's geocoding web service. This service

How should international geographical addresses be stored in a relational database?

寵の児 提交于 2019-11-26 11:46:27
问题 Given the task of storing international geographic addresses in a relational table, what is the most flexible schema? Should every part of the address be broken out into their own fields, or should it be more like free text? Is there any sense in separating differently formatted address into different tables? For example, have a table for USAAddress, CanadianAddress, UKAddress...? 回答1: I will summarize my thoughts from my blog post - A lesson in address storage. On my current project [I work