Use the new get_compatible_output_formats() method to reject the
unsupported output formats depending on the selected rendering layout.
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>
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.