Click or drag to resize

StkFacilityDatabase Class

Provides access to an STK facility database.
Inheritance Hierarchy

Namespace:  AGI.Foundation.Stk
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 22.2.414.0 (22.2.414.0)
public class StkFacilityDatabase

The StkFacilityDatabase type exposes the following members.

Public methodStkFacilityDatabase
Initializes a new instance.
Public propertyLastUpdateDate
Gets the last update date reported in the Generic Database (.gd) file, or MinValue if the file does not exist or does not contain a LastUpdate field.
Public propertyVersion
Gets the version number reported in the Generic Database (.gd) file, or "Unknown" if the file does not exist or does not contain a Version field.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCentralBodies
Gets the central bodies of the facilities in the database.
Public methodGetEntries
Gets all of the entries in the database.
Public methodGetEntries(StkFacilityDatabaseQuery)
Gets all of the entries in the database matching a specified query.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNetworks
Gets the networks of the facilities in the database.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Extension Methods
Public Extension MethodCreatePlatformsOverloaded.
Creates a platform for each facility entry in the supplied database.
(Defined by StkFacilityDatabaseExtensions.)
Public Extension MethodCreatePlatforms(StkFacilityDatabaseQuery)Overloaded.
Creates platforms representing the facilities in the database that match the input query.
(Defined by StkFacilityDatabaseExtensions.)

The following example shows how to query the facility database for facilities matching certain criteria:

StkFacilityDatabase db = new StkFacilityDatabase(dbDirectory, "stkFacility");

// Create a query object and then populate it with the properties to query on.
// Regular expressions are used to query on strings.
StkFacilityDatabaseQuery query = new StkFacilityDatabaseQuery
    FacilityName = new Regex("^Diyarbak"),

// Get the database entries matching the query and print out the Longitude and Latitude of each.
foreach (StkFacilityDatabaseEntry entry in db.GetEntries(query))
    Console.WriteLine("{0}: Longitude {1}, Latitude {2}", entry.FacilityName, entry.Longitude, entry.Latitude);
See Also