3月 072012
 

ScriptFileName=”SingleContourGen.gms”
ContourInterval=100
ContourElevtion=0
ContourElevtionHighest=1000

Set fso = CreateObject(“Scripting.FileSystemObject”)
Set MyFile = fso.CreateTextFile(ScriptFileName, True)
MyFile.WriteLine(“GLOBAL_MAPPER_SCRIPT VERSION=””1.00″””)
MyFile.WriteLine(“ENABLE_PROGRESS=YES”)

Do
MyFile.WriteBlankLines(2)
MyFile.WriteLine(“GENERATE_CONTOURS ELEV_UNITS=METERS SIMPLIFICATION=0 SINGLE_LEVEL_ONLY=YES \”)
MyFile.WriteLine(“INTERVAL=”&ContourElevtion)

MyFile.WriteBlankLines(1)

MyFile.WriteLine(“EXPORT_VECTOR GEN_WORLD_FILE=YES GEN_PRJ_FILE=YES \”)
MyFile.WriteLine(“FILENAME=Contour”&ConTourElevtion&”.shp TYPE=SHAPEFILE SHAPE_TYPE=LINES”)

MyFile.WriteBlankLines(1)

MyFile.WriteLine(“UNLOAD_LAYER FILENAME=”)

ContourElevtion=ContourElevtion+ContourInterval

Loop While ContourElevtion <= ContourElevtionHighest

MyFile.Close

 Posted by at 下午 2:17

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)