Retrieves a
list of event intensity data generated during a
Hazard Analysis.
The event intensity data includes location information, as well as the intensity of Coastal Flood, Earthquake, Inland Flood, and Windstorm events that affect the location, if requested.
Parameters
- request
- Contains a GetIntensityAnalysisResultsRequest that identifies the Touchstone-generated Analysis Sequential Identifier (SID) of the Hazard Analysis that includes the results, your preferred paging layout, and the Business Unit SID and SQL Instance SID associated with the analysis.
Return Value
The following example shows how to retrieve Touchstone Intensity Analysis results using the
GetIntensityAnalysisResults()
method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.HazardAnalysis.Api;
using AIR.Services.HazardAnalysis.Data;
using AIR.Services.Hazard.Data;
class SnippetGetIntensityAnalysisResultsRequest
{
private static void GetIntensityAnalysisResults(int businessUnitSid, int sqlInstanceSid, int analysisSid)
{
HazardAnalysisServiceClient hazardClient = new HazardAnalysisServiceClient();
GetIntensityAnalysisResultsRequest request = new GetIntensityAnalysisResultsRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
request.AnalysisSid = analysisSid;
//Implement your Logic to loop through all the records
int page = 1; int pageSize = 20;
request.PagingInfo = new PagingInfo { PageNumber = page, PageSize = pageSize };
GetIntensityAnalysisResultsResponse response = hazardClient.GetIntensityAnalysisResults(request);
if (response.Status.Code == StatusCode.Success)
{
foreach (IntensityResult result in response.Results)
{
//Output some of the values from response
Console.WriteLine("------------------ Location Id: " + result.LocationId + " -----------------------");
if (result.CoastalFlood != null)
{
Console.WriteLine(" --- Coastal Flood Profile: -----------------------");
Console.WriteLine("Flood Depth: " + result.CoastalFlood.COnPlainFloodDepth);
Console.WriteLine("Flood Depth Unit: " + result.CoastalFlood.COnPlainFloodDepthUnit);
}
if (result.Earthquake != null)
{
Console.WriteLine(" --- Earthquake Profile: -----------------------");
Console.WriteLine("PGA: " + result.Earthquake.Pga);
Console.WriteLine("PGA Unit: " + result.Earthquake.PgaUnit);
}
if (result.Wind != null)
{
Console.WriteLine(" --- Wind Profile: -----------------------");
Console.WriteLine("Maximum Wind Speed: " + result.Wind.MaximumWindSpeed);
Console.WriteLine("Maximum Wind Speed Unit: " + result.Wind.MaximumWindSpeedUnit);
}
}
}
}
}
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2