IMapProjection
Description
- Extended by
- 
MapProjectionBase abstract 
Base interface for classes that provide a projection method between two dataset spaces.
Depending on the map type of a dataset, the dataset space is defined as follows:
- 
MapType.Rect: 
 Dataset coordinates are two-dimensional:(x,y), wherexresp.ymust lie within the range[0..width-1]resp.[0..height-1], wherewidthandheightare the dataset width and height, given in dataset samples.
- 
MapType.Cube: 
 Dataset coordinates are three-dimensional:(x,y,z), wherex,yandzrepresent cubemap coordinates (see Cubemap). Cubemap coordinates will wrap around at the cubemap edges.
A dataset has a certain pixel coverage semantic (see MapInfo.Coverage). Raster space (as defined by MapInfo) is defined per cubemap face, taking into account the dataset sample coverage semantic.
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) * fy
Wrapping (according to values of SourceWrapX, SourceWrapY, TargetWrapX and TargetWrapY) must be performed by the class that implements IMapProjection in these cases:
- 
x0is less than zero.
- 
y0is less than zero.
- 
x1is greater than the raster width.
- 
y1is greater than the raster height.
Since IMapProjection instances operate on dataset coordinates, pixel coverage offsets must be applied by implementors (see MapInfo.Coverage).
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 IVecOps.IsUndefined).
Public / Attributes
SourceWrapX
The source raster wrapping behaviour along the map X-axis.
Wrapping is only applied to rectangular maps (see MapInfo.Type).
- See also
SourceWrapY
The source raster wrapping behaviour along the map Y-axis.
Wrapping is only applied to rectangular maps (see MapInfo.Type).
- See also
TargetWrapX
The target raster wrapping behaviour along the map X-axis.
Wrapping is only applied to rectangular maps (see MapInfo.Type).
- See also
TargetWrapY
The target raster wrapping behaviour along the map Y-axis.
Wrapping is only applied to rectangular maps (see MapInfo.Type).
- See also