Nominatim(来自拉丁语,意思是“名称”)是一个可以按名称和地址来搜索OSM中的数据,并生成OSM点的合成地址的工具(反向地理编码)。可用在http://nominatim.openstreetmap.org找到这个工具。Nominatim也用在OpenStreetMap首页搜索工具栏中,同时也为MapQuest Open Initiative提供搜索支持。

本页面提供了使用说明。要了解关于Nominatim如何工作的细节请查看发展概况以及这个FAQ。这里还有一个关于各个国家的语言代码各个国家地址格式的列表。

搜索

Nominatim为OSM的数据集中已命名(或编号)的内容,以及其他无名的功能子集(酒吧,旅馆,教堂等)进行了索引。

搜索首先会从左至右进行,如果失败的话会再从右到左搜索。

这两个搜索都会得到结果:皮尔金顿大道,伯明翰 伯明翰,皮尔金顿大道

(逗号是可选的,但加上逗号可以降低搜索的复杂程度并提高搜索精度。)

门牌号码已经被定义了的区域,可以使用:135皮尔金顿大道,伯明翰

特殊的关键词

在搜索中不同的关键字会被翻译成特定OSM标签(例如,酒吧=>市容=酒馆)。这里有一个这样特殊短语的列表。

参数

 http://nominatim.openstreetmap.org/search?<params>
http://nominatim.openstreetmap.org/search/<query>?<params>
 format=[html|xml|json|jsonv2]
Output format
 json_callback=<string>
Wrap json output in a callback function (JSONP) i.e. <string>(<json>)
 accept-language=<browser language string>
Preferred language order for showing search results, overrides the browser value.
Either uses standard rfc2616 accept-language string or
a simple comma separated list of language codes.
 q=<query>
Query string to search for. Alternatively can be entered as:
 street=<housenumber> <streetname>
city=<city>
county=<county>
state=<state>
country=<country>
postalcode=<postalcode>
(experimental) Alternative query string format for structured requests.
Structured requests are faster and require less server resources.
DO NOT COMBINE WITH q=<query> PARAMETER.
 countrycodes=<countrycode>[,<countrycode>][,<countrycode>]...
Limit search results to a specific country (or a list of countries).
<countrycode> should be the ISO 3166-1alpha2 code,
e.g. gb for the United Kingdom, de for Germany, etc.
 viewbox=<left>,<top>,<right>,<bottom>
or viewboxlbrt=<left>,<bottom>,<right>,<top>
The preferred area to find search results
 bounded=[0|1]
Restrict the results to only items contained with the bounding box.
Restricting the results to the bounding box also enables searching by amenity only.
For example a search query of just "[pub]" would normally be rejected
but with bounded=1 will result in a list of items matching within the bounding box.
 polygon=[0|1]
Output polygon outlines for items found
(deprecated, use one of the polygon_* parameters instead)
 addressdetails=[0|1]
Include a breakdown of the address into elements
 email=<valid email address>
If you are making large numbers of request please include a valid email address
or alternatively include your email address as part of the User-Agent string.
This information will be kept confidential and only used to contact you in the
event of a problem, see Usage Policy for more details.
 exclude_place_ids=<place_id,[place_id],[place_id]>
If you do not want certain openstreetmap objects to appear in the search result,
give a comma separated list of the place_id's you want to skip.
 limit=<integer>
Limit the number of returned results.
 dedupe=[0|1]
No explanation yet.
 debug=[0|1]
No explanation yet.
 polygon_geojson=1
Output geometry of results in geojson format.
 polygon_kml=1
Output geometry of results in kml format.
 polygon_svg=1
Output geometry of results in svg format.
 polygon_text=1
Output geometry of results as a WKT.

示例

 http://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon=1&addressdetails=1
http://nominatim.openstreetmap.org/search/135%20pilkington%20avenue,%20birmingham?format=xml&polygon=1&addressdetails=1
http://nominatim.openstreetmap.org/search/gb/birmingham/pilkington%20avenue/135?format=xml&polygon=1&addressdetails=1
 <searchresults timestamp="Sat, 07 Nov 09 14:42:10 +0000" querystring="135 pilkington, avenue birmingham" polygon="true">
