/* ======================================================================== /* @(#)topoclass.aml 1.2 4/05/1999 07:48:33 /*------------------------------------------------------------------------- /* Lab for synthetic dynamic vegephenomenology /*------------------------------------------------------------------------- /* Program: TOPOCLASS.AML /* Purpose: This AML reads a topographic position grid (as generated /* e.g. by toposcale.aml. It then classifies the input grid /* into topographic position based on the class tresholds as /* derived from an AscII file. /* /*------------------------------------------------------------------------- /* Usage: &r topoclass /*------------------------------------------------------------------------- /* Notes: This AML is best performed in combination with toposcale.aml. /* It was designed to classify topographic position from the /* resulting grids of toposcale.aml. If the classes covered in /* the AscII file do not cover the whole range of data in the /* input grid then the respective pixels are classified as NO /* DATA. /*------------------------------------------------------------------------- /* Input: toposcale, toposcales /* Output: topoclass /*------------------------------------------------------------------------- /* History: Niklaus E Zimmermann - 9/18/1997 - Original coding /* Niklaus E Zimmermann - 4/06/1999 - Improved user interface /*========================================================================= &sys clear &if [show program] ne GRID &then &do &ty &ty Attention: This AML has to be started in GRID. &ty Start grid and re-run the program. &ty &goto done &end &sv top := [response 'Enter name (& path) of the topographic position file '] &if ^ [exists %top% -grid] &then &return &error Grid %top% does not exist. &sv out := [response 'Enter name (& path) of the output grid name '] &if [exists %out% -grid] &then &return &error Grid %out% does already exists. &sv rcl := [response 'Enter the name (& path) of the reclassification file '] &if ^ [exists %rcl% -file] &then &return &error The reclassification file %rcl% does not exist. %out% = reclass(%top%,%rcl%,NODATA) &label done