Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (59 sloc) 2.39 KB
#!/bin/bash
# Configures the environment for TopOSM rendering.
# Change these settings to match your setup.
# Postgres settings
export DB_NAME="gis"
export DB_PORT=5432 # local postgres port
export DB_PREFIX="osm" # prefix for all OSM tables
export DB_USER=`whoami` # username
export CONTOURS_TABLE="contours"
export NHD_TABLE_PREFIX="nhd"
# Data directories
export DATADIR="$HOME/geodata"
export OSM_DATADIR="$DATADIR/osm"
export WORLD_BOUNDARIES_DIR="$OSM_DATADIR/world_boundaries"
export NHD_DIR="$DATADIR/NHD" # NHD shapefiles
export NLCD_DIR="$DATADIR/nlcd2006"
export NED13_DIR="$DATADIR/ned13" # NED 1/3" GeoTIFFs
export HILLSHADE_DIR="$DATADIR/hillshade" # Hillshade GeoTIFFs
export COLORMAP_DIR="$DATADIR/colormap" # Colormap GeoTIFFs
export HYPSORELIEF_DIR="$DATADIR/hypsorelief" # Hillshade with hypsometric tinting
# Output directories
export BASE_TILE_DIR="tile" # output directory
export TEMP_DIR="temp" # preprocessed data and temporary files
# Misc files
export OSM2PGSQL_STYLE_FILE="/usr/share/osm2pgsql/default.style"
export COLORFILE="`pwd`/colors.txt" # elevation-to-color mapping
# Extra TrueType fonts directory for Mapnik
# (this can be left blank)
export EXTRA_FONTS_DIR="/usr/share/fonts/truetype"
# Render settings
# NOTE: Apparently the Cairo backend is not thread safe (because,
# it turns out, cairo/pixman is not, so let's leave this at 1 for now...
export RENDER_THREADS=1 # typically equal to # of cores
export TILE_SIZE=256
export BORDER_WIDTH=128
export ERROR_LOG="errors.log"
# Mapnik layers to cache after rendering and reuse as needed. Comma-separated
# list. e.g. CACHE_LAYERS="contours,landcoverrelief"
export CACHE_LAYERS=""
# Quality setting for combined JPEG layer
export JPEG_QUALITY=90
# The area we're interested in
# (this setting limits both import and rendering)
# E.g. Conterminous US: "-127,23,-65,51"
export XMINLL=-127
export XMAXLL=-65
export YMINLL=23
export YMAXLL=51
export EXTENTS_LATLON="$XMINLL,$YMINLL,$XMAXLL,$YMAXLL"
export EXTENTS_MERCATOR="-20037508,-19929239,20037508,19929239"
# Enable/disable extra debug/diagnostic messages during rendering
export TOPOSM_DEBUG=1
# Used to check that the env is set. Don't modify.
export TOPOSM_ENV_SET=1
# Use the local (patched) mapnik
# NOTE: Change PYTHONPATH to your python version
LOCAL_MAPNIK_PREFIX="$HOME"
export LD_LIBRARY_PATH="$LOCAL_MAPNIK_PREFIX/lib"
export PYTHONPATH="$LOCAL_MAPNIK_PREFIX/lib/python2.7/site-packages"