Skip to content

Latest commit

 

History

History
142 lines (94 loc) · 6.37 KB

data.rst

File metadata and controls

142 lines (94 loc) · 6.37 KB

Working with Data

Where to Find Data

Help us add useful sources of Free data to this list.

Raster data

  • ReadyMap.org - Free 15m imagery, elevation, and street tiles for osgEarth developers
  • USGS National Map - Elevation, orthoimagery, hydrography, geographic names, boundaries, transportation, structures, and land cover products for the US.
  • NASA EOSDIS - NASA's Global Imagery Browse Services (GIBS) replaces the agency's old JPL OnEarth site for global imagery products like MODIS.
  • NASA BlueMarble - NASA's whole-earth imagery (including topography and bathymetry maps)
  • NRL GIDB - US Naval Research Lab's GIDB OpenGIS Web Services
  • Natural Earth - Free vector and raster map data at various scales
  • Virtual Terrain Project - Various sources for whole-earth imagery
  • Bing Maps - Microsoft's worldwide imagery and map data ($)

Elevation data

  • CGIAR - World 90m elevation data derived from SRTM and ETOPO (CGIAR European mirror)
  • SRTM30+ - Worldwide elevation coverage (including batymetry)
  • GLCF - UMD's Global Land Cover Facility (they also have mosaiced LANDSAT data)
  • GEBCO - Genearl Batymetry Chart of the Oceans

Feature data

  • OpenStreetMap - Worldwide, community-sources street and land use data (vectors and rasterized tiles)
  • DIVA-GIS - Free low-resolution vector data for any country
  • Natural Earth - Free vector and raster map data at various scales

Tips for Preparing your own Data

Processing Local Source Data

If you have geospatial data that you would like to view in osgEarth, you can usually use the GDAL driver. If you plan on doing this, try loading it as-is first. If you find that it's too slow, here are some tips for optimizing your data for tiled access.

Reproject your data

osgEarth will reproject your data on-the-fly if it does not have the necessary coordinate system. For instance, if you are trying to view a UTM image on a geodetic globe (epsg:4326). However, osgEarth will run much faster if your data is already in the correct coordinate system. You can use any tool you want to reproject your data such as GDAL, Global Mapper or ArcGIS.

For example, to reproject a UTM image to geodetic using gdal_warp:

gdalwarp -t_srs epsg:4326 my_utm_image.tif my_gd_image.tif

Build internal tiles

Typically formats such as GeoTiff store their pixel data in scanlines. This generally works well, but because of the tiled approach that osgEarth uses to access the data, you may find that using a tiled dataset will be more efficient as osgEarth doens't need to read nearly as much data from disk to extract a tile.

To create a tiled GeoTiff using gdal_translate, issue the following command:

gdal_translate -of GTiff -co "TILED=YES" myfile.tif myfile_tiled.tif

Build overviews

Adding overviews (also called ''pyramids'' or ''rsets'') can sometimes increase the performance of a datasource in osgEarth. You can use the gdaladdo utility to add overviews to a dataset.

For example:

gdaladdo -r average myimage.tif 2 4 8 16

Building tile sets

Another way to speed up imagery and elevation loading in osgEarth is to build tile sets. In fact, if you want to serve your data over the network, this is the only way!

This process takes the source data and chops it up into a quad-tree hierarchy of discrete tiles that osgEarth can load very quickly. Normally, if you load a GeoTIFF (for example), osgEarth has to create the tiles at runtime in order to build the globe; Doing this beforehand means less work for osgEarth when you run your application.

osgearth_package

osgearth_package is a utility that prepares source data for use in osgEarth. It is optional - you can run osgEarth against your raw source data and it will work fine - but you can use osgearth_package to build optimized tile sets that will maximize performance in most cases. Usage:

osgearth_package file.earth --tms --out output_folder

This will load each of the data sources in the the earth file (file.earth in this case) and generate a TMS repository for each under the folder output_folder. You can also specify options:

--out path Root output folder of the TMS repo
--ext extension
 Output file extension
--max-level level
 Maximum level of detail

--bounds xmin ymin xmax ymax Bounds to package (in map coordinates; default=entire map) --out-earth Generate an output earth file referencing the new repo --overwrite Force overwriting of existing files --keep-empties Writes fully transparent image tiles (normally discarded) --db-options An optional OSG options string --verbose Displays progress of the operation