[OSM-dev] idea: before-after map

Peter Körner osm-lists at mazdermind.de
Mon Dec 5 17:46:43 GMT 2011

Am 05.12.2011 18:08, schrieb Martijn van Exel:
> Hi,
> Now that we have the history files and a history renderer in the
> making [1] it would be possible to create a Before / After service:
> user would select one or a few concurrent changesets comprising an
> edit session, and the service would churn out a pretty HTML page with
> a static map of the area just prior to the changesets affecting the
> area and just after the last ones were closed.
> I was just wondering how difficult / feasible this would be to
> implement. Do we even need Peter's renderer for it?

You could use the database and the valid_from / valid_to processing used 
in the views to get the before/after state and do whatever you want (ie 
compare version & minor version to find affected items).

Just use this clause in your where-statement to get all items at this 
point in time:
'2010-01-01' BETWEEN valid_from AND COALESCE(valid_to, '9999-12-31')

Take a look at render.py to see how it's used.

> [1] https://github.com/MaZderMind/osm-history-renderer


More information about the dev mailing list