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>
Using StreetIndex, we build an index for each page of the map, and
then with various sorting and grouping tricks, we merge those indexes,
categories by categories. This will allow to generate the index with
data that is properly sorted.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
For the multi-page renderer, we need a reference to the GIS database
connection in order to build custom indexes for each page of the
map. Therefore, we modify the Renderer constructor so that it takes as
argument a reference to the database connection.
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>
This method returns a string containing a bit of Javascript code that
is useful to render the Bounding Box with the Leaflet Javascript
code. It allows to quickly have a graphical representation of multiple
bounding boxes on a slippy map. This is very useful to understand if
the computations done on bounding boxes are correct.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
So far, it only outputs the map, split on several pages, with no grid,
no index, no page number. Only the raw maps.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
There are 2 kinds of problems with scaling:
- the rendering has some bugs (position of arrows, text halo)
- the rendered sizes (font size, road width) do not match the ones specified
in the stylesheet
Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
* Use advanced features of Mapnik2's TextSymbolizer to reduce size of
street names if possible. This allows to display more street names,
even if all of them are not displayed.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
* This reverts commit 39f3f8b401d02d05becfdfc60d97f0c31df55eec.
* We use a very light grey for "coast-poly" filling.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
* Turn circles are made with bitmaps (two per turn circle, one for
casing and one for fill). It would be too heavy to redo all the work
for bigger roads and different colours. We thus simply remove
them. The map is still clean and readable.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
* Remove "coast-poly" style that was putting default colors within
cities.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
* Update .gitignore file to ignore generated inc/*.inc files.
* In landcover layer, remove colored polygons to avoid grey zones in
urban areas.
* In landcover layer, display townhall, police, etc. amenities names on
the map.
* Remove building and power layers.
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>