Skip to content

Commit

Permalink
Added colorrelief test layer for VRT and overviews.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Ahlzen committed Sep 17, 2011
1 parent e42c466 commit a7a630a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
5 changes: 3 additions & 2 deletions generate_colorrelief_include
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

#DATADIR="./geodata/us/hillshade"
DATADIR="./geodata/colorrelief"
#DATADIR="./geodata/colorrelief"
DATADIR="$HILLSHADE_DIR"

#SRS="+proj=latlong +datum=NAD83 +ellps=GRS80 +no_defs"

Expand All @@ -18,7 +19,7 @@ for X in `seq $EAST $WEST`; do for Y in `seq $SOUTH $NORTH`; do
# TOP=$Y
# BOTTOM=$((Y-1))

TILENAME="$DATADIR/$TILE.png"
TILENAME="$DATADIR/$TILE.tif"
if [ -f "$TILENAME" ] ; then
#echo "<Layer name=\"${TILE}_cr\" status=\"on\" srs=\"$SRS\">"
echo "<Layer name=\"${TILE}_cr\" status=\"on\" srs=\"&srs900913;\">"
Expand Down
2 changes: 1 addition & 1 deletion set-toposm-env
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ export TOPOSM_ENV_SET=1
# Use a local, patched mapnik2:
LOCAL_MAPNIK_PREFIX="$HOME"
export LD_LIBRARY_PATH="$LOCAL_MAPNIK_PREFIX/lib"
export PYTHONPATH="$LOCAL_MAPNIK_PREFIX/lib/python2.6/site-packages"
export PYTHONPATH="$LOCAL_MAPNIK_PREFIX/lib/python2.7/site-packages"

20 changes: 19 additions & 1 deletion templates/colorrelief.xml.templ
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

<Map background-color="&landcolor;" srs="&srs900913;">

<!-- TEST STYLE -->
<Style name="hillshade">
<Rule>
<RasterSymbolizer scaling="bilinear" />
</Rule>
</Style>


<!-- Full-resolution color relief -->
<Style name="colorrelief">
<Rule>
Expand Down Expand Up @@ -44,8 +52,18 @@
</Rule>
</Style>


<!--
&colorrelieflayers;
-->

<Layer name="hillshade" status="on">
<StyleName>hillshade</StyleName>
<Datasource>
<Parameter name="type">gdal</Parameter>
<Parameter name="file">geodata/hillshade-overviews/hillshade.vrt</Parameter>
<Parameter name="format">vrt</Parameter>
</Datasource>
</Layer>

</Map>

0 comments on commit a7a630a

Please sign in to comment.