|
CartoType API
|
#include <cartotype_elevation_grid.h>
Classes | |
| class | TCell |
Public Types | |
| enum | { ENoInterpolation, EScanLineInterpolation, E8DirectionInverseDistanceWeightedInterpolation } |
Public Member Functions | |
| CT_IMPORT TResult | DrawLine (const MPath &aPath, int16 aElevation) |
| void | DrawStraightLine (const TPoint &aPoint1, const TPoint &aPoint2, int16 aElevation) |
| void | DrawPoint (const TPoint &aPoint, int16 aElevation) |
| CT_IMPORT CBitmap * | CreateBitmap (TResult &aError) |
| int32 | Width () const |
| int32 | Height () const |
| int16 | MinElevation () const |
| int16 | MaxElevation () const |
Static Public Member Functions | |
| static CT_IMPORT CElevationGrid * | New (TResult &aError, int32 aWidth, int32 aHeight) |
This class represents a grid with elevation information. Elevation contours can be drawn into it and the grid stores the elevation for each point. If multiple contours go through one point the average is computed. + Copies code from 24 bit graphics context. to be discussed: maybe this code must be moved up to CGraphicsContext and elevation grid must be derived from that class. + 2: Maybe this class must move to graphics.
| anonymous enum |
Enumeration of interpolation methods.
Create bitmap from elevation grid. This bitmap has one byte per pixel with the height relative to the minimum and maximum height. Points are interpolated if necessary. Interpolation is done with two algorithms: First, points are interpolated by traversing lines in the grid and approximating points between known points. All points that are still unknown after this traversal will be interpolated individually with the method InterpolateElevation.
| void CartoType::CElevationGrid::DrawPoint | ( | const TPoint & | aPoint, |
| int16 | aElevation | ||
| ) | [inline] |
Draw a point by calculating the resulting elevation in the grid. If the point is outside of the grid this function does nothing.
| CT_EXPORT CElevationGrid * CElevationGrid::New | ( | TResult & | aError, |
| int32 | aWidth, | ||
| int32 | aHeight | ||
| ) | [static] |
Create a new elevation grid.
1.7.5.1