Post Files are files that contain the values used in Grid Generation for the analysis. These are produced simply to see the values and how the contours work with these values. The post files are included in a single zip file containing the files in Surfer (.srf) format. Also included is a single zip file containing all the files in jpg format and a sample jpg file that is viewed on this page. At the bottom of the page is the script I used to generate these files.

100 Year 24 Hour Post File exported as a JPG Image
Script for Post File Generation and Export
Sub Main
Dim inputFile As String
Dim outputPath As String
Dim dirPath As String
dirPath = "C:Documents and SettingsAdministratorMy DocumentsresearchFEMA ProjectsRainfall Reports\"
inputFile = dirPath + "StationCoordinatesNGT20.xls"
outputPath = dirPath + "Post Maps\"
Dim colDurations(11) As String
colDurations(1) = "1HR"
colDurations(2) = "2HR"
colDurations(3) = "6HR"
colDurations(4) = "12HR"
colDurations(5) = "24HR"
colDurations(6) = "48HR"
colDurations(7) = "72HR"
colDurations(8) = "4D"
colDurations(9) = "5D"
Dim i As Integer
For i=1 To 9
createPostMap inputFile, "2YR", colDurations(i), "Sheet=2 Year", outputPath, i
createPostMap inputFile, "3YR", colDurations(i), "Sheet=3 Year", outputPath, i
createPostMap inputFile, "5YR", colDurations(i), "Sheet=5 Year", outputPath, i
createPostMap inputFile, "10YR", colDurations(i), "Sheet=10 Year", outputPath, i
createPostMap inputFile, "25YR", colDurations(i), "Sheet=25 Year", outputPath, i
createPostMap inputFile, "50YR", colDurations(i), "Sheet=50 Year", outputPath, i
createPostMap inputFile, "100YR", colDurations(i), "Sheet=100 Year", outputPath, i
createPostMap inputFile, "200YR", colDurations(i), "Sheet=200 Year", outputPath, i
createPostMap inputFile, "500YR", colDurations(i), "Sheet=500 Year", outputPath, i
Next i
End Sub
Sub createPostMap(inputFile As String, ReturnPeriod As String, colDuration As String, SheetOption As String, outputPath As String, ssCol As Integer)
Dim i As Integer
'Declares Plot as an object
Dim surferApp As Object
Set surferApp = CreateObject("Surfer.Application")
Dim Plot As Object
'Creates a plot document in Surfer and assigns it to the variable
'named "Plot"
Set Plot = surferApp.Documents.Add(srfDocPlot)
'Declares Shapes as an object
Dim Shapes As Object
Set Shapes = Plot.Shapes
Dim baseMap As Object
Set baseMap = Shapes.AddBaseMap(ImportFileName:="C:Documents and SettingsAdministratorMy DocumentsresearchFEMA ProjectsRainfall ReportsFL Counties Shape Filecs cty.shp")
Dim PostMap As Object
Set wksdoc1 = surferApp.Documents.Open(inputFile, Options:=SheetOption)
Set PostMap = Shapes.AddPostMap(inputFile, 6, 5, ssCol+7)
Plot.Selection.DeselectAll
baseMap.Selected = True
PostMap.Selected = True
Plot.Selection.OverlayMaps
surferApp.Documents.Item(1).SaveAs(outputPath + ReturnPeriod + colDuration + ".srf")
surferApp.Documents.Item(1).Export(outputPath + ReturnPeriod + colDuration + ".jpg")
End Sub
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |