Changes between Initial Version and Version 1 of Processing/AplUserGuide


Ignore:
Timestamp:
Feb 7, 2012 11:23:02 AM (8 years ago)
Author:
mark1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Processing/AplUserGuide

    v1 v1  
     1= APL User Guide - Level 1 to Level 3 processing =
     2
     3A guide to processing ARSF delivered level 1 hyperspectral data to a mapped image. Please note that this guide is available as a pdf document from [wiki:Downloads here].
     4
     5-----------------------------------------
     6== Summary of the Mapping Procedure ==
     7
     8The hyperspectral data delivered by the Natural Environment Research Council (NERC) Airborne
     9Research Survey Facility (ARSF) will almost certainly be in level-1 format. This is data
     10which has had radiometric calibration routines applied and navigation data appended. To get
     11level-3 geocorrected data you need to perform a few extra steps. These steps can be summarised
     12as:
     13
     14* '''Creating an Input Geometry (IGM) file.''' This is a file which relates each level-1 pixel to a Geographic Latitude and Longitude position.
     15
     16* '''Reprojecting.''' Since most people do not want to map their data in Geographic Latitude and Longitude, the IGM file must be reprojected into a suitable projection.
     17
     18* '''Gridding.''' Once the IGM file has been reprojected into the desired projection system the level-1 data can be gridded into a regular map grid.
     19
     20This document will help you proceed to generate level-3 products from your ARSF data, using
     21the available software. Please ensure you have the most up to date version of this document,
     22which will be available from the ARSF Data Analysis Node website, along with the most up to
     23date versions of the mapping software.
     24----------------------------------
     25
     26== Creating an IGM file ==
     27To create an IGM file from your level-1 data you need to use the aplcorr package. This can be
     28downloaded from the ARSF-DAN website downloads page [wiki:Downloads here].
     29
     30aplcorr is designed to take in the calibrated level-1 binary BIL (Band Interleaved by Line) file and create a new binary 3 band BIL file. The bands are defined as:
     31 * Longitude
     32 * Latitude
     33 * Height
     34
     35This new BIL file will have the same row and column dimensions as the original level-1 data BIL file, meaning that for each pixel of the level-1 data there is a corresponding longitude, latitude, height triple. Once you have this file you will be ready to proceed to the next step of
     36the geocorrection procedure.
     37
     38To create the most accurate IGM possible it is essential to use a Digital Elevation Model (DEM). This will allow the height of the imaged ground scene to be taken into account. It is possible to create an IGM file without a DEM in aplcorr ; in this case it will use the WGS-84 ellipsoid model as a height reference. This will result in errors in the geolocation, the magnitude of which will depend on the elevation difference between the ellipsoid surface and the true ground surface.
     39
     40Currently aplcorr DEMs have to be in the WGS-84 datum Geographic Latitude/Longitude projection. If your DEM is in another coordinate system it will have to be reprojected prior to using it in the aplcorr program. This can be done using a GIS program such as GRASS. Alternatively the scripts available to download from here can be used.
     41
     42=== Digital Elevation Model format for aplcorr ===
     43This section describes the format of the Digital Elevation Models that aplcorr accepts. Currently there is only a single format and projection that is accepted but in future releases this may change.
     44
     45'''Projections'''
     46
     47 * '''Geographic Longitude/Latitude''' in the '''WGS-84''' datum. Data values should be in decimal degrees, positive to North and East with zero at the equator and Greenwich Meridian.
     48
     49'''File Formats'''
     50 * '''Band Interleaved by Line (BIL)''' 1 band file with data type 8-bit, 16/32-bit unsigned integer, 16/32-bit signed integer or 32/64-bit floating point. This file format is associated with the ENVI image processing package.
     51
     52 * '''Band Sequential (BSQ)''' 1 band file with data type 8-bit, 16/32-bit unsigned integer, 16/32-bit signed integer or 32/64-bit floating point. This file format is associated with the ENVI image processing package.
     53
     54=== Reprojecting a DEM into Geographic Longitude/Latitude ===
     55
     56Most Digital Elevation Models are not going to be projected in latitude/longitude and so will require transformation into this projection. This can be done using a GIS package. There are also scripts available from ARSF-DAN (see the downloads page) that make use of the open source GRASS GIS to reproject DEM data. A description on the use of these scripts is given further below. A suitable DEM, produced from freely available sources such as ASTER or SRTM data, should also be included in your data delivery.
     57
     58If you do not have access to a GIS then the open source GDAL utilities can be used to reproject a DEM and convert the file format. The gdalwarp program can warp a DEM from one projection to another but currently only supports horizontal reprojection, i.e. the elevation data values are not adjusted for vertical datum shifts. So this can be used for DEMs which are already in the WGS-84 vertical datum, for example, a DEM in WGS-84 UTM Eastings and Northings.
     59
     60The gdal_translate utility can be used to convert between different file formats. For a full list of supported file formats and help on the GDAL package see the [http://www.gdal.org GDAL] website. For example, to convert a GeoTiff DEM called dem.tif into an ENVI style DEM for aplcorr named dem.bsq:
     61{{{gdal_translate -of ENVI dem.tif dem.bsq}}}
     62
     63If you do not have a DEM covering the area of your data then you can download ASTER elevation data and construct a DEM for your flight line coverage. More information about the dataset is available at http://www.ersdac.or.jp/GDEM/E/2.html, the data itself can be downloaded from http://asterweb.jpl.nasa.gov/gdem-wist.asp.
     64
     65It should be noted that aplcorr will not accept a DEM that contains NULL data in the required region. If it finds a NULL data cell then it will exit at that point.
     66
     67=== Converting DEM data using the ARSF scripts ===
     68
     69This section describes how to use the ARSF DEM transformation scripts to convert a DEM that is in a GDAL supported format or GRASS ASCII raster format into an aplcorr format. The procedure is slightly different for data in UK Ordnance Survey National Grid projection than for other projections and so both methods are described. For non-UK re-projections, no extra files are needed assuming that the projection and datum transformations are implemented ‘built-in’ by PROJ4. PROJ4 is an open source library of coordinate transformations. More information about these libraries can be found on the web at http://trac.osgeo.org/proj/. If grid shift files are required to do the transformation for your DEM then a different approach may be needed.
     70
     71Note that the scripts will apply an interpolation routine to remove any NULL values before outputting the new DEM. This could be unsuitable for DEMs which contain large regions of NULLs (such as a large body of water) or very large DEMs. In these cases a better approach would be to patch the DEM with another suitable surface to remove the NULLs prior to conversion.
     72
     73[wiki:Processing/Scripts/demconversionscript Please follow this link to see the guide for using these scripts]
     74
     75=== Example aplcorr commands ===
     76
     77A few example commands to create an IGM file follow. To see example commands specific to your dataset please refer to the read-me document provided with your ARSF data delivery.
     78
     79'''Process an Eagle line using a DEM'''
     80
     81{{{aplcorr -navfile line1_navigation.bil -lev1file line1_calibrated.bil -vvfile eagle_fov_fullccd_vectors.bil -dem myarea_dem.bil -igmfile output.igm}}}
     82
     83'''Process an Eagle line using the WGS-84 ellipsoid surface'''
     84
     85{{{aplcorr -navfile line1_navigation.bil -lev1file line1_calibrated.bil -vvfile eagle_fov_fullccd_vectors.bil -igmfile output.igm}}}
     86
     87'''Process a Hawk line using the WGS-84 ellipsoid surface with additional height of 50m'''
     88
     89{{{aplcorr -navfile line1_navigation.bil -lev1file line1_calibrated.bil -vvfile hawk_fov_fullccd_vectors.bil -heightoffset 50 -igmfile output.igm}}}
     90
     91'''Process a Hawk line and output parameters for use in external atmospheric algorithms'''
     92
     93{{{aplcorr -navfile line1_navigation.bil -lev1file line1_calibrated.bil -vvfile hawk_fov_fullccd_vectors.bil -dem myarea_dem.bil -igmfile output.igm -atmosfile line1_atmospheric_parameters.bil}}}
     94
     95--------------------------------------
     96
     97== Reprojecting the IGM Geolocation Information ==
     98
     99Often it will be the case where you do not want to create a map in Geographic Longitude/Latitude. In these cases you will require the IGM file created from the previous stage to be re-projected into a more usable projection. This should be easily performed using a GIS system - the IGM file is a 3-band BIL file (ENVI format) which most GIS systems can handle. A package is provided called apltran for users who do not wish to use a GIS to transform the IGM. This is really just a wrapper program for the open source [http://trac.osgeo.org/proj/ PROJ.4] library.
     100
     101=== Using apltran ===
     102
     103The usage of apltran is fairly straight forward and should be no problem if you are familiar with using the PROJ.4 libraries. If you have not used PROJ.4 before then this section could be of interest. PROJ.4 uses strings to describe the projections that it is transforming to and from. apltran has some projection strings built into it to make it easier to use.
     104
     105To reproject to the Ordnance Survey National Grid (OSTN02) you need to download a grid shift file from:
     106
     107[http://www.ordnancesurvey.co.uk/oswebsite/gps/osnetfreeservices/furtherinfo/ostn02_ntv2.html]
     108
     109This file needs to be unzipped and the one of interest for apltran is the one with .gsb extension.
     110
     111=== Example apltran commands ===
     112
     113'''Transform to OS National Grid'''
     114
     115If you want to map your data to Ordnance Survey National Grid coordinates then you need to use a command line like:
     116
     117{{{apltran -igm line01.igm -output line01 OSNG.igm -outproj osng gridfile.gsb}}}
     118
     119where the gridfile.gsb is the NTv2 format file that performs the OSTN02 grid shift.
     120
     121'''Transform to UTM'''
     122
     123If you want to map your data into the UTM North zone 30 projection system (on the WGS84
     124ellipsoid) then you would use a command like:
     125
     126{{{apltran -igm line01.igm -output line01 UTM30.igm -outproj utm wgs84N 30}}}
     127
     128
     129
     130
     131
     132