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

class MapProjection in Tinman.Terrain.Mapping

Base class for map projections that work with latitude and longitude angles.

abstract class MapProjection extends MapProjectionBase

Public / Attributes

Source

The source raster definition.

public property Source { get }
type MapInfo
value The source raster.
inherited MapProjectionBase.Source

SourceWrapX

The source raster wrapping behaviour along the map X-axis.

public override property SourceWrapX { get }
type MapWrap
value The wrapping behaviour.
implements MapProjectionBase.SourceWrapX

Remarks:

Wrapping is only applied to rectangular maps (see Type).

See also:

IMapProjection.Source

SourceWrapY

The source raster wrapping behaviour along the map Y-axis.

public override property SourceWrapY { get }
type MapWrap
value The wrapping behaviour.
implements MapProjectionBase.SourceWrapY

Remarks:

Wrapping is only applied to rectangular maps (see Type).

See also:

IMapProjection.Source

Target

The target raster definition.

public property Target { get }
type MapInfo
value The target raster.
inherited MapProjectionBase.Target

TargetWrapX

The target raster wrapping behaviour along the map X-axis.

public override property TargetWrapX { get }
type MapWrap
value The wrapping behaviour.
implements MapProjectionBase.TargetWrapX

Remarks:

Wrapping is only applied to rectangular maps (see Type).

See also:

IMapProjection.Target

TargetWrapY

The target raster wrapping behaviour along the map Y-axis.

public override property TargetWrapY { get }
type MapWrap
value The wrapping behaviour.
implements MapProjectionBase.TargetWrapY

Remarks:

Wrapping is only applied to rectangular maps (see Type).

See also:

IMapProjection.Target

Public / Methods

Reverse

Returns the reverse map projection.

public override method Reverse ()
type IMapProjection
returns [not-null] The reverse map projection.
implements MapProjectionBase.Reverse

Transform

Transform the given dataset coordinates.

public override sealed method Transform (float64 x, float64 y, float64 z)
type Vec3D
params x Source dataset X-coordinate.
  y Source dataset Y-coordinate.
  z Source dataset Z-coordinate. Only used if source raster is a cubemap (see Type). Will be ignored otherwise.
returns The target dataset coordinates. Z will be zero if target raster is not a cubemap (see Type). In case that the projection cannot be performed, Undefined is returned.
implements MapProjectionBase.Transform

Transform the given raster coordinates.

public override sealed method Transform (float64 x, float64 y, float64 z, float64 h)
type Vec4D
params x Source dataset X-coordinate.
  y Source dataset Y-coordinate.
  z Source dataset Z-coordinate.
  h Source dataset height value.
returns The target dataset coordinates. Z will be zero if target raster is not a cubemap (see Type). The target dataset height value is stored in W. In case that the projection cannot be performed, Undefined is returned.
implements MapProjectionBase.Transform

Protected / Attributes

clip

Clip bad geographic coordinates?

protected readonly field clip
type bool

See also:

ICoordinateTransform.GeographicClip

source

The source map raster.

protected readonly field source
type MapInfo
inherited MapProjectionBase.source

sourceWrapX

X-axis wrapping for rectangular source raster. Defaults to Void.

protected field sourceWrapX
type MapWrap

sourceWrapY

Y-axis wrapping for rectangular source raster. Defaults to Void.

protected field sourceWrapY
type MapWrap

target

The target map raster.

protected readonly field target
type MapInfo
inherited MapProjectionBase.target

targetWrapX

X-axis wrapping for rectangular target raster. Defaults to Void.

protected field targetWrapX
type MapWrap

targetWrapY

Y-axis wrapping for rectangular target raster. Defaults to Void.

protected field targetWrapY
type MapWrap

Protected / Constructors

MapProjection

Creates a new instance of MapProjection.

protected constructor MapProjection (IMapProjectionFactory factory, MapInfo source, MapInfo target, bool clip)
params factory [not-null] The owning map projection factory.
  source The source raster.
  target The target raster.
  clip Clip bad geographic coordinates (see GeographicClip)?

Protected / Methods

IntermediateToRaster

Translates the given intermediate coordinates to source or target raster coordinates.

protected method IntermediateToRaster (float64 x, float64 y, bool sourceOrTarget)
type Vec3D
params x Internal X-coordinate
  y Internal Y-coordinate
  sourceOrTarget true to use source raster, false to use target raster.
returns The source or target raster coordinates.

Remarks:

For rectangular maps, raster and intermediate coordinates are equivalent ( Z is dropped). For cubemaps, intermediate coordinates are longitude ( X) and latitude (Y) in radians, which have been derived from the cubemap raster coordinates as defined by ToCubeD resp. FromCube.

RasterToIntermediate

Translates the given source or target raster coordinates into intermediate coordinates.

protected method RasterToIntermediate (float64 x, float64 y, float64 z, bool sourceOrTarget)
type Vec2D
params x Raster X-coordinate
  y Raster Y-coordinate
  z Raster Z-coordinate
  sourceOrTarget true to use source raster, false to use target raster.
returns The internal coordinates.

Remarks:

For rectangular maps, raster and intermediate coordinates are equivalent ( Z is dropped). For cubemaps, intermediate coordinates are longitude ( X) and latitude (Y) in radians, which have been derived from the cubemap raster coordinates as defined by ToCubeD resp. FromCube.

TransformInternal

Transforms the given raster coordinates.

protected abstract method TransformInternal (float64 x, float64 y, float64 z)
type Vec3D
params x Source raster X-coordinate.
  y Source raster Y-coordinate.
  z Source raster Z-coordinate.
returns Target raster coordinates.

Remarks:

Wrapping for rectangular rasters (see MapWrap) will have been applied to the given raster coordinates before this method is called.

See also:

RasterToIntermediate
IntermediateToRaster

Transforms the given raster coordinates.

protected virtual method TransformInternal (float64 x, float64 y, float64 z, float64 h)
type Vec4D
params x Source raster X-coordinate.
  y Source raster Y-coordinate.
  z Source raster Z-coordinate.
  h Source raster height.
returns Target raster coordinates and height (stored in W).

Remarks:

Wrapping for rectangular rasters (see MapWrap) will have been applied to the given raster coordinates before this method is called.

The given raster height is passed through by the default implementation.

See also:

RasterToIntermediate
IntermediateToRaster