TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Raster in Tinman.Terrain.Georef

Defines a mapping from raster space to map space.

[ShutdownSurvive]
sealed class Raster extends GeoObject

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<Raster>
value [not-null] The configurator object.

ToConfig

Returns the configuration value that describes this object.

public override method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements GeoObject.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

Exceptions:

Private / Constructors

Raster

[Internal]
public constructor Raster ()

Public / Attributes

Coordinates

The coordinate system.

public property Coordinates { get }
type CoordinateSystem
value [not-null] The coordinate system.

FaceBounds

Returns the map bounds of Face for this raster.

public property FaceBounds { get }
type Box2D
value The map bounds.

Name

The human-readable name of this object.

public property Name { get }
type string
value [not-empty] The object name.
inherited GeoObject.Name

SerialType

Returns the serial type of this object.

public property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited SerializableBase.SerialType

SerialVersion

Returns the serial data version.

public virtual property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited SerializableBase.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

Transform

The transform that maps raster coordinates (raster X- and Y-coordinates) to map coordinates resp. to geographic coordinates (see IsProjection).

public property Transform { get }
type IRasterTransform
value [not-null] The raster transform.

Type

The type of this geo object.

public property Type { get }
type GeoObjectType
value The geo object type.
inherited GeoObject.Type

Public / Constants

GeographicCube

A cubemap raster using the WGS84 coordinate system with a cubemap edge length of MaxSize.

public static readonly field GeographicCube
type Raster

GeographicMoon

A cubemap raster using the Moon coordinate system with a cubemap edge length of MaxSize.

public static readonly field GeographicMoon
type Raster

PopularMercator

A rectangular raster using the PopularMercator coordinate system with an edge length of MaxSize.

public static readonly field PopularMercator
type Raster

Public / Constructors

ForMap

Adjusts the given raster for the specified map.

public static method ForMap (Raster raster, MapInfo map)
type Raster
params raster The raster or null.
  map The map.
returns The resulting raster or null if raster is null.

Remarks:

If the map is a cube (see Cube), the transform (see Transform) of the given raster will be replaced with a cubemap transform (see Cube) and the coordinate system will be transformed to a geographic one (see ToGeographic). Otherwise, the given raster will be returned as it is.

See also:

RasterTransform.Cube

Adjusts the given raster for the specified map.

public static method ForMap (Raster raster, MapType type, int32 size = MappingUtil.MaxSize)
type Raster
params raster The raster or null.
  type The map type.
  size [pow2] The map size (see Size). Defaults to MaxSize.
returns The resulting raster or null if raster is null.

Remarks:

If the map is a cube (see Cube), the transform (see Transform) of the given raster will be replaced with a cubemap transform (see Cube) and the coordinate system will be transformed to a geographic one (see ToGeographic). Otherwise, the given raster will be returned as it is.

See also:

RasterTransform.Cube

Local

Creates a new instance of Raster for a local coordinate system.

public static method Local (Vec2D center, float64 scale, UnitOfMeasure unit = null)
type Raster
params center Raster coordinates that will be mapped to the map coordinates (0,0).
  scale Scale factor from raster coordinates to map coordinates.
  unit The map coordinate unit. If null, Metre will be used. Defaults to null.
returns [not-null] The resulting raster.

Raster

Creates a new instance of Raster.

public constructor Raster (CoordinateSystem coordinates, IRasterTransform transform, string name = null)
params coordinates [not-null] The coordinate system.
  transform [not-null] The transform that maps raster coordinates (raster X- and Y-coordinates) to projected map coordinates (see IsProjection) or to geographic coordinates (see IsGeographic).
  name Human-readable name of the raster. If empty or null, UserDefined will be used instead. Defaults to null.

Public / Methods

CreateGroundSampleDistance

Computes the ground sample distance of this raster.

public method CreateGroundSampleDistance ()
type GroundSampleDistance
returns [not-null] The CreateGroundSampleDistance helper object.

Remarks:

Depending on the coordinate system type, the ground sample distance is computed as follows:

If the geo-reference parameters are incomplete or invalid, Undefined is returned.

Deserialize

Initializes the state of this object from the given data stream.

public override method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
overrides GeoObject.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

Exceptions:

Equals

Compares this object with the given one.

[Pure]
public override method Equals (IGeoObject other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
overrides GeoObject.Equals

Compares this object with the given one.

[Pure]
public override sealed method Equals (object other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
inherited GeoObject.Equals

GetHashCode

[Pure]
public override sealed method GetHashCode ()
type int32
inherited GeoObject.GetHashCode

Offset

Offsets the raster transform (if present) by the given amounts.

public method Offset (float64 offsetX, float64 offsetY)
type Raster
params offsetX The offset along the raster X-axis.
  offsetY The offset along the raster Y-axis.
returns [not-null] The resulting raster.

Remarks:

This method simply forwards to RasterOffset.

Projection

Returns a factory for map projections that transform raster coordinates from this raster (source) to the given one (target).

public method Projection (Raster target = null, IDatumTransform transform = null)
type IMapProjectionFactory
params target The target raster. Defaults to null.
  transform Datum transform to use. Defaults to null.
returns [not-null] The map projection factory.

Remarks:

When no target raster is specified (i.e. the target parameter is null), the map projection will transform raster coordinates to 3D geographic coordinates (latitude, longitude, ellipsoid height), based on the geodetic datum of this coordinate system (see Coordinates). If a datum transform is given (i.e. the transform parameter is not null), it will be applied to the 3D geographic coordinates. The method assumes that the calling code has chosen a datum transform that is consistent with this coordinate system.

If a target raster is given (i.e the target parameter is not null, the map projection will transform source raster coordinates to target raster coordinates. If the source and target raster use different datums (geodetic and/or vertical), one or more additional datum transforms may be necessary. When the transform parameter is null, the method tries to find a suitable composite datum transform in the current georegistry (see GeoRegistry). If no transform is found, the method silently assumes that no datum transformation is necessary. This behaviour can be overridden by providing a non-null value to the transform parameter, which will then be used instead (skipping the lookup).

The map types (i.e. Rect and Cube) of the source and target rasters are derived from the IsCubemap property value of the raster transform (Transform).

Exceptions:

Scale

Scales the raster transform (if present) by the given factors.

public method Scale (float64 scaleX, float64 scaleY)
type Raster
params scaleX The scale factor along the raster X-axis.
  scaleY The scale factor along the raster Y-axis.
returns [not-null] The resulting raster.

Remarks:

This method simply forwards to RasterScale.

Serialize

Serializes the current state of this object to the given data stream.

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
overrides GeoObject.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Exceptions:

ToString

[Pure]
public override sealed method ToString ()
type string
inherited GeoObject.ToString

Vertical

Updates the vertical components of this raster.

public method Vertical (UnitOfMeasure unit = null, VerticalDatum datum = null)
type Raster
params unit The vertical unit. If null, Metre will be used. Defaults to null.
  datum The vertical datum (see Vertical). Defaults to null.
returns [not-null] The resulting raster.

WholeEquator

Does this raster span the entire equator?

[Pure]
public method WholeEquator (int32 width, int32 height)
type bool
params width [>0] The raster width of the map (edge length, not sample count).
  height [>0] The raster height of the map (edge length, not sample count).
returns true if the raster covers the entire equator, false if not.

Serialization

SerialId

Serialization information about this type.

public static readonly field SerialId
type ISerialTypeInfo