The page_number is now directly given to the StreetIndex constructor,
which in turn ensures that each IndexItem it creates have it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
The StreetIndex constructor was raising an exception when no street
was found. With the multi-page renderer, it is very possible to have
pages of map without any street or other elements to put in the index,
but for convenience we still want to get a StreetIndex object, even if
its ._categories list is empty.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
The multi-page renderer needs to know on which page each IndexItem has
been found. Therefore, we introduce a new page_number field in the
IndexItem class. This field remains to None for the single page
renderers, and is used to store an integer by the multi-page renderer.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
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.