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

interface IRasterTransform in Tinman.Terrain.Georef

An IRasterTransform object provides a mapping from raster coordinates (i.e. pixel X and Y) to map coordinates (i.e. easting and northing).

interface IRasterTransform extends IConfigurable
  IEquatable<IRasterTransform>
  ISerializable
  base of RasterTransform

Remarks

Consider the following point raster (where each O represents a single raster element):

   0   1   2   3   4   X-axis

0  O---O---O---O---O
   |   |   |   |   |
1  O---O---O---O---O   Top-left coords     := (0|0)
   |   |   |   |   |
2  O---O---O---O---O   Bottom-right coords := (4|3)
   |   |   |   |   |
3  O---O---O---O---O

Y-axis
The origin of a raster (i.e. the raster coordinates (0|0)) are always located at the top left corner. The positive X-axis points to the right and the positive Y-axis points downwards.

Attributes

IsCubemap

Is this raster transform a placeholder for a cubemap raster?

property IsCubemap { get }
type bool
value true if this raster transform is a cubemap raster placeholder, false if not.

Remarks:

A cubemap is composed of six two-dimensional rasters, one for each cubemap face. A geo-referencing Raster only contains a single raster transform object which takes two-dimensional raster coordinates as input.

Matrix

Returns the homogeneous 2D transformation matrix that corresponds to this raster transform (i.e. RasterToMap).

property Matrix { get }
type Mat3D
value The homogeneous 2D transformation matrix, or Zero if this raster transform cannot be represented with a matrix.

SerialType

Returns the serial type of this object.

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

SerialVersion

Returns the serial data version.

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

Remarks:

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

See also:

ISerializable.Serialize
ISerializable.Deserialize

Extensions

MapToRaster

Translates the given map coordinates to raster coordinates.

[Pure]
method MapToRaster (Vec2D mapXY)
type Vec2D
params mapXY The map coordinates.
returns The raster coordinates.

RasterFix

Fixes coordinate shifts that result from wrap-around of geographic longitude.

method RasterFix (MapInfo map, ICoordinateTransform transform)
type IRasterTransform
params map The rectangular map for which to fix wrap-around.
  transform [not-null] The coordinate transform.
returns [not-null] The fixed raster transform.

RasterToMap

Translates the given raster coordinates to map coordinates.

[Pure]
method RasterToMap (Vec2D rasterXY)
type Vec2D
params rasterXY The raster coordinates.
returns The map coordinates.

Methods

Deserialize

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

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).
inherited ISerializable.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]
method Equals (IRasterTransform other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
inherited IEquatable.Equals

MapToRaster

Translates the given map coordinates to raster coordinates.

[Pure]
method MapToRaster (float64 x, float64 y)
type Vec2D
params x The map X-coordinate.
  y The map Y-coordinate.
returns The raster coordinates.

RasterOffset

Returns an IRasterTransform that translates the raster coordinates when applying this transform.

method RasterOffset (float64 offsetX, float64 offsetY)
type IRasterTransform
params offsetX The translation along the raster X-axis.
  offsetY The translation along the raster Y-axis.
returns [not-null] The resulting raster transform.

Remarks:

The given coordinate offsets will be subtracted from the output raster coordinates of IRasterTransform and will be added to the input raster coordinates of IRasterTransform after resp. before plugging them into this raster transform.

RasterScale

Returns an IRasterTransform that scales the raster coordinates when applying this transform.

method RasterScale (float64 scaleX, float64 scaleY)
type IRasterTransform
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 transform.

Remarks:

The output raster coordinates of IRasterTransform will be divided by the given scale factors and the input raster coordinates of IRasterTransform will be multiplied with the scale factors after resp. before plugging them into this raster transform.

RasterToMap

Translates the given raster coordinates to map coordinates.

[Pure]
method RasterToMap (float64 x, float64 y)
type Vec2D
params x The raster X-coordinate.
  y The raster Y-coordinate.
returns The resulting map coordinates.

Serialize

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

method Serialize (ISerializer data)
params data [not-null] The serial data stream.
inherited ISerializable.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Exceptions:

ToConfig

Returns the configuration value that describes this object.

method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
inherited IConfigurable.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: