对不起,这不是一个非常明确的问题,我正在考虑一个产品的想法,所以需要知道什么是可能的...在英国,如何找到给定GPS坐标的地址?
说我站在房子的门前, GSP从智能手机坐标,我如何找到我所站的地址?
对于这个GPS是否足够好?
我需要使用多少数据/服务成本?
我还有什么其他问题应该问到这个问题?
对不起,这不是一个非常明确的问题,我正在考虑一个产品的想法,所以需要知道什么是可能的...在英国,如何找到给定GPS坐标的地址?
说我站在房子的门前, GSP从智能手机坐标,我如何找到我所站的地址?
对于这个GPS是否足够好?
我需要使用多少数据/服务成本?
我还有什么其他问题应该问到这个问题?
GPS仅限于返回您的位置的经度和纬度坐标。
要将这些坐标解析为地址,您需要使用外部数据源。将地理坐标转换为地址的行为通常被称为reverse geocoding。
有一些免费的反向地理编码服务,如that offered within the Google Maps API。但是,请确保您在使用此类服务之前阅读并理解Terms of Use。
简单CSV:
http://maps.google.com/maps/geo?q=40.756041,-73.986939&output=csv&sensor=false
返回:
举个例子,你可以使用下面的HTTP请求都与谷歌地图API反向地理编码
200,8,"601-699 7th Ave, New York, NY 10036, USA"
更复杂的XML:
http://maps.google.com/maps/geo?q=40.756041,-73.986939&output=xml&sensor=false
返回:
<kml xmlns="http://earth.google.com/kml/2.0"><Response>
<name>40.756041,-73.986939</name>
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>601-699 7th Ave, New York, NY 10036, USA</address>
<AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</CountryName><AdministrativeArea><AdministrativeAreaName>NY</AdministrativeAreaName><SubAdministrativeArea><SubAdministrativeAreaName>New York</SubAdministrativeAreaName><Locality><LocalityName>New York</LocalityName><DependentLocality><DependentLocalityName>Manhattan</DependentLocalityName><Thoroughfare><ThoroughfareName>601-699 7th Ave</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>10036</PostalCodeNumber></PostalCode></DependentLocality></Locality></SubAdministrativeArea></AdministrativeArea></Country></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7595131" south="40.7532178" east="-73.9835667" west="-73.9898620" />
</ExtendedData>
<Point><coordinates>-73.9869192,40.7560331,0</coordinates></Point>
</Placemark>
<Placemark id="p2">
<address>Times Sq - 42nd St Station, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>Times Sq - 42nd St Station</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7591946" south="40.7528994" east="-73.9838014" west="-73.9900966" />
</ExtendedData>
<Point><coordinates>-73.9869490,40.7560470,0</coordinates></Point>
</Placemark>
<Placemark id="p3">
<address>Times Square - 42nd Street</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>Times Square - 42nd Street</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7591476" south="40.7528524" east="-73.9838524" west="-73.9901476" />
</ExtendedData>
<Point><coordinates>-73.9870000,40.7560000,0</coordinates></Point>
</Placemark>
<Placemark id="p4">
<address>W 42 St - 7 Av, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>W 42 St - 7 Av</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7591446" south="40.7528494" east="-73.9839964" west="-73.9902916" />
</ExtendedData>
<Point><coordinates>-73.9871440,40.7559970,0</coordinates></Point>
</Placemark>
<Placemark id="p5">
<address>New Amsterdam Theatre, New York, NY 10036, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</CountryName><AdministrativeArea><AdministrativeAreaName>NY</AdministrativeAreaName><Locality><LocalityName>New York</LocalityName><PostalCode><PostalCodeNumber>10036</PostalCodeNumber></PostalCode><AddressLine>New Amsterdam Theatre</AddressLine></Locality></AdministrativeArea></Country></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7593416" south="40.7530464" east="-73.9842484" west="-73.9905436" />
</ExtendedData>
<Point><coordinates>-73.9873960,40.7561940,0</coordinates></Point>
</Placemark>
<Placemark id="p6">
<address>W 42 St - 7 Av, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>W 42 St - 7 Av</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7594606" south="40.7531654" east="-73.9842484" west="-73.9905436" />
</ExtendedData>
<Point><coordinates>-73.9873960,40.7563130,0</coordinates></Point>
</Placemark>
<Placemark id="p7">
<address>Times Sq - 42nd St Station, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>Times Sq - 42nd St Station</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7589406" south="40.7526454" east="-73.9832194" west="-73.9895146" />
</ExtendedData>
<Point><coordinates>-73.9863670,40.7557930,0</coordinates></Point>
</Placemark>
<Placemark id="p8">
<address>W 42 St - Broadway, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>W 42 St - Broadway</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7588236" south="40.7525284" east="-73.9831654" west="-73.9894606" />
</ExtendedData>
<Point><coordinates>-73.9863130,40.7556760,0</coordinates></Point>
</Placemark>
<Placemark id="p9">
<address>7 Av - W 41 St, New York, NY 10116, USA</address>
<AddressDetails Accuracy="9" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><AddressLine>7 Av - W 41 St</AddressLine></AddressDetails>
<ExtendedData>
<LatLonBox north="40.7586296" south="40.7523344" east="-73.9843024" west="-73.9905976" />
</ExtendedData>
<Point><coordinates>-73.9874500,40.7554820,0</coordinates></Point>
</Placemark>
</Response></kml>
只需使用您的latitude,longitude
改变q
参数。
请注意,Google Maps API的免费版本每天每个IP地址的请求数限制为15,000。(Google Maps API FAQ)
如果您打算大量使用谷歌的反向地理编码服务,你可能要考虑使用Premier edition of the Google Maps API。
Premier API自动附带“advanced geocoding capabilities with greater volume and speed”,因此标准API的限制应该被新配额所取代。
作为附加说明,根据一个unofficial source(2008年4月),Premier API的开销为每年10,000美元。
您可以使用各种免费服务,例如Google提供的各种免费服务,用于从某些GPS坐标反向地理编码(技术术语)地址。我强烈建议与他们的API一出戏,完整的文档可以在这里找到:
http://code.google.com/apis/maps/documentation/services.html
谷歌的Geolocation Network Protocol可能有帮助;我认为它在英国地点工作时,我最后一次尝试它。
顺便说一下,法规调查刚刚发布了他们的数据,真是松散的许可证,我认为他们也有一个网络服务。你可能想要看看。
OpenStreetMap(由志愿者创建的世界免费开源地图)使用Nominatim,这看起来非常好。见
http://wiki.openstreetmap.org/wiki/Nominatim#Reverse_Geocoding_.2F_Address_lookup
又见http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/ – 2010-04-08 18:05:28
的可能重复http://stackoverflow.com /问题/ 2621844 /取纬度,经度由扯皮,邮政编码到地图,谷歌-COM-使用的JavaScript – 2010-04-12 20:26:57