User Tools

Site Tools


keckcaves:steps_for_making_and_using_the_earthtopography.png_file

I've learned how to make the PNG file that is used in 3DVisualizer (and ShowEarthModel) as the surface of the earth. I found that I wanted a simple, more transparent map when looking tomographic model so that I could more easily see the relationship between the model and its geographic location

It turns out that making another image (with anything you want on it), is quite easy if you already know how to use GMT… the trick is to make a map without a map projection (the -Jx option). The GMT script I used to make the surface map is at the bottom of this page.

After making the post-script file using GMT, I loaded into the Mac program GraphicsConverter. I then used the Edit Options “Select Picture Content” and “Trim Selected” and the Picture Option “Rotate 90 degrees”. Using these I trimmed the image to its borders and oriented with north at the top. Finally I save the file as a PNG. This gridded pixels in the PNG file will get “wrapped” around the globe when read into 3DVisualizer or ShowEarth Model.

For now, if you want to change the file used as the surface image, you'll need to rename the current EarthTopography.png found in …/share/3DVisualizer-VERSION/ to something else, and then copy your new map to this directory and rename it EarthTopography.png.

In future versions, this file will probably get read in as a command line or menu option.

GMT SCRIPT FOR MAKING THE WORLD IMAGE

#!/bin/csh -vf

# make_showearthmap.gmt

# plots map of full earth to be converted to a PNG file and used with

# ShowEarthModel.

gmtset MEASURE_UNIT INCH

gmtset LABEL_FONT_SIZE 12

gmtset ANOT_FONT_SIZE 12 HEADER_FONT_SIZE 12

gmtset BASEMAP_FRAME_RGB 0 0 0

gmtset BASEMAP_TYPE plain

gmtset PAPER_MEDIA letter

set bounds = -R-180/180/-90/90

set proj = “-Jx0.03d”

set psfile = “earthmap1.ps”

set cinfo=“-G150 -Di -A10000 -S245”

set plates = “$MYBIN/gmt/dat/plate_boundaries”

set origin = “-X0.1 -Y1.0”

set misc = “-K -V”

pscoast $proj $bounds $cinfo $misc $origin >! $psfile

set misc = “-O -V”

psxy $plates $proj $bounds -M -W1p/100 $misc » $psfile

gs $psfile

keckcaves/steps_for_making_and_using_the_earthtopography.png_file.txt · Last modified: 2009/05/09 13:39 by billen