Skip to content

Instantly share code, notes, and snippets.

@klokan
Last active October 12, 2020 16:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save klokan/3358bec8a6be0c19c1e2 to your computer and use it in GitHub Desktop.
Save klokan/3358bec8a6be0c19c1e2 to your computer and use it in GitHub Desktop.
NASA Blue Marble

NASA Blue Marble

Prepared for MapTiler: http://www.maptiler.com/ or other GDAL tools

GDAL vrt

Download the high-resolution images from http://visibleearth.nasa.gov/view.php?id=73751

wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.A1.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.A2.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.B1.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.B2.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.C1.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.C2.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.D1.jpg
wget http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.D2.jpg

Use the attached .vrt which creates a single large georeferenced image from all these .jpgs

gdalinfo world.topo.bathy.200407.vrt

Such file can be encoded into GeoTIFF with internal tiles and overviews for fast reading.

MapTiler Pro is more efficient on reading the individual files. To get the geolocation via ESRI World Files for the individual jpegs above see: https://gist.github.com/klokan/b654b18367f372d58c58

<VRTDataset rasterXSize="86400" rasterYSize="43200">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 4.1666666666666666e-03, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.1666666666666666e-03</GeoTransform>
<VRTRasterBand dataType="Byte" band="1">
<ColorInterp>Red</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A1.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B1.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C1.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D1.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A2.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B2.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C2.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D2.jpg</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="2">
<ColorInterp>Green</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A1.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B1.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C1.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D1.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A2.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B2.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C2.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D2.jpg</SourceFilename>
<SourceBand>2</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="3">
<ColorInterp>Blue</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A1.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B1.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C1.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D1.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="0" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.A2.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="0" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.B2.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="21600" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.C2.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="43200" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
<SimpleSource>
<SourceFilename relativeToVRT="1">world.topo.bathy.200407.3x21600x21600.D2.jpg</SourceFilename>
<SourceBand>3</SourceBand>
<SourceProperties RasterXSize="21600" RasterYSize="21600" DataType="Byte" BlockXSize="128" BlockYSize="128" />
<SrcRect xOff="0" yOff="0" xSize="21600" ySize="21600" />
<DstRect xOff="64800" yOff="21600" xSize="21600" ySize="21600" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment