Base interface for classes that provide a projection method between two dataset spaces.
interface
|
IMapProjection
|
base of
|
MapProjectionBase
|
Depending on the map type of a dataset, the dataset space is defined as follows:
(x,y)
,
where
x
resp.
y
must
lie
within
the
range
[0..width-1]
resp.
[0..height-1]
,
where
width
and
height
are
the
dataset
width
and
height,
given
in
dataset
samples.
(x,y,z)
,
where
x
,
y
and
z
represent
cubemap
coordinates
(see
Cubemap).
Cubemap
coordinates
will
wrap
around
at
the
cubemap
edges.
Interpolation
of
a
dataset
sample
S
at
coordinates
(x,y)
follows
these
rules:
(x0,y0) (x1,y0) x0 := floor(x) A---------B y0 := floor(y) | | x1 := floor(x) + 1 | S | y1 := floor(y) + 1 | (x,y) | C---------D fx := x - floor(x) (x0,y1) (x2,y1) fy := y - floor(y) (x,y) := Coordinates of sample in raster space: 0 <= x <= raster width 0 <= y <= raster height Linear interpolation of the sample S at (x,y) would then be performed as: S := (A * (1-fx) + B * fx) * (1-fy) + (C * (1-fx) + D * fx) * fyWrapping (according to values of SourceWrapX, SourceWrapY, TargetWrapX and TargetWrapY) must be performed by the class that implements IMapProjection in these cases:
x0
is
less
than
zero.y0
is
less
than
zero.x1
is
greater
than
the
raster
width.y1
is
greater
than
the
raster
height.It may not be possible to project a given set of dataset coordinates to the target dataset space. In this case, the projection methods will return an undefined vector (see IsUndefined).
The source raster definition.
property
|
Source
{
get
}
|
||
type
|
MapInfo
|
||
value
|
The source raster. |
The source raster wrapping behaviour along the map X-axis.
property
|
SourceWrapX
{
get
}
|
||
type
|
MapWrap
|
||
value
|
The wrapping behaviour. |
Remarks:
Wrapping is only applied to rectangular maps (see Type).
See also:
SourceThe source raster wrapping behaviour along the map Y-axis.
property
|
SourceWrapY
{
get
}
|
||
type
|
MapWrap
|
||
value
|
The wrapping behaviour. |
Remarks:
Wrapping is only applied to rectangular maps (see Type).
See also:
SourceThe target raster definition.
property
|
Target
{
get
}
|
||
type
|
MapInfo
|
||
value
|
The target raster. |
The target raster wrapping behaviour along the map X-axis.
property
|
TargetWrapX
{
get
}
|
||
type
|
MapWrap
|
||
value
|
The wrapping behaviour. |
Remarks:
Wrapping is only applied to rectangular maps (see Type).
See also:
TargetThe target raster wrapping behaviour along the map Y-axis.
property
|
TargetWrapY
{
get
}
|
||
type
|
MapWrap
|
||
value
|
The wrapping behaviour. |
Remarks:
Wrapping is only applied to rectangular maps (see Type).
See also:
TargetReturns the reverse map projection.
method
|
Reverse
()
|
||
type
|
IMapProjection
|
||
returns
|
|
The reverse map projection. |
Transform the given dataset coordinates.
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. |
Transform the given raster coordinates.
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. |
Appends the given map projection to this one.
method
|
Append
(IMapProjection other)
|
||
type
|
IMapProjection
|
||
params
|
other
|
[not-null]
|
The map projection to append to this one. |
returns
|
|
The resulting map projection. |
Remarks:
This method does not check if the output coordinates of this projection have the same meaning as the input coordinates of other; the calling code must make sure that the resulting projection has a correct meaning.
Checks if this map projection has the given source and target raster types.
method
|
IsFromTo
(MapType source,
MapType target)
|
||
type
|
bool
|
||
params
|
source
|
The source raster type. | |
target
|
The target raster type. | ||
returns
|
true
if
the
map
projection
transforms
from
source
to
target,
false
if
not.
|
Transform the given dataset coordinates.
method
|
Transform
(Vec3D v)
|
||
type
|
Vec3D
|
||
params
|
v
|
Source dataset coordinates. Z is 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. |
Transform the given raster coordinates.
method
|
Transform
(Vec4D v)
|
||
type
|
Vec4D
|
||
params
|
v
|
Source dataset coordinates and height value. Z is only used if source raster is a cubemap (see Type). Will be ignored otherwise. W is the 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. |