POI tools

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — POI tools
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen Kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk bokmål norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

The POI tools project is a collection of tools around Points of Interest. It is open source, the source code is available at http://gitorious.org/osm-poi-tools and Gentoo ebuilds were available. This is the main documentation page with further references.

Inactive project. Parts of this project are reused or replaced by OSMCouch.

The server side is based on MonetDB as DBMS, Sphinx as search engine and Django as web framework. See also #Used_software in the development section. The database schema is described at MonetDB/Schema, data import and diff updates are described at POI_tools/Importer. The API is documented at POI tools/API.

See POI_tools/Installation for installation instructions.


  • How to make requests for things like ((amenity=pub) AND (microbrewery=yes)) or ((amenity=restaurant) AND (cuisine=italian))?
    The /API supports simple requests (one key-value pair), you may filter the result yourself. Or you use DBSlayer for advanced queries.
  • What about a restaurant tagged "cuisine=italian;french"? (Semi-colon value separator)
    Values are split at semicolon, resulting in two tags. Whitespace will be considered part of the value, please do not add whitespace. The output will be all values joined by semicolon.

Smoothening output

Different tags might be used for the same information. They could be converted to the tag that makes most sense. Done in the /Importer. Dropping tags like created_by, source, tiger:tlid.

Human readable tag formatting

Done in Javascript for easy reuse in other applications. Create static lists for relations (like cities) server-side, using Google's V8 engine.


  • prefix, suffix, i.e. "hotel <name>"
  • use Nominatim prefix translations


Problem: formatting is different in many countries

POI presentation


Based on OpenLayers.Layer.Vector, OpenLayers.Format.GeoJSON or other formats, OpenLayers.Strategy.BBOX, OpenLayers.Strategy.Cluster.

HTML lists



khtmllib's author is interested in displaying POIs. Finish Openlayers example and contact him afterwards.


This project was one of the accepted projects for GSoC 2010.

Used software

Data import

See POI tools/Importer

Data update

Also done by the importer, using diff files, fetching diffs via Osmosis.

Geometry converter


Will always be a Point.


Usually ways are LineStrings. Some ways might be Rings (closed way), some might be Polygons (closed way that makes an area).

Just try to build a polygon will exclude the Ring case. Find out by tag (see area elements in Map Features)? Or just try to build a polygon except for Ring tags and return LineString if it fails?


Relations can be Multipolygons, FeatureCollection (like the associatedStreet relation) or no geometry at all. (Missed some case? Tell me.)

Relation:multipolygon support: If tag type=multipolygon exists, follow Relation:multipolygon/Algorithm.

Future Features

Server side clustering

Have a look at OpenGastroMap source code.

Heatmap example

Use http://blog.felipebarriga.cl/olheatmap_demo/


  • Return timezone, country, city for given longitude, latitude
  • Return nearby streets and distance

Idea: use multiple SpatiaLite files:

  • timezones
  • countries
  • $country/cities
  • $country/postcodes
  • $country/$city/streets
  • $country/$city/housenumbers

The last two could also be done on the live DB.

opening hours parser


other ideas

  • WMS
  • static lists with pyv8

Bug tracker


Source code