Click or drag to resize

StkPatternFileReadFrom Method (TextReader, StkPatternFileOptions)

Reads an STK pattern (.pattern) file from a TextReader. The TextReader can be a StreamReader for reading from a file, a StringReader for reading from a string, or any number of other types. See the Remarks section for more information.

Namespace:  AGI.Foundation.Stk
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 19.1.398.0 (19.1.398.0)
Syntax
public static StkPatternFile ReadFrom(
	TextReader reader,
	StkPatternFileOptions readOptions
)

Parameters

reader
Type: System.IOTextReader
The reader from which to read the pattern.
readOptions
Type: AGI.Foundation.StkStkPatternFileOptions
An object containing any additional instructions for the read process.

Return Value

Type: StkPatternFile
An StkPatternFile instance containing the read pattern file.
Exceptions
ExceptionCondition
InvalidDataException Thrown when the STK pattern file is invalid or it contains unsupported properties or property values.
Remarks

The STK pattern file format is a mix of well-defined, unambiguous properties, and fairly STK-specific properties that are difficult to interpret outside of the context of STK. As a result, this method should be considered a "best effort" that works well in most common cases, but that may have problems with certain pattern files.

By default, when this method does not understand a property or property value read from the file, it will throw an InvalidDataException describing the problem. You can attempt to read files with unsupported properties or property values by setting the IgnoreUnsupportedProperties and IgnorePropertiesWithUnsupportedValues properties of the StkPatternFileOptions passed to this method to . With these properties set, unsupported properties and property values will be added to the UnsupportedProperties and PropertiesWithUnsupportedValues dictionaries, respectively, and the reader can make no guarantees that its results will match STK.

Here are the known limitations, compared to STK, when reading a pattern file using this method:

  • Only the following properties are supported: NumberPoints, ReferenceDistance, FovSamplingAngle
  • Only the following pattern formats are supported: Reference Plane Format, Az-El Mask Format, Angle-Off-Boresight Format.

See Also