Wykres commitów

620 Commity (9cdd71e30ab0433d23594e72a39dba1d7afc2ec5)

Autor SHA1 Wiadomość Data
Thomas Petazzoni b83e4e180e MultiPageStreetIndexRenderer: reduce size of default font
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni 8d3e07b148 MultiPageStreetIndexRenderer: remove debugging background rectangle
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni 72c8552dc3 indexlib: add min_drawing_width() method
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni 637af377d5 index for multi-page: improve page_number handling
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>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni dfedd44691 multi-page: in the street index, start page numbering at 1
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni 44bccb3e8c indexlib: properly differentiate the page_number=None and page_number=0 cases
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni dd71db9dc4 multi-page: remove multiple debugging outputs
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:22 +02:00
Thomas Petazzoni 5a3d51c80c multi-page: add index rendering with a new MultiPageStreetIndexRenderer class
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 42522fa968 indexlib: render page number as part of the street/amenity location
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni cda1e16280 multi-page: prepare data for index generation
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>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni be146e3a76 renderers: pass the db connection to the Renderer class constructor
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>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 40fbac09b5 indexlib: villages section is not of street type
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni a3adba5d85 indexlib: do not raise exception when index is empty
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>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 042c127756 indexlib: add page_number to IndexItem
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>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 3012e2178b multi-page: add grid and grid labels
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 54ed6cf3d5 multi-page: differentiate overlap margin and grayed margin
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 5a9e85ffc1 multi-page: show page number at the bottom of each page
The rendering is quite crude at the moment. Improvements later.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni f4eb723eef multi-page: add a shape file that greys out the overlayed area between pages
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 5ea2f4f4e4 coords: add BoundingBox::as_javascript() method
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>
2012-03-30 13:04:21 +02:00
Thomas Petazzoni 5dc89bfd58 Initial version of a multi-page renderer
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>
2012-03-30 13:04:20 +02:00
Gael UTARD e5daf37d16 Indexer: capitalize each letter in index
Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
2012-03-30 13:02:41 +02:00
Gael UTARD 99f1adb1cf i18n: add some french appelations
Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
2012-03-30 13:02:27 +02:00
David MENTRE 78566a5706 Print used Mapnik map scale in debug logs
Signed-off-by: David MENTRE <dmentre@linux-france.org>
2012-03-30 11:56:06 +02:00
Thomas Petazzoni 6b64fdb295 Minor fixup for the scaling removal patch
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
2012-03-30 10:37:44 +02:00
Gael UTARD bec711df89 Remove the scaling step from the rendering process
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>
2012-03-30 10:21:23 +02:00
Frederic Daniel Luc Lehobey 8951eda9f6 Fix the name of ocitysmap configuration file.
Signed-off-by: Frederic Daniel Luc Lehobey <Frederic@Lehobey.net>
2012-03-30 10:16:27 +02:00
Frederic Daniel Luc Lehobey a1a30d2982 Simpler INSTALL for MapQuest stylesheet
Signed-off-by: Frederic Daniel Luc Lehobey <Frederic@Lehobey.net>
2012-03-30 10:16:25 +02:00
Gael UTARD a5fdf509c4 Set a solid white map background
The transparent background is rendered with grey by some softwares.

Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
2012-03-30 10:15:09 +02:00
David MENTRE bcda56a873 Update INSTALL for B&W stylesheet
Signed-off-by: David MENTRE <dmentre@linux-france.org>
2012-03-30 10:14:01 +02:00
David MENTRE 1bab38f92f Allow smaller fonts for street names
* 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>
2012-03-30 10:13:04 +02:00
David MENTRE 5e1e3aa695 Put parking and residential area borders in black
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:13:02 +02:00
David MENTRE 57f7c3490c Bug fix: keep blue color for see areas
* 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>
2012-03-30 10:13:01 +02:00
David MENTRE 903453b813 Remove all turn circles
* 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>
2012-03-30 10:12:59 +02:00
David MENTRE d918dcdc21 Use a maposmatic's specific icon for cemetery
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:12:57 +02:00
David MENTRE 2b337a69ff Increase size of motorways
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:12:56 +02:00
David MENTRE 43d84121a6 Put public buildings in light grey with black border
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:12:54 +02:00
David MENTRE 3c9525e4be Put a light grey as default background
* 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>
2012-03-30 10:12:52 +02:00
David MENTRE 6a98362312 Enlarge bridges to make them more visible
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:12:51 +02:00
David MENTRE 399831e012 Put road casing in bold black
Signed-off-by: David MENTRE <dmentre@linux-france.org>
2012-03-30 10:12:48 +02:00
David MENTRE ea7e4709e8 Buf fix: remove yellow halo around secondary roads
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sylvain Collilieux <sylvain@collilieux.net>
2012-03-30 10:12:46 +02:00
David MENTRE 4ebd3f7538 Keep only stylesheet parts needed for zoom level 16 2012-03-30 10:12:43 +02:00
David MENTRE a0b0f408a2 Remove some details. Put all roads in white
* 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.
2012-03-30 10:12:41 +02:00
David MENTRE 0ddfa9ae92 Import of original mapnik-osm style sheet 2012-03-30 10:12:20 +02:00
Sylvain Collilieux 4a5ccc7aa4 Update INSTALL file regarding a debian bug on ttf fonts 2012-03-30 10:08:55 +02:00
Thomas Petazzoni 1f115962da ocitysmap2: show OSM data last update timestamp on rendered maps
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>
2012-03-25 21:11:16 +02:00
Thomas Petazzoni 1cff9bae39 ocitysmap/support: add support for storing the age of the OSM data
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>
2012-03-25 18:19:16 +02:00
Thomas Petazzoni 6a6a3f57b5 Add new planet-update.sh script
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>
2012-03-25 18:02:54 +02:00
Thomas Petazzoni 815452bf12 Remove unused planet-update-daily.sh script
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>
2012-03-25 17:58:38 +02:00
Étienne Loks 01b7253e07 Index improvment: group locations whith the same name and the same position 2012-03-25 17:55:42 +02:00
Thomas Petazzoni c5a0813d6b Merge remote-tracking branch 'dmentre/villages' 2012-03-25 13:40:52 +02:00