POI tools

From OpenStreetMap Wiki
Jump to navigation Jump to search

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.


FAQ

  • 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.

Internationalization

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

Address

Problem: formatting is different in many countries


POI presentation

OpenLayers

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


HTML lists

WMS

kthmllib

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

Development

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

node

Will always be a Point.

way

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?

relation

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/

Geocoding

  • 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

http://www.netzwolf.info/kartografie/osm/j/opening_hours.js


other ideas

  • WMS
  • static lists with pyv8

Bug tracker

https://bugs.launchpad.net/osm-poi-tools/

Source code

http://gitorious.org/osm-poi-tools