Blue Marble: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
m (→‎Issues: again)
m (update Blue Marble ''next generation'' URL)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The classic {{wikipedia|Blue_Marble}} photo of Earth was taken by the crew of Apollo 17 on their way to the moon in 1972.
The classic {{wikipedia|Blue_Marble}} photo of Earth was taken by the crew of Apollo 17 on their way to the moon in 1972.


In 2002 NASA released an updated version suitable for GIS created by a mosaic of satellite images with the clouds removed. In 2005 this was rereleased, with a separate image provided for each month of the year.
In 2002 NASA released an updated version suitable for GIS created by a mosaic of satellite images with the clouds removed. In 2005 this was rereleased, with a separate image provided for each month of the previous year.


This page deals with importing the latter into GRASS.


This page deals with importing the latter into GRASS.


=== 2002 ===
=== 2002 ===
Line 10: Line 10:
Data source: [http://visibleearth.nasa.gov/view_set.php?categoryID=2364 NASA's Visible Earth] website.
Data source: [http://visibleearth.nasa.gov/view_set.php?categoryID=2364 NASA's Visible Earth] website.


: From this site you can also get the well known "Earth at night" image, and a version of the Blue Marble including clouds.
: From this site you can also get the well known "[[Earth at night]]" image, and a version of the Blue Marble including clouds.


The entire world image is 43200x21600, 1/2 arc-minute (~1km per pixel) resolution.
The entire world image is 43200x21600, 1/2 arc-minute (~1km per pixel) resolution.
 
: ''90N to 90S = 180 degrees = 10800 minutes = 21600 1/2 minutes''


==== Download ====
==== Download ====
Line 27: Line 27:
: ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif
: ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif


The Wget program is nice for downloading these. For example:
The Wget program is nice for downloading these. For example (-c to continue a potentially interrupted download):
   wget ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_east.tif
   wget -c ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_east.tif
   wget ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif
   wget -c ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif
 
 
 
* From the original site (only gzip compressed)
 
Goto  http://mirrors.arsc.edu/nasa/Blue_Marble_2002/
 
If you are west, download
: MOD09A1.W.interpol.cyl.retouched.topo.3x21600x21600.gz
 
if you are east, download
: MOD09A1.E.interpol.cyl.retouched.topo.3x21600x21600.gz
 
If you are in England or West Europe, you will need both files,
because they have to overlap.






* Download them via ED2k Link (bzip2 compressed):
* Mirror site with some more images:
: http://mirrors.arsc.edu/nasa/Blue_Marble_2002/


ed2k://|file|top_nasamap_east.raw.bz2|379972653|7312437945bd47ccf0b2a0c3452d5836|/
* Check if the files are available from ''geotorrent.org''
ed2k://|file|top_nasamap_west.raw.bz2|226307352|13ab6e8a6e014fa23bb83db25855bb71|/
 
This files have a uncompressed size of 1.4GB each and are in raw RGB format.
The bzip2 compressed files are 363MB (east) and 216MB (west) in size.
 
 
* Check if the files are available from geotorrent.org
: http://www.geotorrent.org/
: http://www.geotorrent.org/


Line 67: Line 46:




* Create "world files" for the raw .tif images (thus making them into GeoTiffs)
* Create "world files" for the raw .tif images (thus making them into GeoTiffs).
: The 0.0083333 is cell resolution (in degrees, 0.5'/60) and N,S,E,W boundaries are reduced 1/2 a cell as these refer to cell centers of the outer rows, not the outer boundaries of the cell. Attempting to import a map with a region boundary >90 degrees N,S will cause an error.


: land_shallow_topo_east.wld
: land_shallow_topo_east.wld
Line 106: Line 86:
* Some of the pixels are NULL. If any of the R,G,B map pixels are NULL, {{cmd|d.rgb}} will show white for that cell, which may stick out badly. To mitigate the problem, try erasing the display to black first with {{cmd|d.erase}}.
* Some of the pixels are NULL. If any of the R,G,B map pixels are NULL, {{cmd|d.rgb}} will show white for that cell, which may stick out badly. To mitigate the problem, try erasing the display to black first with {{cmd|d.erase}}.


=== 2005 monthly ===
=== 2004 monthly ===


aka Blue Marble ''next generation'', available at 8km, 2km, and 500m per pixel resolution. (i.e. 4 arc-minute, 1 minute, and 1/2 arc-minute*)
aka Blue Marble ''next generation'', available at 8km, 2km, and 500m per pixel resolution. (i.e. 4 arc-minute, 1 minute, and 1/2 arc-minute)


* NASA site: http://earthobservatory.nasa.gov/Newsroom/BlueMarble/
NASA site: https://earthobservatory.nasa.gov/features/BlueMarble
 
: [*] They claim 500m but from the filenames I think that may really mean 1/2min, which at the equator is 926m. They might be able to argue about cells covering less area a higher latitudes if the 4' and 1' versions used the same method. (''I haven't actually downloaded the 1.36gb dataset, maybe it is really 15sec resolution!'')


* I am not sure if the "''500m''" version is actually 1/4' or in fact 1/2'. At the equator 1/2' is 926m.


==== Download ====
==== Download ====
Line 122: Line 101:




* The 500m dataset is available by BitTorrent. The tracker file is given at the NASA website. Each month is 1.36gb.
* The 500m dataset is available by BitTorrent. The tracker files foe each month are given at the NASA website. Each month is approx. 1.4gb.
 
: [http://ktorrent.org ktorrent] is a nice BitTorrent client for Linux
 
== Processing ==
 
The following example demonstrates import and visualization of the Blue Marble imagery draped over the [[Global_datasets#ETOPO|ETOPO2 global topography]] dataset.
 
# in a lat/lon location ....
# import
r.in.gdal in=Blue_Marble2002/land_shallow_topo_east.tif out=BlueMarble2002_east -o
r.in.gdal in=Blue_Marble2002/land_shallow_topo_west.tif out=BlueMarble2002_west -o
# patch together east and west tiles
base=BlueMarble2002
g.region rast="${base}_east.red,${base}_west.red"
base=BlueMarble2002
for BAND in red green blue ; do
    r.patch in="${base}_east.$BAND,${base}_west.$BAND" out="${base}.$BAND"
done
# down-sample to 2 arcmin (to match ETOPO2)
g.region res=0:02
for BAND in red green blue ; do
    r.resamp.stats in="${base}.$BAND" out="${base}_2min.$BAND" method=average
done
# display
d.rgb r=${base}_2min.red g=${base}_2min.green b=${base}_2min.blue
# create composite image for use with NVIZ
r.composite r=${base}_2min.red g=${base}_2min.green b=${base}_2min.blue \
  out=${base}_2min
# visualize in 2D
r.shaded.relief map=etopo2@etopo2 units=meters
d.shadedmap relief=etopo2.shaded drape=BlueMarble2002_2min \
    brighten=70
# visualize in 3D
nviz elev=etopo2@etopo2 color=BlueMarble2002_2min


: [[http://ktorrent.org ktorrent]] is a nice BitTorrent client for Linux
[[Category:Geodata]]
[[Category: Import]]

Latest revision as of 14:15, 31 December 2020

The classic Blue_Marble photo of Earth was taken by the crew of Apollo 17 on their way to the moon in 1972.

In 2002 NASA released an updated version suitable for GIS created by a mosaic of satellite images with the clouds removed. In 2005 this was rereleased, with a separate image provided for each month of the previous year.

This page deals with importing the latter into GRASS.


2002

Data source: NASA's Visible Earth website.

From this site you can also get the well known "Earth at night" image, and a version of the Blue Marble including clouds.

The entire world image is 43200x21600, 1/2 arc-minute (~1km per pixel) resolution.

90N to 90S = 180 degrees = 10800 minutes = 21600 1/2 minutes

Download

To download the maps you have a few choices:

  • The new maps can be found here:

21600x21600 East Hemisphere (401mb)

ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_east.tif

21600x21600 West Hemisphere (241mb)

ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif

The Wget program is nice for downloading these. For example (-c to continue a potentially interrupted download):

 wget -c ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_east.tif
 wget -c ftp://veftp.gsfc.nasa.gov/bluemarble/land_shallow_topo_west.tif


  • Mirror site with some more images:
http://mirrors.arsc.edu/nasa/Blue_Marble_2002/
  • Check if the files are available from geotorrent.org
http://www.geotorrent.org/

Import

  • Create a lat/lon location. I used WGS84 as the datum, but as typical datum differences are much less than the pixel resolution I'm not sure if it makes a difference which one you chose. The only problematic choice might be sphere (the GDAL "null nadgrids" problem). You can overlay a world coastline, like admin98.shp, to test how you've done.
Alternatively you can import into a raw XY location, and reset the map bounds to 90N,S 180E,W with the r.region module. You would then need to convert the location to lat/lon with g.setproj. If all went well r.info should report the cell resolution as exactly 0:00:30 (i.e. 30 arc-second).


  • Create "world files" for the raw .tif images (thus making them into GeoTiffs).
The 0.0083333 is cell resolution (in degrees, 0.5'/60) and N,S,E,W boundaries are reduced 1/2 a cell as these refer to cell centers of the outer rows, not the outer boundaries of the cell. Attempting to import a map with a region boundary >90 degrees N,S will cause an error.
land_shallow_topo_east.wld
0.008333333333333
0.000000000000000
0.000000000000000
-0.008333333333333
0.00416666666666665
89.99583333333334
land_shallow_topo_west.wld
0.008333333333333
0.000000000000000
0.000000000000000
-0.008333333333333
-179.9958333333333
89.99583333333334


  • Import into a lat/lon location with r.in.gdal. Bypass the projection check with the -o flag.
This will create three images, one for red, green, and blue.
  • Zoom to the extents of both images (or just one) with:
 g.region rast=BlueMarble_2002_east,BlueMarble_2002_west
  • Merge east and west images by color bands with r.patch
  • If you wish to combine R,G,B bands into a single raster map do so with r.composite. Only do this if you must, as you'll lose detail.

Issues

  • I've had good results exported at natural resolution, and then cubic rescale in the GIMP to my desired size. I find the images a bit dark, brighten them in GIMP with Tools-> Color Tools-> Brightness-Contrast. Increase both brightness contrast together to around +40.
  • Some of the pixels are NULL. If any of the R,G,B map pixels are NULL, d.rgb will show white for that cell, which may stick out badly. To mitigate the problem, try erasing the display to black first with d.erase.

2004 monthly

aka Blue Marble next generation, available at 8km, 2km, and 500m per pixel resolution. (i.e. 4 arc-minute, 1 minute, and 1/2 arc-minute)

NASA site: https://earthobservatory.nasa.gov/features/BlueMarble

  • I am not sure if the "500m" version is actually 1/4' or in fact 1/2'. At the equator 1/2' is 926m.

Download

Again you can download the entire dataset, but it may be preferable to only download the information for your local area. To do this you can use a WMS (Web_Map_Service) server and associated modules:


  • The 500m dataset is available by BitTorrent. The tracker files foe each month are given at the NASA website. Each month is approx. 1.4gb.
ktorrent is a nice BitTorrent client for Linux

Processing

The following example demonstrates import and visualization of the Blue Marble imagery draped over the ETOPO2 global topography dataset.

# in a lat/lon location ....

# import
r.in.gdal in=Blue_Marble2002/land_shallow_topo_east.tif out=BlueMarble2002_east -o
r.in.gdal in=Blue_Marble2002/land_shallow_topo_west.tif out=BlueMarble2002_west -o

# patch together east and west tiles
base=BlueMarble2002
g.region rast="${base}_east.red,${base}_west.red"
base=BlueMarble2002
for BAND in red green blue ; do
   r.patch in="${base}_east.$BAND,${base}_west.$BAND" out="${base}.$BAND"
done

# down-sample to 2 arcmin (to match ETOPO2)
g.region res=0:02
for BAND in red green blue ; do
   r.resamp.stats in="${base}.$BAND" out="${base}_2min.$BAND" method=average
done

# display
d.rgb r=${base}_2min.red g=${base}_2min.green b=${base}_2min.blue

# create composite image for use with NVIZ
r.composite r=${base}_2min.red g=${base}_2min.green b=${base}_2min.blue \
  out=${base}_2min

# visualize in 2D
r.shaded.relief map=etopo2@etopo2 units=meters
d.shadedmap relief=etopo2.shaded drape=BlueMarble2002_2min \
   brighten=70

# visualize in 3D
nviz elev=etopo2@etopo2 color=BlueMarble2002_2min