Google Place API street type list -
i using google place retrieve address, , somehow want street(route in google terminology) separated street name , street type. want street type match existing column in database.
things difficult when google place use xxxx street
, times xxxx st
instance, typical google address
{ administrative_area_level_1: ['short_name', 'vic'], locality: ['long_name', 'carlton'], postal_code: ['long_name', '3053'], route: ['long_name', 'canada ln'], street_number: ['short_name', '12'], subpremise: ['short_name', '13'] }
but shows canada lane in suggestion box.
and worse when abbreviation not match local data model. instance use la
instead of ln
short of lane.
appreciated if tell me find list of street type (and abbreviation) used google api. or there way disable abbreviation option?
sounds you're after "street suffixes". these complicated.
not change across countries , languages, within same country , language can used in different ways; abbreviations can have multiple meanings: "st" can "street" of "saint"; abbreviations used or not depending on subtle rules change place place.
same goes cardinal points (north, south, east, west) parts of road / street names: "north st" or "n 11st street"? it's complicated.
if have amount of addresses, , care addresses in english, take last word each street name suffix. when matching own data, allow abbreviations when matching, rather trying expand them.
for instance, don't try expand "canada la" "canada lane" matches "lane". instead, expand "lane" ["lane", "la", "ln"] , match suffixes values.
then you'd need strategy "collisions", abbreviations can mean 2+ suffixes. these seem rare, can't remember ("st" isn't, because "saint" isn't suffix) , usps' http://pe.usps.gov/text/pub28/28apc_002.htm doesn't seem have any.
Comments
Post a Comment