-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Osgende is yet another framework for processing OSM data. It was mainly developed for use with Waymarked Trails but may prove useful for other applications as well.
There are a number of other processing software for OSM out there. They can be put into one of two categories: either they process the OSM data as a whole (like osm2pgsql) or filter interesting data and throw away the rest (like Imposm or Osmium).
Osgende follows a slightly different philosophy. It expects that the entire planet already lives in a database and then creates and updates derivative databases from this. There are a number of advantages to this approach:
- Access to complete OSM data In contrast to frameworks like Imposm or Osmium, the entire OSM data is available in a database and can be accessed comfortably via SQL. This allows analysing OSM data during development and also keep rarely used data out of the derivative tables, keeping them small.
- Small derivative tables Arbitrary filtering with SQL allows keeping the data tables as small as possible. This speeds up map rendering and interactive applications because tables can be held in memory even on smaller machines.
- Fast and flexible database updates The update of the planet database is very fast when no processing is necessary. For example, the daily update of the hiking site takes less than an hour. Because postprocessing is confined to derivative tables, it is restricted to the absolutely necessary minimum.
- Powerful postprocessing Instead of being restricted to the rather limited data filtering capabilities of Mapnik, derivative tables can be processed using the power of a full programming language.
- Multiple projects One planet database can be use for many different derivative tables that can be, but need not be related. This means that it is simple to host many different special interest projects on the same server.
Osgende provides the basic functionality to implement this schema:
There is a basic import script that allows you to import and update OSM data into the planet database. However, Osgende was designed to also happily work with planet databases produced with the osmosis postgresql-snapshot schema.
In Osgende each derived table is implemented by one class. If you know the Django web framework then you are familiar with the concept. By convention, each class should implement three functions: construct (to create a new table), create (to create data from scratch), update (to bring data up to date).
Osgende provides base classes for common cases, like collecting nodes with a certain tagging or creating polygons.
Finally, there is a script that allows to update tile stores using Mapnik. This is especially useful for spare maps like overlays where off-line rendering is feasible.
Note: support for on-demand renderers like renderd or tirex is planned but not yet possible.