Pt-br:Nominatim

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Deutsch English Français 한국어 Português do Brasil Русский


O Nominatim (do Latim, 'por nome') é uma ferramenta de busca de nomes e endereços nos dados do osm, e que efetua resolução de nomes de ruas para pontos no OSM (em inglês: 'reverse geocoding'). Ele pode ser encontrado em http://nominatim.openstreetmap.org. O Nominatim também é usado como uma das fontes da caixa de Busca na Página Inicial do OpenStreetMap.

Este documento mostra instruções de como usá-lo. Para detalhes de como o Nominatim funciona, por favor veja a Apresentação para Desenvolvedores e este pequeno FAQ.

Se você encontrar problemas com os resultados da busca, por favor nos ajude por enviar um caso de teste (via este link ou por enviar um bug pelo trac. Veja também as notas da Versão 2.

Contents

Busca

Nominatim indexes named (or numbered) features with the OSM data set and a subset of other unnamed features (pubs, hotels, churches, etc)

Search terms are processed left to right so

pilkington avenue, birmingham

will work, and

birmingham, pilkington avenue

will fail. Commas are optional but improve performance by reducing the complexity of the search so

pilkington avenue birmingham

will succeed. Where house numbers have been defined for an area they will be used:

135 pilkington avenue, birmingham

Palavras-chave especiais

Various keywords are translated into searches for specific osm tags (i.e. Pub => amenity=pub). A current list of special phrases processed is available.

parâmetros

 http://nominatim.openstreetmap.org/search?<params>
 http://nominatim.openstreetmap.org/search/<query>?<params>
 format=[html|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.
 q=<query>
   Query string to search for.  Alternatively can be entered as:
 viewbox=<left>,<top>,<right>,<bottom>
 or viewboxlbrt=<left>,<bottom>,<right>,<top>
   The preferred area to find search results
 polygon=[0|1]
   Output polygon outlines for items found
 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.

Exemplos

 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>

Geocodificação reversa / Busca de endereços

Reverse geocoding generates an address from a latitude and longitude. The optional zoom parameter specifies the level of detail required in terms of something suitable for an openlayers zoom level.

Parâmetros

 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.

Exemplo

 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>

Detalhes / Redator

Currently the details page creates a high load on the server and is only intended as a debugging aide, as a result no xml api is currently provided. Scraping or heavy use is likely to result in an IP ban.

Política de uso

Please be aware that data provided by Nominatim is based on OpenStreetMap data and is licenced CC-BY-SA although small extractions are likely to be covered by fair usage / fair dealing. Please provide attribution suitable for your medium.

Developers making use of the API must ensure that the application includes a valid User-Agent identifying the application (please note - this means the application being used, not pretending to be a common web browser, really, we can tell). Where possible please include contact details in your User-Agent string. If you are unable to modify your User-Agent string include contact details as an extra parameter in your request (i.e. email=whatever@test.org).

If you are sending in large numbers of requests it is particularly important that we have some way of contacting you - otherwise, in the event of problems, the only alternative is to ban your IP and wait for you to contact us.

Bulk geocoding is NOT encouraged and applications making heavy use of the API may be blocked to preserve functionality for all users. Unless pre-arranged please limit your requests to a single thread and an absolute maximum of 1 request per second and avoid running your application between 1a.m. and 8a.m. (GMT). To avoid having your access blocked, please discuss your requirements with the IRC channel or with a System Administrator prior to starting.

ATUALIZAÇÃO

I'm currently testing code to automatically rate limit heavy users when the server is busy or doing updates. Various known users have been white listed.

Código-fonte

Nominatim is based around the postgresql import utility osm2pgsql using the alternative gazetteer output option. The source for osm2pgsql can be obtained here:

http://svn.openstreetmap.org/applications/utils/export/osm2pgsql

Indexing and search are performed using a combination of c, plpgsql and php. The source for this can be found here:

http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/gazetteer/

Full installation instructions can be found in the README.txt

Relatório de erros ou bugs

The Nominatim is maintained by Twain, please report bugs using the Nominatim component in Trac.

Personal tools
Namespaces
Variants
Actions
site
Toolbox