C# Class CesiumLanguageWriter.Advanced.CesiumFormattingHelper

Contains static methods for formatting data for writing to a Cesium stream.
Show file Open project: AnalyticalGraphicsInc/czml-writer Class Usage Examples

Public Methods

Method Description
ClockRangeToString ( ClockRange value ) : string

Converts a ClockRange to the corresponding string in a CZML stream.

ClockStepToString ( ClockStep value ) : string

Converts a ClockStep to the corresponding string in a CZML stream.

ColorBlendModeToString ( CesiumColorBlendMode value ) : string

Converts a CesiumColorBlendMode to the corresponding string in a CZML stream.

CornerTypeToString ( CesiumCornerType value ) : string

Converts a CesiumCornerType to the corresponding string in a CZML stream.

DownloadUriIntoDataUri ( string uri ) : string

Downloads and converts a remote resource URI into a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified resource, and <ImageData> is the data encoded as a Base 64 string.

ExtrapolationTypeToString ( CesiumExtrapolationType value ) : string

Converts a CesiumExtrapolationType to the corresponding string in a CZML stream.

GetResourceUri ( string uri, CesiumResourceBehavior resourceBehavior ) : string

Returns a resolved url, using the given CesiumResourceBehavior.

HeightReferenceToString ( CesiumHeightReference value ) : string

Converts a CesiumHeightReference to the corresponding string in a CZML stream.

HorizontalOriginToString ( CesiumHorizontalOrigin value ) : string

Converts a CesiumHorizontalOrigin to the corresponding string in a CZML stream.

ImageToDataUri ( Image image, CesiumImageFormat imageFormat ) : string

Converts an image to a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified image, and <ImageData> is the image data encoded as a Base 64 string.

ImageToDataUri ( Stream stream, CesiumImageFormat imageFormat ) : string

Reads from a stream containing an image into a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified image format, and <ImageData> is the image data encoded as a Base 64 string. This method does not attempt to decode the image data, but simply writes it directly to the data URI.

InterpolationAlgorithmToString ( CesiumInterpolationAlgorithm value ) : string

Converts a CesiumInterpolationAlgorithm to the corresponding string in a CZML stream.

LabelStyleToString ( CesiumLabelStyle value ) : string

Converts a CesiumLabelStyle to the corresponding string in a CZML stream.

SensorVolumePortionToDisplayToString ( CesiumSensorVolumePortionToDisplay value ) : string

Converts a CesiumSensorVolumePortionToDisplay to the corresponding string in a CZML stream.

ShadowModeToString ( CesiumShadowMode value ) : string

Converts a CesiumShadowMode to the corresponding string in a CZML stream.

StripeOrientationToString ( CesiumStripeOrientation value ) : string

Converts a CesiumStripeOrientation to the corresponding string in a CZML stream.

ToIso8601 ( JulianDate date, Iso8601Format format ) : string

Converts a JulianDate to an ISO8601 date string.

ToIso8601Interval ( JulianDate start, JulianDate stop, Iso8601Format format ) : string

Converts a TimeInterval as an ISO8601 interval string.

ToIso8601Interval ( TimeInterval interval, Iso8601Format format ) : string

Converts a TimeInterval as an ISO8601 interval string.

VerticalOriginToString ( CesiumVerticalOrigin value ) : string

Converts a CesiumVerticalOrigin to the corresponding string in a CZML stream.

Private Methods

Method Description
BuildDataUri ( string mimeType, Stream dataStream ) : string
CesiumImageFormatToImageFormat ( CesiumImageFormat imageFormat ) : ImageFormat
GetMimeTypeFromCesiumImageFormat ( CesiumImageFormat imageFormat ) : string

Method Details

ClockRangeToString() public static method

Converts a ClockRange to the corresponding string in a CZML stream.
public static ClockRangeToString ( ClockRange value ) : string
value ClockRange The value to convert.
return string

ClockStepToString() public static method

Converts a ClockStep to the corresponding string in a CZML stream.
public static ClockStepToString ( ClockStep value ) : string
value ClockStep The value to convert.
return string

ColorBlendModeToString() public static method

Converts a CesiumColorBlendMode to the corresponding string in a CZML stream.
public static ColorBlendModeToString ( CesiumColorBlendMode value ) : string
value CesiumColorBlendMode The value to convert.
return string

CornerTypeToString() public static method

Converts a CesiumCornerType to the corresponding string in a CZML stream.
public static CornerTypeToString ( CesiumCornerType value ) : string
value CesiumCornerType The value to convert.
return string

