/*-------------------------------------------------------------------------- /* Oregon Department of Forestry, Salem Oregon /* ARC/INFO AML /* /* Program: PRO-WKSP.AML /* Project: Projection of coverages to Oregon Lambert /* Workspace: /odf/gpl_proj /* Usage: PRO-WKSP /* Arguments: wksp- workspace to be processed kind - name of the projection file /* History: Emmor Nile, - 09/11/96 - 08:50:01 - First coded /* /* AML to make a list of coverages in a workspace, rename coverages, /* project them to a new projection, and kill the original coverage: /* WARNING: a tape backup should be made before this AML is run /* coverages will need to be re-built after projecting /* the assumption is that all coverages are in the same /* map projection and the proper project file is passed as /* an argument to the aml. /* GRIDS, TINS, & Libraries are not projected. /* /*-------------------------------------------------------------------------- /* &args wksp prjfile &severity &error &routine bailout &sv kind %prjfile% /*spni83olm.prj /* insert path here /* /* Check arguments &if ^ [null %kind%] and ^ [null %wksp%] &then &call user_routine &else &call usage &return /*------------------- &routine USER_ROUTINE /*------------------- &sv ver [extract 1 [SHOW version]] /* ARC/INFO version /* &echo &on &workspace %wksp% &if [exists pwkcov.lst -file] &then &do &type '"pwkcov.lst" already exists, a backup will be made.\' &sys mv pwkcov.lst pwkcov.bulst &end &sv look [filelist * pwkcov.lst -cover] &sv aml_unit [open pwkcov.lst openstatus -read] &sv c_stat1 0 &do &until %c_stat1% <> 0 &sv name [extract 1 [read %aml_unit% c_stat1]] &if %c_stat1% <> 102 &then &do &severity &error &fail &echo &on rename %name% z%name% project cover z%name% %name% %kind% &if [exists %name% -cover] &then kill z%name% all &echo &off &end &end &type \A list of coverages projected is in file %wksp%/pwkcov.lst.\ &workspace ../ /* &echo &off &return /*------------ &routine USAGE /*------------ &type Usage: &run PRO-WKSP &return &inform /*----------- &routine EXIT /*----------- &dv .pro-wksp$* &if [show &thread &exists tool$pro-wksp] &then &thread &delete tool$pro-wksp &return /*-------------- &routine BAILOUT /*-------------- &sv ver [extract 1 [SHOW version]] /* ARC/INFO version &if %ver% = 6.1.1 &then &do &type \Error:&return;q;&return &error &end &return;&return &error \Last error: %aml$message%\Line: %AML$LINE% of %AML$FILE% /* /* _-__ ________ ****************************************************** /* \ \__-__/ \ Emmor H. Nile Tel#: 503-945-7418 * /* \ ) GIS Project Coordinator FAX#: 503-945-7314 * /* | + Salem / Oregon Department of Forestry www.odf.state.or.us * /* | / 2600 State Street * /* / O R E G O N | Salem, OREGON 97310 USA * /* ( | EMAIL:Emmor.H.NILE@state.or.us * /* \_________________| ******************************************************