Global magnetic anomaly map EMAG2 (for Google Maps/Earth)

1,780 views
Skip to first unread message

Jesse

unread,
Mar 17, 2009, 4:01:32 PM3/17/09
to MapTiler User Group
A new Earth Magnetic Anomaly Grid at 2-arc-minute resolution (EMAG2)
has just been released by Stefan Maus at CIRES/University of Colorado/
NOAA National Geophysical Data Center.
Magnetic anomaly maps provide insight into the subsurface structure
and composition of the Earth's crust. Anomalies trending parallel to
the isochrons (lines of equal age) in the oceans reveal the temporal
evolution of oceanic crust. Magnetic maps are widely used in the
geological sciences and in resource exploration. Furthermore, the
global magnetic map is useful in science education to illustrate
various aspects of Earth evolution such as plate tectonics and crustal
interaction with the deep mantle. Distinct patterns and magnetic
signatures can be attributed to the formation (seafloor spreading) and
destruction (subduction zones) of oceanic crust, the formation of
continental crust by accretion of various terranes to cratonic areas
and large scale volcanism (both on continents and oceans). You can get
more information about geomagnetism here: http://geomag.org/index.html

I successfully created both Google Maps and Google Earth
visualizations for the EMAG2 dataset using GDAL2Tiles.

Here's a link to the image in Google Maps:
http://ngdc.noaa.gov/geomag/data/Google_Maps/EMAG2/index.html
(the opacity slider is very useful here to compare magnetic features
with topographic features of the Earth)

And the KMZ for Google Earth:
http://geomag.org/models/EMAG2/EMAG2.kmz

Also see the post at the Google Earth Community:
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=1205597#Post1205597


I thought I would share some of the things that I did to get good
results from GDAL2Tiles.

To generate WGS84 geographic tiles for Google Earth KML:
-I fixed one bug in the GDAL2Tiles Python code so the output tiles
would be properly georeferenced in the KML files. I reported this
issue here: http://code.google.com/p/maptiler/issues/detail?id=9
-The global image I started with (in GeoTIFF format) had dimensions of
21600x10800 pixels. Using gdal_translate and gdal_merge, I copied a
160-pixel-wide strip from the left side of the image and pasted it on
the right edge so that the width would be 21760 pixels (an exact
multiple of the 256 pixel tile size). This eliminated any image
overlap artifacts in the max zoom level at +/-180 degrees (the
antimeridian).
-To eliminate image artifacts in the overview zoom levels, I also
changed the tile draw order in the output KML. At the antimeridian,
the tiles at the western edge of the image are always drawn on top of
the overlapping tiles at the eastern edge. I accomplished this by
modifying the generate_kml function in the GDAL2Tiles code:
if tx == 0:
args['drawOrder'] = 2 * tz + 1
else:
args['drawOrder'] = 2 * tz
-Then I ran "gdal2tiles -p raster -s epsg:4326 -k -v input.tif
output_dir". Everything looked great!

For the spherical mercator tiles for Google Maps:
-I followed Klokan's instructions to first warp the image to epsg:
900913 described here: http://code.google.com/p/maptiler/issues/detail?id=6
-Then I ran 'gdal2tiles -p mercator -s epsg:900913 -v input.vrt
output_dir'

After running GDAL2Tiles, I optimized (losslessly) all the PNG files
using the program PNGOUT: http://advsys.net/ken/utils.htm#pngout. This
reduced the total size to about 86% of the original (hey, every byte
counts!).

Hopefully my experience with GDAL2Tiles will be useful to others.
Thank you to Klokan for a fantastic and very useful program!

Cheers,
Jesse Varner
CIRES & NOAA/NGDC

klo...@gmail.com

unread,
Mar 17, 2009, 4:24:21 PM3/17/09
to mapt...@googlegroups.com
Jasse,

congratulation for your excellent results! I am glad you are satisfied
with my utility and that you have chosen it for map publishing.

Thank you a lot for this post, I am sure people will find it useful...

Best regards

Klokan Petr Pridal
--
http://blog.klokan.cz/
http://www.maptiler.org/
http://www.oldmapsonline.org/
Reply all
Reply to author
Forward
0 new messages