== How To Set Up Elevation == Elevation is needed for any ossim sensor models that do earth intersects at height above the ellipsoid. Height above ellipsoid is derived from two parts, the geoid grid (vertical datum), and the height above mean sea level which usually comes from elevation cells, sometimes referred to as a digital elevation model(DEM). Elevation cells are relative to a given vertical datum. At runtime the ossimElevManager will supply sensor models with the height above ellipsoid which is "geoid_grid_point + elevation_cell_post". This happens automatically provided you have set up you ossim_preferences file correctly and have the appropriate data in you elevation repositories. '''Quick setup:'''[[BR]] This is a real preferences snip. Copy and paste to your preferences and edit paths:[[BR]] {{{ elevation_source1.filename: /data/image_formats/elevation/srtm/1arc elevation_source1.type: srtm_directory elevation_source2.filename: /data/image_formats/elevation/srtm/3arc elevation_source2.type: srtm_directory autoload_dted_elevation: true elevation.enabled: true elevation.auto_sort.enabled: true elevation.auto_load_dted.enabled: true geoid_egm_96_grid: /data/image_formats/elevation/geoid96_big_endian/egm96.grd }}} '''Detailed setup:'''[[BR]] '''OSSIM Preferences File Elevation Setup:'''[[BR]] There is a template ossim preference file at:[[BR]] [http://trac.osgeo.org/ossim/browser/trunk/ossim/etc/templates/ossim_preferences_template][[BR]] Note that within the preference file "//" is used for comments. '''1) Set up the geoid grids:'''[[BR]] The geoid manager can handle three types of geoids. These are documented in the ossim preferences template. See below snip. At a minimum you should have the geoid_egm_96_grid which is available from the ossim svn repository at:[[BR]] [http://trac.osgeo.org/ossim/browser/trunk/ossim_package_support/geoids/geoid1996] {{{ // --- // Location of datum grids: // // Snip from: http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html // // Advances in the accuracies now obtainable in geodetic surveys, specifically // through use of differential GPS, has allowed for the creation of state // High Precision Geodetic Networks (HPGNs), also referred to as High Accuracy // Reference Networks (HARNs) throughout the country. // --- // datum_grids: /data/ossim/elevation/nadcon-grids // --- // GEOID 99: Set keyword to the directory containing the GEOID 99 grids. // // Notes: // - Grids must be in the native byte order. // - Can be downloaded from: // http://www.ngs.noaa.gov/GEOID/GEOID99 // --- geoid_99_directory: /data/image_formats/elevation/geoid99_little_endian // --- // GEOID EGM 96: Set keyword to the path to the egm96.grd // // Notes: // - Grid must be in BIG ENDIAN (UNIX) format. // - Can be downloaded from: // http://earth-info.nima.mil/GandG/wgs84/gravitymod/egm96/ww15mgh.grd.z // --- geoid_egm_96_grid: /data/image_formats/elevation/geoid96_big_endian/egm96.grd // --- }}} '''2) Set up the elevation cells:'''[[BR]] The elevation manager can handle three types of elevation cells, Digital Terrain Elevation Data(DTED), Shuttle Radar Topographic Mission(SRTM) and General Raster. These can be of varying resolution. The Typically elevation cells a placed in a directory or all the same type/resolution. In other word all the DTED level 2 in one directory all the srtm 1 arc second in another directory and so on. Multiple directories are allowed. NOTE: Always put your highest resolution directories first. Directories are set in the preferences file. This is a snip from the template: {{{ // --- // Keyword pair: // elevation_source.type // elevation_source.filename // // Indicates an elevation source. These should be listed in pairs. Numbering // should start with 1 with lowest number being the highest resolution. This // can be a cell(file) or a directory. // // There are four elevation_source.type types: // elevation_source.type: dted_cell // elevation_source.type: srtm_cell // elevation_source.type: dted_directory // elevation_source.type: srtm_directory // elevation_source.type: general_raster_directory // // The elevation_source.filename keyword should point to a cell or a directory. // // NOTES: // The elevation_source keyword replaces the deprecated keywords: // dted_directory // srtm_directory // dted_cell // // Examples: //--- elevation_source1.filename: /images/elevation/srtm/1arc elevation_source1.type: srtm_directory elevation_source2.filename: /images/elevation/dted/3arc elevation_source2.type: dted_directory elevation_source3.filename: /images/elevation/dted/1arc/w090/n40.dt1 elevation_source3.type: dted_cell elevation_source4.filename: /images/elevation/srtm/1arc/N40W092.hgt elevation_source4.type: srtm_cell elevation_source4.filename: /images/elevation/srtm/half_arc_raster elevation_source4.type: general_raster_directory }}} Miscellaneous keywords: {{{ // --- // Keyword: default_elevation_path // Default path for the elevation manager popup "Add" to start at. default_elevation_path: /images/elevation/srtm/1arc // --- // --- // Keyword: elevation.enabled // If disabled calls to the elevation manager getHeightAboveMSL and // getHeightAboveEllipsoid will return a null height. (default=true) // Use: "true", "yes", "y" or "1" to enable, // "false", "no", "n" or "0" to disable. elevation.enabled: true // --- // --- // Keyword: elevation.auto_load_dted.enabled // Enable autoloading of dted elevation as need from above directories. // (default=true) // Use: "true", "yes", "y" or "1" to enable, // "false", "no", "n" or "0" to disable. elevation.auto_load_dted.enabled: true // --- // --- // Keyword: elevation.auto_sort.enabled // Enable sorting of elevation cells on an add by the lowest(best) mean post // spacing. (default=true) // Use: "true", "yes", "y" or "1" to enable, // "false", "no", "n" or "0" to disable. elevation.auto_sort.enabled: true // --- // --- // Keyword: elevation.compute_statistics.enabled // // Enable computations of min and max height of each elevation cell. This // will force a write of a statistics file if one does not exists. If disabled // and the statistics file is not present the min and max value will be // undefined. Typically if you are doing mosaics of elevation you would want // this on. If you don't want a pause computing stats like in a 3d viewer // you would want this off. (default=true) // // Use: "true", "yes", "y" or "1" to enable, // "false", "no", "n" or "0" to disable. elevation.compute_statistics.enabled: true // --- }}} '''Testing your elevation:'''[[BR]] You should NEVER see nan's in imagelinker or ossimplanet. A "nan" is "Not A Number". There is a test application ossim-height to test your elevation. Usage is ossim-height . Example:[[BR]] {{{ $ ossim-height 27.84 -80.48 Opened cell: /data/image_formats/elevation/srtm/1arc/N27W081.hgt Geoid offset: -27.9172 Height above MSL: 11 Height above ellipsoid: -16.9172 }}} '''Some useful links:'''[[BR]] Elevation manager:[[BR]] [http://trac.osgeo.org/ossim/doxygen/classossimElevManager.html][[BR]] Geoid manager:[[BR]] [http://trac.osgeo.org/ossim/doxygen/classossimGeoidManager.html][[BR]] USGS srtm:[[BR]] [http://dds.cr.usgs.gov/srtm/version2_1/][[BR]] Geoid:[[BR]] [http://trac.osgeo.org/ossim/browser/trunk/ossim_package_support/geoids/geoid1996][[BR]]