File: mapnik_settings.py

package info (click to toggle)
python-mapnik 1%3A0.0~20200224-7da019cf9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,036 kB
  • sloc: python: 12,085; cpp: 5,718; sh: 101; makefile: 16
file content (14 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os

mapnik_data_dir = os.path.dirname(os.path.realpath(__file__))

env = {}
icu_path = os.path.join(mapnik_data_dir, 'share', 'icu')
if os.path.isdir(icu_path):
    env['ICU_DATA'] = icu_path
gdal_path = os.path.join(mapnik_data_dir, 'share', 'gdal')
if os.path.isdir(gdal_path):
    env['GDAL_DATA'] = gdal_path
proj_path = os.path.join(mapnik_data_dir, 'share', 'proj')
if os.path.isdir(proj_path):
    env['PROJ_LIB'] = proj_path