Defining Marker Files

cd $XPLANET_HOME/markers
cp `(brew --prefix)`/share/xplanet/markers/earth earth
cd $XPLANET_HOME
TMPL_LOC=$XPLANET_CONFIG/scripts/Totalmarker2.6.1.pl
ln -s $TMPL_LOC $TM

export PERL_MM_USE_DEFAULT=1
cpan Mozilla::CA > /dev/null
if [ ! -L $XPLANET_CONFIG/totalmarker.ini ]; then
  echo "Running Totalmarker for the first (and second time)"
  /usr/bin/perl $TM > /dev/null
  /usr/bin/perl $TM > /dev/null
  sed -i '' "s/clouds_2048.jpg/clouds-4096.jpg/" $XPLANET_CONFIG/totalmarker.ini
  sed -i '' "s/Username/CloudUsername/" $XPLANET_CONFIG/totalmarker.ini
  sed -i '' "s/Password/CloudPassword/" $XPLANET_CONFIG/totalmarker.ini
  open -e $XPLANET_CONFIG/totalmarker.ini
fi

/usr/bin/perl $TM -Volcano
/usr/bin/perl $TM -Storm
/usr/bin/perl $TM -Quake
PLISTS=('start' 'earth-map' 'quake' 'storm' 'volcano')
read -k1 "YESNO?Step 2) Are you subscribing to Xeric Designs for the cloud updates? "
if [[ "$YESNO" =~ ^[Yy]$ ]]; then
  unlink $XPLANET_HOME/images/clouds-4096.jpg
/usr/bin/perl $TM -Clouds
  PLISTS+=('clouds')
fi

There’s a bit to unpack as we run the next part of the setup script.

Marker files provide user-defined context on a map. They signify points on a map, and they can be represent static items like cities or dynamic items like storms, earthquakes, and active volcanoes. Marker files contain little more than entries to note the latitude, the longitude, and a defined name.

The benefit of using marker files is in the context they provide the map. The marker files, along with the night time map, help make the final rendering a more personal image. Without the markers, you’re left with half the story. The story of Earth and our relationship with her is better told with the marker files.

You can exit out of the setup script at this point and not move forward with the marker files. You’ll simply have a static image with the only two changes being the monthly earth map changes and tracking the sun throughout the day.

If you break out now, you also won’t have the option of automating Xplanet starting at login or updating the monthly map… although you can simply add these in manually at your leisure.

Earth Marker

The marker file for the location of many of Earth’s cities is included with Xplanet. The script copies a version into the markers directory so that you can edit it to include the cities you want to highlight.

Some tips when editing marker files (after setup completes):

  • Place a # at the front of the line to comment out a line
  • To add the date and time next to the name of a city add the following to the end of the city name in the marker file: “New York” would change to “New York %r %Z (%a)”
    • The quotes are important… include the quotes
  • You can manually add any location to the map by adding the latitude, longitude, name of the city within double quotes, and optionally the time zone to the marker file

Save the marker file.  You can test the marker file with the following commands (in a separate terminal):

### Only need to do this once to create a dummy config file
cd ~/.xplanet
echo "[earth]" >> test-cfg
echo "marker_file=earth" >> test-cfg
###################

xplanet -searchdir ~/.xplanet -projection rectangular -config test-cfg -num_times=1

### When you're happy with the edits to the marker file
rm test-cfg

Storm, Earthquake, and Volcano Markers

I have been an advocate of TotalMarker over the years. In fact, I’m unaware of any other script that continues to support the building of marker files. TotalMarker also does it in a way that doesn’t interfere or take away from the final image. The marker files from TotalMarker do complement the overall map.

Michael Dear originally wrote TotalMarker. With some minor tweaks, and his permission, it’s now part of the repo. I’m not stepping through that script in this guide, but we will use it to generate the marker files representing earthquakes, storms, and active volcanoes to layer onto the composite image.

The script will also download the cloud images from Xeric Designs if you’ve subscribed to their service.

Thank you, Mike, for sharing TotalMarker with the community.

Configuring TotalMarker

TotalMarker has to exist in Xplanet’s home directory so we link it to that location. Additionally, it’s dependent on a perl module, Mozilla::CA that’s not included in macOS. The setup script installs the module, then runs TotalMarker twice, once to create the eclipse data file, and a second to create its configuration file, config/totalmarker.ini.

This configuration file is important because TotalMarker will use it to drive its behavior when it generates the marker files. For example, you can set the QuakeMinimumSize to only show quakes having a magnitude larger than 5.5.

Setup continues to update the three marker files with real time information. It will also download the latest cloud image from Xeric if subscribing to their service. Be sure to update CloudRemoteImageName, CloudsLocalImageName, CloudUsername, and CloudPassword in the totalmarker.ini.


The setup script hasn’t completed, but I want to cover how everything comes together… how you can start Xplanet and keep the markers up to date. And then we’ll come back to the finish the last part of the setup.

One Response to Defining Marker Files

Leave a Reply to Stephan Irle Cancel reply

Your email address will not be published. Required fields are marked *