New maps for your world clock
For most operating systems an application exists which displays a world map showing where it’s day and night. A quick glimpse on the map lets you know approximately what time of day it is in different places on the Earth, which can be quite useful—especially if you have family or friends in other parts of the world.
Quite often you can select the background image from a suite of maps and satellite images, for example elevation maps, satellite images or bathymetric maps (see figure to the right). In this post I will describe how to obtain, preprocess and install a new satellite image for a world clock application. In this example I will use kworldclock on SUSE Linux 9.2, but the principles apply to similar world clock programs.
1. Data: First we need to acquire some new satellite image. Most software applications displaying global maps use images in the plate carrée projection, which is also the case for kworldclock. Luckily many satellite images and maps in plate carrée projection are freely available on the Internet
I found a recent satellite mosaic made by the European Space Agency ESA based on hundreds of images from the MERIS sensor on board the satellite ENVISAT. The image has a very high spatial resolution and is ideal for for our purpose. Download the image (4.9M jpg).
2. Preprocessing: The image is larger (3002×1501 pixles) than our screen resolution so firstly we resize the image. Here I use image magick’s convert command (my screen is 1400 pixles wide):
convert -scale 1400 globcover_MOSAIC_H.png globcover.jpg
3. Scripting: Now we need to let kworldclock know about out new image. In the kworldclock maps directory (/kde3/share/apps/kworldclock/maps located various places depending on your system (on my box is was under /opt/)) create a new directory for your new theme (You probably need to be root to do this):
mkdir /opt/kde3/share/apps/kworldclock/maps/globcover
Copy your image to this directory and rename it 1400.jpg:
cp globcover.jpg \
/opt/kde3/share/apps/kworldclock/maps/globcover/1400.jpg
Create a theme file globcover.desktop and put it the maps directory:
[Theme]
Name=MERIS Global Cover
Theme=globcover
4. Testing: Run kworldclock and your new theme MERIS Global Cover should now be available in the Map Theme menu when right-clicking the map. Shown above to the left is the MERIS Global Cover. To the right is shown a different new map (405K jpg) for kworldclock made using GMT - The Generic Mapping Tools and a simple script.
No Comments yet »
TrackBack URILeave a comment
Software: WordPress 2.0.7
with Hiperminimalist Theme modified by makemaps.net.
Web standards: Valid XHTML and CSS.
