|
libosmscout
1.1.1
|
#include <libosmscout/include/osmscout/util/Projection.h>


Public Member Functions | |
| TileProjection () | |
| bool | CanBatch () const override |
| bool | IsValid () const override |
| bool | IsValidFor (const GeoCoord &coord) const override |
| bool | Set (const OSMTileId &tile, const Magnification &magnification, size_t width, size_t height) |
| bool | Set (const OSMTileId &tile, const Magnification &magnification, double dpi, size_t width, size_t height) |
| bool | Set (const OSMTileIdBox &tileBox, const Magnification &magnification, double dpi, size_t width, size_t height) |
| bool | PixelToGeo (double x, double y, double &lon, double &lat) const override |
| bool | GeoToPixel (const GeoCoord &coord, double &x, double &y) const override |
| bool | IsLinearInterpolationEnabled () const |
| void | SetLinearInterpolationUsage (bool b) |
Public Member Functions inherited from osmscout::Projection | |
| Projection () | |
| virtual | ~Projection ()=default |
| GeoCoord | GetCenter () const |
| double | GetLon () const |
| double | GetLat () const |
| double | GetAngle () const |
| size_t | GetWidth () const |
| size_t | GetHeight () const |
| Magnification | GetMagnification () const |
| double | GetDPI () const |
| bool | GeoIsIn (double lon, double lat) const |
| bool | GeoIsIn (double lonMin, double latMin, double lonMax, double latMax) const |
| GeoBox | GetDimensions () const |
| void | GetDimensions (GeoBox &boundingBox) const |
| double | GetPixelSize () const |
| double | GetMeterInPixel () const |
| double | GetMeterInMM () const |
| double | ConvertWidthToPixel (double width) const |
| double | ConvertPixelToWidth (double pixel) const |
Protected Member Functions | |
| virtual bool | SetInternal (double lonMin, double latMin, double lonMax, double latMax, const Magnification &magnification, double dpi, size_t width, size_t height) |
| void | GeoToPixel (const BatchTransformer &transformData) const override |
Protected Attributes | |
| bool | valid |
| projection is valid More... | |
| double | lonOffset |
| double | latOffset |
| double | scale |
| double | scaleGradtorad |
| Precalculated scale*Gradtorad. More... | |
| double | scaledLatDeriv |
| precalculated derivation of "latToYPixel" function in projection center scaled by gradtorad * scale More... | |
| bool | useLinearInterpolation |
| switch to enable linear interpolation of latitude to pixel computation More... | |
Protected Attributes inherited from osmscout::Projection | |
| double | lon |
| Longitude coordinate of the center of the image. More... | |
| double | lat |
| Latitude coordinate of the center of the image. More... | |
| double | angle |
| Display rotation angle in radians, canvas clockwise. More... | |
| Magnification | magnification |
| Current magnification. More... | |
| double | dpi |
| Screen DPI. More... | |
| size_t | width |
| Width of image. More... | |
| size_t | height |
| Height of image. More... | |
| double | lonMin |
| Longitude of the upper left corner of the image. More... | |
| double | latMin |
| Latitude of the upper left corner of the image. More... | |
| double | lonMax |
| Longitude of the lower right corner of the image. More... | |
| double | latMax |
| Latitude of the lower right corner of the image. More... | |
| double | pixelSize |
| Size of a pixel in meter. More... | |
| double | meterInPixel |
| Number of on screen pixel for one meter on the ground. More... | |
| double | meterInMM |
| Number of on screen millimeters for one meter on the ground. More... | |
Mercator projection as used by the OpenStreetMap tile rendering code.
The TileProjection simplifies the general Mercator projection code to make sure that there are no effects based on rounding errors or similar.
| osmscout::TileProjection::TileProjection | ( | ) |
|
inlineoverridevirtual |
Implements osmscout::Projection.
|
overridevirtual |
Converts a geo coordinate to a pixel coordinate.
Return true on success, false if given coordinate is not valid for this projection.
Implements osmscout::Projection.
|
overrideprotectedvirtual |
Implements osmscout::Projection.
|
inline |
|
inlineoverridevirtual |
Implements osmscout::Projection.
|
inlineoverridevirtual |
Return true if given coordinate is valid for this projection
Implements osmscout::Projection.
|
overridevirtual |
Converts a pixel coordinate to a geo coordinate.
Return true on success, false if returned coordinate is not valid for this projection.
Implements osmscout::Projection.
|
inline |
| bool osmscout::TileProjection::Set | ( | const OSMTileId & | tile, |
| const Magnification & | magnification, | ||
| double | dpi, | ||
| size_t | width, | ||
| size_t | height | ||
| ) |
| bool osmscout::TileProjection::Set | ( | const OSMTileIdBox & | tileBox, |
| const Magnification & | magnification, | ||
| double | dpi, | ||
| size_t | width, | ||
| size_t | height | ||
| ) |
|
protectedvirtual |
|
inline |
Switch to enable/disable linear interpolation of latitude to pixel computation. It speedup GeoToPixel calculation with fractional error on small render area.
|
protected |
|
protected |
|
protected |
|
protected |
precalculated derivation of "latToYPixel" function in projection center scaled by gradtorad * scale
|
protected |
Precalculated scale*Gradtorad.
|
protected |
switch to enable linear interpolation of latitude to pixel computation
|
protected |
projection is valid
1.8.14