<place
place_id="1620612" osm_type="node" osm_id="452010817"
boundingbox="52.548641204834,52.5488433837891,-1.81612110137939,-1.81592094898224"
polygonpoints="[['-1.81592098644987','52.5487429714954'],['-1.81592290792183','52.5487234624632'],...]"
lat="52.5487429714954" lon="-1.81602098644987"
display_name="135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom"
class="place" type="house">
<house>135</house>
<road>Pilkington Avenue</road>
<village>Wylde Green</village>
<town>Sutton Coldfield</town>
<city>City of Birmingham</city>
<county>West Midlands (county)</county>
<postcode>B72</postcode>
<country>United Kingdom</country>
<country_code>gb</country_code>
</place>
</searchresults>

反向地理编码/地址查询

反向地理编码由纬度和经度产生一个地址。可选的缩放参数指定用于显示某信息在openlayers上显示的合适的缩放级别。

参数

 http://nominatim.openstreetmap.org/reverse?<query>
 format=[xml|json]
Output format
 json_callback=<string>
Wrap json output in a callback function (JSONP) i.e. <string>(<json>)
 accept-language=<browser language string>
Preferred language order for showing search results, overrides the browser value.
Either uses standard rfc2616 accept-language string or a simple comma separated list of language codes.
 osm_type=[N|W|R]
osm_id=<value>
A specific osm node / way / relation to return an address for
Please use this in preference to lat/lon where possible
 lat=<value>
lon=<value>
The location to generate an address for
 zoom=[0-18]
Level of detail required where 0 is country and 18 is house/building
 addressdetails=[0|1]
Include a breakdown of the address into elements
 email=<valid email address>
If you are making large numbers of request please include a valid email address
or alternatively include your email address as part of the User-Agent string.
This information will be kept confidential and only used to contact you in the
event of a problem, see Usage Policy for more details.

示例

 http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1
 <reversegeocode timestamp="Fri, 06 Nov 09 16:33:54 +0000" querystring="...">
<result place_id="1620612" osm_type="node" osm_id="452010817">
135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom
</result>
<addressparts>
<house>135</house>
<road>Pilkington Avenue</road>
<village>Wylde Green</village>
<town>Sutton Coldfield</town>
<city>City of Birmingham</city>
<county>West Midlands (county)</county>
<postcode>B72</postcode>
<country>United Kingdom</country>
<country_code>gb</country_code>
</addressparts>
</reversegeocode>
http://wiki.openstreetmap.org/wiki/Zh-hans:Nominatim

