Version 2 (modified by mggr, 17 years ago) (diff)

--

Creation of DEMs from NextMap data

(fast notes)

load arc files into grass

  • import->raster->gdal
  • pick file
  • choose create new location if this is the first import
  • run (will fail for UK as it needs user input)
  • 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
  • if you need to import multiple rasters, you can use the location created, but must select extend region
  • (need to figure out how to join rasters into one, then subset in grass)

export as ASCII grid

[you can load this grid into ENVI to test against vector layers, etc - file->open external->generic->ascii, then georeference (edit headers->mapinfo, etc)]

edit ASCII file to have an azgcorr compatible header (first line must be as follows, then DEM data):

 -ed or c r xm ym xx yx gi : is the basic flat file ascii DEM definition
            : or = data order =0 rows S->N, =1 rows N->S
            : c = cols, r = rows, xm, ym = SW, xx, yx = NE corners
            : gi = grid increments; grid values separated by spaces
            : ** NB: for this definition georeferencing of the DEM grid is assumed
            :    to be at the CENTRE of the cell defined by the grid coordinates
            : ** if this is NOTthe case use option -edx, below

 e.g.
    1 2000 2000 400000 850000 410000 860000 5
 N->s Xsize YSize Xmin Ymin   Xmax   Ymax   grid size (5m for nextmap)

Use DEM with azgcorr -eh demfilename


Command line method

Starting from a valid location (in correct projection?)

 # read in a tile
r.in.gdal -e input=/data/aegean1/nextmap_dems/neodc/by_tile/by_product/dsm/tl/tl17/tl17dsm/w001001.adf output=tl17
 # set the region of interest to the (two) tiles we want to export
g.region rast=tl17,tl27
 # patch them together into a single raster
r.patch input=tl17,tl27 output=tl17and27
 # write out as an ASCII DEM (needs editing as above)
r.out.ascii input=tl17and27 output=/tmp/tl17and27.dem null=*

Attachments (2)

Download all attachments as: .zip