|
| | MercatorProjection ()=default |
| | MercatorProjection (const MercatorProjection &)=default |
| | MercatorProjection (MercatorProjection &&)=default |
| MercatorProjection & | operator= (const MercatorProjection &)=default |
| MercatorProjection & | operator= (MercatorProjection &&)=default |
| | ~MercatorProjection () override=default |
| bool | CanBatch () const override |
| bool | IsValid () const override |
| bool | IsValidFor (const GeoCoord &coord) const override |
| bool | Set (const GeoCoord &coord, const Magnification &magnification, size_t width, size_t height) |
| bool | Set (const GeoCoord &coord, double angle, const Magnification &magnification, size_t width, size_t height) |
| bool | Set (const GeoCoord &coord, const Magnification &magnification, double dpi, size_t width, size_t height) |
| bool | Set (const GeoCoord &coord, double angle, const Magnification &magnification, double dpi, size_t width, size_t height) |
| bool | PixelToGeo (double x, double y, GeoCoord &coord) const override |
| bool | GeoToPixel (const GeoCoord &coord, Vertex2D &pixel) const override |
| bool | Move (double horizPixel, double vertPixel) |
| bool | MoveUp (double pixel) |
| bool | MoveDown (double pixel) |
| bool | MoveLeft (double pixel) |
| bool | MoveRight (double pixel) |
| bool | IsLinearInterpolationEnabled () const |
| void | SetLinearInterpolationUsage (bool useLinearInterpolation) |
| | Projection ()=default |
| | Projection (const Projection &)=default |
| | Projection (Projection &&)=default |
| Projection & | operator= (const Projection &)=default |
| Projection & | operator= (Projection &&)=default |
| virtual | ~Projection ()=default |
| GeoCoord | GetCenter () const |
| double | GetAngle () const |
| size_t | GetWidth () const |
| size_t | GetHeight () const |
| ScreenBox | GetScreenBox () const |
| Magnification | GetMagnification () const |
| double | GetDPI () const |
| GeoBox | GetDimensions () const |
| double | GetPixelSize () const |
| double | GetMeterInPixel () const |
| double | GetMeterInMM () const |
| double | ConvertWidthToPixel (double width) const |
| double | ConvertPixelToWidth (double pixel) const |
| bool | BoundingBoxToPixel (const GeoBox &boundingBox, ScreenBox &screenBox) const |
|
| bool | valid =false |
| | projection is valid
|
| double | latOffset =0.0 |
| | Absolute and untransformed screen position of lat coordinate.
|
| double | angleSin =0.0 |
| double | angleCos =0.0 |
| double | angleNegSin =0.0 |
| double | angleNegCos =0.0 |
| double | scale =1.0 |
| double | scaleGradtorad =0.0 |
| | Precalculated scale*Gradtorad.
|
| double | scaledLatDeriv =0.0 |
| | center scaled by gradtorad * scale
|
| bool | useLinearInterpolation =false |
| | switch to enable linear interpolation of latitude to pixel computation
|
| GeoCoord | center |
| | Coordinate of the center of the displayed area.
|
| double | angle =0.0 |
| | Display rotation angle in radians, canvas clockwise.
|
| Magnification | magnification |
| | Current magnification.
|
| double | dpi =0.0 |
| | Screen DPI.
|
| size_t | width =0 |
| | Width of image.
|
| size_t | height =0 |
| | Height of image.
|
| GeoBox | boundingBox |
| | Bounding box of the current projection on the ground.
|
| double | pixelSize =0.0 |
| | Size of a pixel in meter.
|
| double | meterInPixel =0.0 |
| | Number of on screen pixel for one meter on the ground.
|
| double | meterInMM =0.0 |
| | Number of on screen millimeters for one meter on the ground.
|
Mercator projection that tries to render the resulting map in the same physical size on all devices. If the physical DPI of the device is correctly given, objects on any device has the same size. Bigger devices will show "more" map thus.
Scale is calculated based on the assumption that the original OpenStreetMap tiles were designed for 96 DPI displays.
| bool osmscout::MercatorProjection::Set |
( |
const GeoCoord & | coord, |
|
|
double | angle, |
|
|
const Magnification & | magnification, |
|
|
double | dpi, |
|
|
size_t | width, |
|
|
size_t | height ) |
Setup projection parameters.
Return true on success, false if arguments are not valid for Mercator projection, projection parameters are unchanged in such case.
Angle is in radians ([0..2*PI[)
Note that coord (center) have to be valid coordinate in Mercator projection. But it is possible setup dimensions (width and height) that projection will cover area bigger than the one valid for Mercator projection. Bounding box is adjusted then to be valid for projection.
In code:
projection.GetDimensions(bbox); projection.GeoToPixel(bbox.GetMinCoord(),x,y)
may be x >= 0