使用Nominatim进行openstreetmap地址搜索/解析的更多相关文章

  1. IP地址库解析——读取IP地址获得实际地理位置信息的java源码实现

    说明:IP地址库来自QQwry.dat数据库文件,通过解析地址库当中的ip,已经细化最后获取的信息:获取ip地址对应的:国家 / 省 / 市 / 运营商ISP信息. 解析主要用到三个类: (1) IP ...

  2. 【转】URL短地址压缩算法 微博短地址原理解析 (Java实现)

    转自: URL短地址压缩算法 微博短地址原理解析 (Java实现) 最近,项目中需要用到短网址(ShortUrl)的算法,于是在网上搜索一番,发现有C#的算法,有.Net的算法,有PHP的算法,就是没 ...

  3. iOS地址编码解析

    - (void)viewDidLoad { [super viewDidLoad]; // 创建地址解析器 self.geocoder = [[CLGeocoder alloc] init]; } - ...

  4. Google搜索解析

    Google搜索解析 是一款相似于Google趋势的SEO 在 线keyword工具,其官方提出的口号是“看看全世界的人们都在搜索些什么”.利用Google搜索解析,能够比較特定区域.类别.时间范围以 ...

  5. GoogleGoogle搜索解析

    GoogleGoogle搜索解析 是一个类似Google趋势SEO 在 线keyword工具.它的正式口号提出“在搜索些什么”.利用Google搜索解析,能够比較特定区域.类别.时间范围以及搜索资源之 ...

  6. 基于PHP的地址智能解析案例-快宝开放平台

    快宝地址智能解析,批量录入收件人.发件人最好的解决方案,广泛应用于快递行业,电商行业,ERP应用等. 一.对接前准备 注册快宝开放平台,获得开发者账号,查看如何注册. 二.对接联调 快宝开放平台支持多 ...

  7. 转:sock_ev——linux平台socket事件框架(uri地址的解析) .

    在第一篇中,已经说明,传递的socket地址采取以下形式: [cpp] view plaincopyprint?stream://192.168.2.10:8080   dgram://192.168 ...

  8. Linux学习笔记(10)linux网络管理与配置之一——主机名与IP地址,DNS解析与本地hosts解析(1-4)

    Linux学习笔记(10)linux网络管理与配置之一——主机名与IP地址,DNS解析与本地hosts解析 大纲目录 0.常用linux基础网络命令 1.配置主机名 2.配置网卡信息与IP地址 3.配 ...

  9. JS寄快递地址智能解析

    JS寄快递地址智能解析--2020年7月15日 去年做了些前端内容,最近在整理一些稍微有点用的内容,比如智能解析地址,用户只要输入:张三1351111111江苏省扬州市广陵区XX小区X楼xxx室,就能 ...

随机推荐

  1. java设计模式之原型模式

    原型模式概念 该模式的思想就是将一个对象作为原型,对其进行复制.克隆,产生一个和原对象类似的新对象.java中复制通过clone()实现的.clone中涉及深.浅复制.深.浅复制的概念如下: ⑴浅复制 ...

  2. hdu1521 排列组合(指数型母函数)

    题意: 有n种物品,并且知道每种物品的数量ki.要求从中选出m件物品的排数.         (全题文末) 知识点: 普通母函数 指数型母函数:(用来求解多重集的排列问题) n个元素,其中a1,a2, ...

  3. 一分钟搞定AlloyTouch图片轮播

      一分钟搞定AlloyTouch图片轮播 轮播图也涉及到触摸和触摸反馈,同时,AlloyTouch可以把惯性运动打开或者关闭,并且设置min和max为运动区域,超出会自动回弹.除了一般的竖向滚动,A ...

  4. inverse

    首先术语inverse 被翻译为反转的意思.inverse 制定了关联关系中的方向. 当set的inverse属性默认情况下,hibernate会按照持久化对象的属性变化来同步更新数据库. 得到两条s ...

  5. POJ 2914 Minimum Cut

    Minimum Cut Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 9319   Accepted: 3910 Case ...

  6. C#.NET 大型企业信息化系统集成快速开发平台 4.2 版本 - 多软件系统集成缓存体系改进

    由于我们同时开发多个大型应用系统同时系统有大量用户.高并发用户,平时访问系统的用户数量就有3万多人在线.需要对几十个系统进行持续优化改进,同时要增强信息系统的各种安全性. 如此多的系统.如此多的用户, ...

  7. StackExchange.Redis 使用-配置

    Configurationredis有很多不同的方法来配置连接字符串 , StackExchange.Redis 提供了一个丰富的配置模型,当调用Connect 或者 ConnectAsync 时需要 ...

  8. ReactNative新手学习之路01-创建项目开始

    新手学习之路01-创建项目开始 小菜鸟准备学习RN开发,决定写下自己的学习历程,方便其他也想要学习RN的人,后期会持续更新写下自己所有学习经历,一步步从菜鸟成长成业内高手.开发环境准备,本文默认环境已 ...

  9. LCS问题

    最长公共子序列问题 1.这里pre数组表示回溯的方式,状态转移方程!!! #include <iostream> #include <algorithm> #include & ...

  10. 网易蜂巢微服务架构:用RabbitMQ实现轻量级通信

    本次分享内容由三个部分组成: 微服务架构与MQ RabbitMQ场景分析与优化 RabbitMQ在网易蜂巢中的应用和案例分享 1微服务架构与MQ 微服务架构是一种架构模式,它将单体应用划分成一组微小的 ...