Cleanup some of the variable definitions, add -C 5000 by default to the
osm2pgsql process to benefit from better cache hit rate, and fix logging
and output of the maposmatic_admin table update.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Renamed ocitysmap2-render as render.py since we don't need/want
"ocitysmap2" in the name anymore. Rename conf template as
ocitysmap.conf.dist for the same reason. Updated INSTALL instructions
accordingly.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
In ocitysmap2/__init__.py:_get_geographic_info(), when one is looking in
the database, the returned "records" can be "[(None,)]". In that case
wkt obtains value None, which breaks the "shapely.wkt.loads(wkt)" call.
We add a protection against that.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Due to the order of spanish determinants, a street such as "Calle de
los Huertos" was indexed under "los Huertos (Calle de)" instead of
"Huertos (Calle de los)". Same problem for "de la" or "de las". By
reordering the determinants so that the most specific ones are
considered first, we can achieve the desired behaviour.
See
http://www.maposmatic.org/rendered//046017_2012-04-27_11-51_MirafloresdelaSierraSpain.png
for an example of many current problems.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
As the changes in the base stylesheet begins to be heavy, specific
stylesheets files have been created. Reference files (labels.mms for
labels-ocitysmap.mss and style-toner-standard.mml for
style-toner-ocitysmap.mml) have been added to ocitysmap repository to
track changes on the toner main repository.
style-toner-ocitysmap.mml and labels-ocitysmap.mss have been updated
to display names of localities, hamlets and villages.
INSTALL instructions have been updated.
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.
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>
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>
* 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>
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>
[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>
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>
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>
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>
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>
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>