Thursday, May 31, 2007

Blue Moon Tonight

See a rare blue moon tonight.

A blue moon is the second full moon within the same calendar month. The moon will not actually be blue...

New version of Blue Marble Next Generation

Just got word from Reto Stockli that there's a new version of BMNG out. It hasn't hit the mirrors yet, but it should be available shortly.

Changes include:

1) Replacement of the standard BMNG Antarctica by use of a colorized version of the high quality MODIS Mosaic of Antarctica by Terry Haran and Ted Scambos (NSIDC)
2) Fix of Southern Hemisphere sea floor topography errors (GEBCO vesion 1.02, and bug in my code)
3) Fix of Arctic 80N-90N land mask inconsistencies between the MOD12Q1 and GEBCO sea floor topography. Remaining 80N-90N inconsistencies are due to the fact that there are no MOD09A1 land surface reflectances in this area and it was painted with permanent snow in BMNG during all months.

I'm excited for the new dataset! It isn't mentioned, but I hope that they fix the hillshading in southern Crete.

Thursday, May 17, 2007

Dynamic Relief Mapping

EarthBrowser 3.0 is starting to shape up nicely. I've created a normal map generator using a Sobel filter and SRTM data. Normal maps are just a texture respresenting compressed normal directions and they enable one to create the illusion of very detailed geometry with the help of hardware accelerated shaders.

Africa Relief

Asia Relief

Using the mosaic and raster classes that I described in my previous post, I generate a normal map in the gnomonic projection and put that together with the texture map and a wgs84 ellipsoid and it is starting to look pretty nice. The great thing about it is the shadows move where they should when the light source moves. Someday I'll make a youtube video to demonstrate that effect.

Thursday, May 10, 2007

Hexagonal Dataset Rundown

The Icosahedral Hexagonal grid system for the next version of EarthBrowser is nearly complete. This was no trivial task and it required several helper technologies in order to be possible. One of the primary motivations of this technology was to be able to represent the northern and southern latitudes as accurately any other area on the globe, which it does seamlessly.

Unfortunately the size of the datasets are not significantly smaller as I had hoped. The size of the BMNG (Blue Marble Next Generation) dataset in the generic Plate Carée projection is just over 6 Gigabytes uncompressed. In the Hexagonal grid format it comes in roughly the same. The full 500 meter per pixel hex grid consists of 162 tiles roughly 4096x4096 in size. Each hex tile image is a square in the Gnomonic Projection centered on the hexagon tile center. A similar resolution tile set in Plate Carée would be 128 tiles of size 5700x5700. Theoretically the dataset size should be much smaller, but I added about 5% padding on each edge, also each corner of the square image has redundant data that is represented in adjacent hexagons.

Compressed into Jpeg2000 format, I can get the whole dataset down to around 250 Megabytes without noticeable compression artifacts. I think that will be better than you can get from Plate Carée since land is over-represented and less compressible than ocean areas.

In order to make all of this work, I needed a nice little tool I was using to build my Landsat 15 meter dataset. The class is called mosaic and it will take a set of geo-referenced datasets in any projection and build a new geo-referenced image in any other projection. This has made creating the hexagonal tile dataset very simple. The mosaic class can read Jpeg2000, MrSid, GeoTIFF, ECW, jpeg, png or even raw images. It also take advantage of the ability of Jpeg2000 and MrSid formats to supply reduced resolution subsets of images in order to speed up the processing. In future versions I'll add netCDF and some other neat formats out there. It's all very fast too in optimized C++ code, much faster than gdal_warp.

The mosaic class is possible due to another class that has become the very heart of the new EarthBrowser program. The raster class is useful not only in importing and exporting data from image files, but also in the graphics "game" engine for vertex buffers. Raster can be used represent any block of data based on it's height, width, depth and storage type (8-bit, 16-bit unsigned, float, double, unsigned 64-bit, etc.). It can also have an arbitrary interleaved ordering: interleaved by pixel, by line or by plane (bip, bil and bsq). It can be geo-referenced with a supplied origin, resolution, rotation, projection and datum. It can also be subsampled with various sampling kernels like bilinear, cubic convolution, cubic spline and even nearest neighbor! I tried Lanczos but failed and gave up.

Due to the flexibility of the mosaic and raster classes, I build the Hexagonal dataset from BMNG and SRTM Plus (fused elevation and bathymetry) with the very same set of calls, with just a different source dataset name and output raster format. I decided to use bilinear on SRTM and cubic convolution on BMNG too. Of course all of this functionality will be available in EarthBrowser 3.0 from the Python console or from your own imported Python scripts.

EarthBrowser 3 is going to be a quantum leap from version 2. Now if I can just nail down the rights to use the i-cubed 15 meter Landsat dataset I won't have to waste my time on that again!

Thanks for the (indirect) mention Mr. Hanke

The much awaited blog from the Google earth/maps team has now arrived, and it doesn't disappoint. I look forward to hearing more about many things Google is doing or planning, especially details of the collaboration with NASA. I sure hope that NASA puts any generated earth data in the public domain. John Hanke kicks it off with his perception of today's online geo-referenced world:
I don't think that there is agreement on what the geoweb is, but I think there is a lot of enthusiasm and energy across many fronts to make it happen. I expect the "it" will evolve substantially over the next few months and years as we (the geo ecosystem on the web) collectively figure out how "earth browsers," embedded maps, local search, geo-tagged photos, blogs, the traditional GIS world, wikis, and other user-generated geo content all interrelate.

EarthBrowser, the original "earth browser," on the web will continue to be a part of the evolving "geoweb", for lack of a better euphemism. I'll be posting an update later today on some of the cool new technologies coming out in EarthBrowser 3.0.