博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用Nominatim进行openstreetmap地址搜索/解析
阅读量:6699 次
发布时间:2019-06-25

本文共 5169 字,大约阅读时间需要 17 分钟。

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

本页面提供了使用说明。要了解关于Nominatim如何工作的细节请查看以及这个。这里还有一个关于和的列表。

搜索

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

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

这两个搜索都会得到结果: 

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

门牌号码已经被定义了的区域,可以使用:

特殊的关键词

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

参数

?
?
format=[html|xml|json|jsonv2]   Output format
json_callback=
Wrap json output in a callback function (JSONP) i.e.
(
)
accept-language=
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 string to search for. Alternatively can be entered as:
street=
city=
county=
state=
country=
postalcode=
(experimental) Alternative query string format for structured requests. Structured requests are faster and require less server resources. DO NOT COMBINE WITH q=
PARAMETER.
countrycodes=
[,
][,
]... Limit search results to a specific country (or a list of countries).
should be the ISO 3166-1alpha2 code, e.g. gb for the United Kingdom, de for Germany, etc.
viewbox=
,
,
,
or viewboxlbrt=
,
,
,
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=
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=
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=
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.

示例

 
135
Pilkington Avenue
Wylde Green
Sutton Coldfield
City of Birmingham
West Midlands (county)
B72
United Kingdom
gb

反向地理编码/地址查询

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

参数

?
format=[xml|json]   Output format
json_callback=
Wrap json output in a callback function (JSONP) i.e.
(
)
accept-language=
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=
A specific osm node / way / relation to return an address for Please use this in preference to lat/lon where possible
lat=
lon=
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=
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.

示例

 
135, Pilkington Avenue, Wylde Green, City of Birmingham, West Midlands (county), B72, United Kingdom
135
Pilkington Avenue
Wylde Green
Sutton Coldfield
City of Birmingham
West Midlands (county)
B72
United Kingdom
gb
http://wiki.openstreetmap.org/wiki/Zh-hans:Nominatim

转载地址:http://gfmoo.baihongyu.com/

你可能感兴趣的文章
如何成为“10倍效率”开发者
查看>>
谈判高手子贡---引导“用户”的专家
查看>>
我的友情链接
查看>>
(一)prometheus与grafana介绍与安装
查看>>
GLSL学习笔记
查看>>
我的友情链接
查看>>
关于我
查看>>
PowerShell变量——PowerShell三分钟(七)
查看>>
安装perl5.10.0
查看>>
【学习笔记】在storyboard中给TabViewController添加tab页面
查看>>
注册广播
查看>>
Mybatis 拦截器介绍
查看>>
我的友情链接
查看>>
oracle中游标的使用
查看>>
4月26日作业
查看>>
我的友情链接
查看>>
SRV记录注册不成功的可能的原因
查看>>
java的自动类型转换和强制类型转换
查看>>
如何循环遍历document.querySelectorAll()方法返回的结果
查看>>
linux输出文字的颜色特效
查看>>