Touchstone Re 2023 API Reference
GetIntensityAnalysisResults Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > HazardAnalysisServiceClient Class : GetIntensityAnalysisResults Method
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.
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.

Syntax
Public Function GetIntensityAnalysisResults( _
   ByVal request As GetIntensityAnalysisResultsRequest _
) As GetIntensityAnalysisResultsResponse
Dim instance As HazardAnalysisServiceClient
Dim request As GetIntensityAnalysisResultsRequest
Dim value As GetIntensityAnalysisResultsResponse
 
value = instance.GetIntensityAnalysisResults(request)
public GetIntensityAnalysisResultsResponse GetIntensityAnalysisResults( 
   GetIntensityAnalysisResultsRequest request
)

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

A GetIntensityAnalysisResultsResponse that contains the list of event intensity data, as well as a description of the the paging layout of the data.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

To find the Analysis SID to pass into this method, call the GetActivity() method. The Analysis SID is stored in the GetActivityResponse.Activity.AnalysisSid property.

Example
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);
                }
            }
        }
    }
}
Requirements

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

See Also

Reference

HazardAnalysisServiceClient Class
HazardAnalysisServiceClient Members