DownloadUriIntoDataUri() public static method

Downloads and converts a remote resource URI into a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified resource, and <ImageData> is the data encoded as a Base 64 string.
public static DownloadUriIntoDataUri ( string uri ) : string
uri string The URI of the resource to convert.
return string

ExtrapolationTypeToString() public static method

Converts a CesiumExtrapolationType to the corresponding string in a CZML stream.
public static ExtrapolationTypeToString ( CesiumExtrapolationType value ) : string
value CesiumExtrapolationType The value to convert.
return string

GetResourceUri() public static method

Returns a resolved url, using the given CesiumResourceBehavior.
public static GetResourceUri ( string uri, CesiumResourceBehavior resourceBehavior ) : string
uri string The url of the resource.
resourceBehavior CesiumResourceBehavior A specifying how include the resource into a CZML document.
return string

HeightReferenceToString() public static method

Converts a CesiumHeightReference to the corresponding string in a CZML stream.
public static HeightReferenceToString ( CesiumHeightReference value ) : string
value CesiumHeightReference The value to convert.
return string

HorizontalOriginToString() public static method

Converts a CesiumHorizontalOrigin to the corresponding string in a CZML stream.
public static HorizontalOriginToString ( CesiumHorizontalOrigin value ) : string
value CesiumHorizontalOrigin The value to convert.
return string

ImageToDataUri() public static method

Converts an image to a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified image, and <ImageData> is the image data encoded as a Base 64 string.
public static ImageToDataUri ( Image image, CesiumImageFormat imageFormat ) : string
image Image The image to convert.
imageFormat CesiumImageFormat The format of the image, which controls the mime type.
return string

ImageToDataUri() public static method

Reads from a stream containing an image into a data URI in the form data:<MimeType>;base64,<ImageData>, where <MimeType> is the MIME type of the specified image format, and <ImageData> is the image data encoded as a Base 64 string. This method does not attempt to decode the image data, but simply writes it directly to the data URI.
public static ImageToDataUri ( Stream stream, CesiumImageFormat imageFormat ) : string
stream Stream The stream containing the image to encode into a data URI.
imageFormat CesiumImageFormat The format of the image, which controls the mime type.
return string

InterpolationAlgorithmToString() public static method

Converts a CesiumInterpolationAlgorithm to the corresponding string in a CZML stream.
public static InterpolationAlgorithmToString ( CesiumInterpolationAlgorithm value ) : string
value CesiumInterpolationAlgorithm The value to convert.
return string

LabelStyleToString() public static method

Converts a CesiumLabelStyle to the corresponding string in a CZML stream.
public static LabelStyleToString ( CesiumLabelStyle value ) : string
value CesiumLabelStyle The value to convert.
return string

SensorVolumePortionToDisplayToString() public static method

Converts a CesiumSensorVolumePortionToDisplay to the corresponding string in a CZML stream.
public static SensorVolumePortionToDisplayToString ( CesiumSensorVolumePortionToDisplay value ) : string
value CesiumSensorVolumePortionToDisplay The value to convert.
return string

ShadowModeToString() public static method

Converts a CesiumShadowMode to the corresponding string in a CZML stream.
public static ShadowModeToString ( CesiumShadowMode value ) : string
value CesiumShadowMode The value to convert.
return string

StripeOrientationToString() public static method

Converts a CesiumStripeOrientation to the corresponding string in a CZML stream.
public static StripeOrientationToString ( CesiumStripeOrientation value ) : string
value CesiumStripeOrientation The value to convert.
return string

ToIso8601() public static method

Converts a JulianDate to an ISO8601 date string.
public static ToIso8601 ( JulianDate date, Iso8601Format format ) : string
date JulianDate The date to convert.
format Iso8601Format The format to use.
return string

ToIso8601Interval() public static method

Converts a TimeInterval as an ISO8601 interval string.
public static ToIso8601Interval ( JulianDate start, JulianDate stop, Iso8601Format format ) : string
start JulianDate The start of the interval.
stop JulianDate The end of the interval.
format Iso8601Format The format to use.
return string

ToIso8601Interval() public static method

Converts a TimeInterval as an ISO8601 interval string.
public static ToIso8601Interval ( TimeInterval interval, Iso8601Format format ) : string
interval TimeInterval The interval to convert.
format Iso8601Format The format to use.
return string

VerticalOriginToString() public static method

Converts a CesiumVerticalOrigin to the corresponding string in a CZML stream.
public static VerticalOriginToString ( CesiumVerticalOrigin value ) : string
value CesiumVerticalOrigin The value to convert.
return string