Mapnik 2.1: update INSTALL and get rid of DeprecationWarning

As of mapnik commit 14700dba16146902ca98fdcacb72b2fba4fa596a,
using 'import mapnik2' raises a DeprecationWarning.
See https://github.com/mapnik/mapnik/issues/941 for details.

Update imports of the mapnik module to use 'import mapnik' and assert
that the installed version is new enough.

We need mapnik 2.1.0 (or at least a version newer than 2.0.0
that supports placement-type="simple") for the Printable Stylesheet,
as per David's suggestion. Thomas pointed out that having the note
in all files was overkill, this patch takes that into account.

Also update INSTALL with instructions on how to build Mapnik from Git
and which specifically tested commit to use if the latest version
doesn't work.

CC: thomas.petazzoni@enix.org
CC: dmentre@linux-france.org
CC: maxime.petazzoni@bulix.org
Tested-by: Jeroen van Rijn <jvrnix@gmail.com>
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
Updated Italian translation

Sent off as patch against current head on behalf of Simone Cortesi.

Signed-off-by: Simone Cortesi <simone@cortesi.com>
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
Updated Norwegian translation

An updated translation for Bokmål (nb-NO) and a new Nynorsk (nn-NO) translation based on the nb-NO translation.
Fixes https://savannah.nongnu.org/bugs/?35372

All credit goes to Guttorm Flatabø <post@guttormflatabo.com>
Patch to MapOSMatic/www/settings.py to add Nynorsk and credit Guttorm to follow shortly.

Signed-off-by: Guttorm Flatabø <post@guttormflatabo.com>
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
Take margins into account when computing sizes for single page

Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
Fix scale computations to ensure a minimum zoom level

Signed-off-by: Gael UTARD <gael.utard@kisis.fr>
Add Norvegian languages

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Fix typo in previous commit

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Small fix in i18n.py for nynorsk

While I'd forgotten to add the norwegian languages to i18n, Thomas's patch to do so contained a typo. This fixes that typo.

Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
CC: Thomas Petazzoni <thomas.petazzoni@enix.org>
Fix minor formatting issue in de translation

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Bug fix: Don't correct with latitude for multi-page renderer

In case of multi-page renderer, we are using Mapnik projection functions
to convert from (lat,lon) to meters and vice-versa. Therefore, contrary
to single page renderer, we don't need to take into account current
latitude, as Mapnik is doing this for us.

Signed-off-by: David MENTRE <dmentre@linux-france.org>
Document and provide a patch on MapQuest stylesheet

[Thomas: add similar fix for UK stylesheet]
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Shorter German translations in ocitysmap.po

To address bug #36166, the translation for Public Building(s) is
replaced with the more literal 'Gebäude(n)', which is slightly
shorter.  Similarly for Education, which was translated as
'Educational institutions', it is replaced this with a more literal
(and shorter) Education -> Bildung.

Of course it doesn't fix the bug, as such, but may help create a
better index on German maps until the bug is fixed properly.

Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
Bug fix: CSV file should be generated *after* applying the grid

* The CSV file should be generated after calling apply_grid() method
  which updates the grid location of each label.

Signed-off-by: David MENTRE <dmentre@linux-france.org>
Add the jobid in the temp directory prefix

This is committed only for debugging purposes, to help us investigate
the file descriptors leak problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Fixup syntax typo in previous commit

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Add the jobid in the temp directory prefix

This is committed only for debugging purposes, to help us investigate
the file descriptors leak problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
Revert "Add the jobid in the temp directory prefix"

This reverts commit 1b2cfcbcd8884bd817b2a810efd61bb64aaa5ec1.
Revert "Fixup syntax typo in previous commit"

This reverts commit c10e75b14773ee41e24a4adbbc3bf6a2da09a500.
Revert "Add the jobid in the temp directory prefix"

This reverts commit 668b02ae936f5723028b99b3b1e082acd03b132d.
Fix GEOS Intersection error when dealing with malformed ways

In concerned SQL queries this patch apply a 0-buffer to malformed ways.
As malformed ways seem pretty uncommon and as this operation is heavy
for performance issue the query is first run without the 0-buffer and
is re-run with it if the query fails.

With PostGIS 1.5 the failure message is not explicit so we can only
catch the generic psycopg2.InternalError.