[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Maposmatic-dev] [PATCH] Allows to specify non-default ocitysmap con
From: |
Thomas Petazzoni |
Subject: |
Re: [Maposmatic-dev] [PATCH] Allows to specify non-default ocitysmap config file |
Date: |
Mon, 28 Sep 2009 20:20:06 +0200 |
Thanks, pulled and pushed!
Le Wed, 23 Sep 2009 11:28:37 +0200,
David Decotigny <address@hidden> a écrit :
> From: David Decotigny <address@hidden>
>
> By default, the maposmaticd daemon was reading the default ocitysmap
> configuration (~/.ocitysmap.conf or /etc/...). This patch allows to
> specify a path to another ocitysmap config file from within
> settings_local.py.
> ---
> scripts/maposmaticd | 4 ++--
> www/settings_local.py.template | 5 ++++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/maposmaticd b/scripts/maposmaticd
> index 25c904d..f6bf1a7 100755
> --- a/scripts/maposmaticd
> +++ b/scripts/maposmaticd
> @@ -26,7 +26,7 @@ import time, os , sys, select, signal, traceback,
> logging from datetime import datetime, timedelta
>
> from www.maposmatic.models import MapRenderingJob
> -from www.settings import RENDERING_RESULT_PATH, LOG,
> RENDERING_RESULT_FORMATS, RENDERING_RESULT_MAX_SIZE_GB +from
> www.settings import RENDERING_RESULT_PATH, LOG,
> RENDERING_RESULT_FORMATS, RENDERING_RESULT_MAX_SIZE_GB,
> OCITYSMAP_CFG_PATH from ocitysmap.coords import BoundingBox as
> OCMBoundingBox from ocitysmap.street_index import OCitySMap import
> Image @@ -40,7 +40,7 @@ def render_job_process(job): if
> job.administrative_city == "": bbox =
> OCMBoundingBox(job.lat_upper_left, job.lon_upper_left,
> job.lat_bottom_right, job.lon_bottom_right)
> - renderer = OCitySMap(boundingbox=bbox)
> + renderer = OCitySMap(config_file=OCITYSMAP_CFG_PATH,
> boundingbox=bbox) else:
> renderer = OCitySMap(city_name=job.administrative_city)
>
> diff --git a/www/settings_local.py.template
> b/www/settings_local.py.template index 6878aa5..4817041 100644
> --- a/www/settings_local.py.template
> +++ b/www/settings_local.py.template
> @@ -38,6 +38,9 @@ DATABASE_PASSWORD = 'test' # Not used with
> sqlite3. DATABASE_HOST = 'localhost' # Set to empty
> string for localhost. Not used with sqlite3. DATABASE_PORT =
> '' # Set to empty string for default. Not used with
> sqlite3. +# Path to ocitysmap's config file to use, or None for the
> default in ~/ +OCITYSMAP_CFG_PATH = None
> +
> RENDERING_RESULT_PATH = '/tmp/direc/tory'
> RENDERING_RESULT_URL = 'http://host.name/dir/ec/tory'
> RENDERING_RESULT_FORMATS = ['png', 'svg', 'pdf']
> @@ -55,4 +58,4 @@ BASE_BOUNDING_BOX = (51.956, -7.838, 41.458, 11.937)
>
> # Maximum length of the bounding box to be rendered. This length is
> # checked in both directions (longitude and latitude)
> -BBOX_MAXIMUM_LENGTH_IN_METERS = 20000
> \ No newline at end of file
> +BBOX_MAXIMUM_LENGTH_IN_METERS = 20000
--
Thomas Petazzoni http://thomas.enix.org
Promouvoir et défendre le Logiciel Libre http://www.april.org
Logiciels Libres à Toulouse http://www.toulibre.org
signature.asc
Description: PGP signature