We use the maposmatic_admin table that is now part of the GIS database
and updated by the planet-update.sh script to show the timestamp of
the OSM data on rendered maps. If this table does not exist, we
gracefully fallback to an "unknown" timestamp, so that the rendering
doesn't fail.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
This commit creates a new maposmatic_admin table, which contains a
single column and a single entry, used to store the age of the OSM
data that is currently inside the GIS database. This table is located
on the GIS database side (and *NOT* on the Django database side).
This table must be created once on the GIS database by running the
setup-maposmatic-admin.sql.
This table is then updated by the planet-update.sh script every time
it completes an update of the OSM data. System administrators of the
production and development servers are therefore now requested to use
the planet-update.sh script for the OcitySMap repository on the
servers, and to replicate on the Git repository any change done on
those scripts.
The contents of this table will be used by later commits to show the
replication lag on the MapOSMatic.org website and the date of the OSM
data on the generated maps.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
This script is, unmodified, the script currently used on
gis.maposmatic.org to update our planet regularly with the official
OSM database.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
We now use 15-minutes diff to update our database, thanks to another
script. Remove this old, unused script.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Add a --orientation={portrait,landscape} command-line flag to control
the paper orientation of the rendering with ocitysmap2-render.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Instructions for Ubuntu Lucid are now valid for Debian unstable too, so
move the INSTALL.lucid file as main INSTALL file and removed the other
two.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
This documents following final setup:
- postgis 1.5.3 from ubuntugis-unstable PPA
- mapnik 2.0.0 with libboost 1.46 from thomasjj PPA
Tested:
- CLI frontend
- maposmatic web frontend
Signed-off-by: David Decotigny <d2@maposmatic.org>
Note:
On my setup, Chinese characters are not rendered correctly (boxes).
Tested:
- CLI frontend
- maposmatic Web
Revised-by: David Decotigny <d2@maposmatic.org>
Reviewed-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Signed-off-by: David Decotigny <d2@maposmatic.org>
Some OSM Ids such as 365634 have several entries in the polygon/line
tables. The original maposmatic code crashed because it assumed only
one entry was in the DB, and the ocitysmap code only considered the
1st entry returned by postgis.
This patch allows to work on the union of all the areas returned by
the polygon and line tables.
It adds another dependency: shapely. This allows to call libgeos
functions from within python. This also calls for some code
refactoring (=> TODO): the coords et al. API should be replaced by the
plain shapelib API
(http://gispython.org/shapely/docs/1.2/manual.html).
Split the renderers.py file info:
- renderers.py: the layour registry
- abstract_renderer: the ABC for a renderer
- singe_page_renderer: 3 classes to render into a single page
Implemented ocitysmap2-render command-line frontend. Tested it on
Chevreuse (OSM ID -943886) with many possible cmdline option
combinations. Default layout is now map with index at bottom.
New maplib (map creation routines), indexlib (index creation routines)
and layoutlib (page layout & rendering) structure. Besides moving
files around, a new layoutlib.commons module has been create to host
the mm to/from pt conversion routines.