Changes between Version 9 and Version 10 of Processing/NextMapDEMs


Ignore:
Timestamp:
Sep 2, 2008, 10:41:08 AM (16 years ago)
Author:
mggr
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Processing/NextMapDEMs

    v9 v10  
    11= Creation of DEMs from NextMap data =
    22
    3 (fast notes)
     3The azgcorr format is plain ASCII text, with decimal numbers separated by spaces, one row per row of the DEM.  At the top of the file, you need a single line that describes the geographic position of the DEM.
    44
    5 load arc files into grass
    6  * import->raster->gdal
    7  * pick file
    8  * choose create new location if this is the first import
    9  * run (will fail for UK as it needs user input)
    10  * copy and paste command into grass shell so you can respond (e.g. `r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/nk/nk02/nk02dsm/w001001.adf output=nk02`
    11  * if you need to import multiple rasters, you can use the location created, but must select extend region
    12  * (need to figure out how to join rasters into one, then subset in grass)
    13  
    14 export as ASCII grid
     5NextMAP DEMs are supplied in Arc format.  To do the conversion, we use GRASS, though other tools will probably work fine too.   Basic process is:
     6 * load in the tiles you need
     7 * patch them together, adding zero levels if necessary
     8 * output as ASCII
     9 * add the azgcorr header line (manually or by script)
    1510
    16 [you can load this grid into ENVI to test against vector layers, etc - file->open external->generic->ascii, then georeference (edit headers->mapinfo, etc)]
     11----------
     12== Command line method ==
     13Starting from a valid location (in the correct projection)
    1714
    18 The azgcorr format is plain ASCII text, with decimal numbers separated by spaces, one row per row of the DEM.  At the top of the file, you need a single line that describes the geographic position of the DEM.
     15{{{
     16 # read in a couple of tiles
     17r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/tl/tl17/tl17dsm/w001001.adf output=tl17
     18r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/tl/tl17/tl17dsm/w001001.adf output=tl27
     19 # set the region of interest to the (two) tiles we want to export
     20g.region rast=tl17,tl27
     21 # patch them together into a single raster
     22r.patch input=tl17,tl27 output=tl17and27
     23 # write out as an ASCII DEM (needs editing as below)
     24r.out.ascii input=tl17and27 output=/tmp/tl17and27.dem null=0
     25}}}
     26
     27Then run the demheaderconvert.sh script or manually edit the DEM file to include an azgcorr header (or you can specify this on the command line if you prefer).
     28
     29
     30== Adding the azgcorr header ==
    1931
    2032Run the script to convert the ASCII file to have an azgcorr compatible header. Note this will delete the original ASCII file unless you specify -nodel at the end. The optional resolution argument specifies the DEM grid resolution in metres, defaults to 5m if omitted.
     
    4254Use DEM with azgcorr -eh demfilename
    4355
    44 ----------
    45 = Command line method =
    46 Starting from a valid location (in correct projection?)
    47 
    48 {{{
    49  # read in a tile
    50 r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/tl/tl17/tl17dsm/w001001.adf output=tl17
    51  # set the region of interest to the (two) tiles we want to export
    52 g.region rast=tl17,tl27
    53  # patch them together into a single raster
    54 r.patch input=tl17,tl27 output=tl17and27
    55  # write out as an ASCII DEM (needs editing as above)
    56 r.out.ascii input=tl17and27 output=/tmp/tl17and27.dem null=0
    57 }}}
    58 
    59 (then remember to run the demheaderconvert.sh script).
    6056
    6157---------
    62 To add a zero-level area to a map (ie sea level):
     58== To add a zero-level area to a map (ie sea level): ==
    6359
    6460In GRASS:
     
    8884r.out.ascii input=map_with_added_sea_level output=/tmp/map_with_added_sea_level.dem null=0
    8985}}}
     86
     87
     88== GRASS GUI method ==
     89
     90(brief description)
     91
     92load arc files into grass
     93 * import->raster->gdal
     94 * pick file
     95 * choose create new location if this is the first import
     96 * run (will fail for UK as it needs user input)
     97 * copy and paste command into grass shell so you can respond (e.g. `r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/nk/nk02/nk02dsm/w001001.adf output=nk02`
     98 * if you need to import multiple rasters, you can use the location created, but must select extend region
     99 * (need to figure out how to join rasters into one, then subset in grass)
     100 
     101export as ASCII grid, manually add header as above
     102
     103[you can load this grid into ENVI to test against vector layers, etc - file->open external->generic->ascii, then georeference (edit headers->mapinfo, etc)]