That is why I wrote myself this little script. It selectively deletes the map tiles which are covered my a specific custom scenery and then have Map rerender them. Just in case, anything goes wrong, it automatically calls Map again and let it render potentially missing tiles from the Terrasync dir.
The script expects the custom scenery to have the Terrain dir directly under the respective scenery subdir, e.g. CustomScenery/StattosMiami/Terrain. I made it as configureable as possible. The only parameter is the custom scenery subdir for which the maps should be rerendered.
- Code: Select all
#!/bin/bash
STARTDIR=$(pwd)
MAP="/usr/bin/Map"
FGROOT="/usr/share/flightgear"
CUSTOMSCENERY="/home/sgofferj/flightgear/CustomScenery"
TERRASYNC="/home/sgofferj/flightgear/TerraSync"
SCENERYDIR=$1
MAPDIR="/usr/share/flightgear/Atlas"
echo --------------------------------------------------------------------------------------------
cd $SCENERYDIR/Terrain
for TILEDIR in * ; do
if [ -d ${TILEDIR} ]; then
cd ${TILEDIR}
pwd
echo $TILEDIR
for TILE in [ew]* ; do
if [ -d ${TILE} ]; then
echo $TILE
rm ${MAPDIR}/10/$TILE.jpg
rm ${MAPDIR}/8/$TILE.jpg
rm ${MAPDIR}/6/$TILE.jpg
rm ${MAPDIR}/4/$TILE.jpg
fi
done
cd ..
fi
done
cd ${STARTDIR}
echo --------------------------------------------------------------------------------------------
${MAP} --verbose --fg-scenery=${CUSTOMSCENERY}/${SCENERYDIR}
echo --------------------------------------------------------------------------------------------
${MAP} --verbose --fg-scenery=${TERRASYNC}
echo --------------------------------------------------------------------------------------------