1#ifndef OSMSCOUT_UTIL_PROJECTION_H
2#define OSMSCOUT_UTIL_PROJECTION_H
72#ifdef OSMSCOUT_HAVE_SSE2
74 ALIGN16_BEG
double lon[2] ALIGN16_END;
75 ALIGN16_BEG
double lat[2] ALIGN16_END;
76 double* xPointer[2]={
nullptr,
nullptr};
77 double* yPointer[2]={
nullptr,
nullptr};
101#ifdef OSMSCOUT_HAVE_SSE2
103 this->lon[count]=coord.GetLon();
104 this->lat[count]=coord.GetLat();
134#ifdef OSMSCOUT_HAVE_SSE2
136 this->lon[count]=coord.GetCoord().GetLon();
137 this->lat[count]=coord.GetCoord().GetLat();
165#ifdef OSMSCOUT_HAVE_SSE2
173 *xPointer[0]=pixel.GetX();
174 *yPointer[0]=pixel.GetY();
233 return {Vertex2D(0.0,
235 Vertex2D(
static_cast<double>(
GetWidth()),
307 return pixel*25.4/
dpi;
318 GeoCoord& coord)
const = 0;
327 Vertex2D& pixel)
const = 0;
336 ScreenBox& screenBox)
const;
#define OSMSCOUT_API
Definition CoreImportExport.h:45
Definition Projection.h:67
BatchTransformer & operator=(const BatchTransformer &other)=delete
BatchTransformer(const BatchTransformer &other)=delete
BatchTransformer & operator=(BatchTransformer &&other)=delete
~BatchTransformer()
Definition Projection.h:89
void GeoToPixel(const GeoCoord &coord, double &x, double &y)
Definition Projection.h:97
BatchTransformer(BatchTransformer &&other)=delete
const Projection & projection
Definition Projection.h:71
BatchTransformer(const Projection &projection)
Definition Projection.h:81
void Flush()
Definition Projection.h:163
void GeoToPixel(const Point &coord, double &x, double &y)
Definition Projection.h:130
double GetPixelSize() const
Definition Projection.h:263
double pixelSize
Size of a pixel in meter.
Definition Projection.h:57
GeoCoord center
Coordinate of the center of the displayed area.
Definition Projection.h:48
size_t width
Width of image.
Definition Projection.h:52
virtual bool GeoToPixel(const GeoCoord &coord, Vertex2D &pixel) const =0
virtual bool IsValidFor(const GeoCoord &coord) const =0
size_t height
Height of image.
Definition Projection.h:53
GeoBox boundingBox
Bounding box of the current projection on the ground.
Definition Projection.h:55
friend class BatchTransformer
Definition Projection.h:341
virtual ~Projection()=default
double GetDPI() const
Definition Projection.h:250
Projection & operator=(const Projection &)=default
double GetMeterInMM() const
Definition Projection.h:279
double angle
Display rotation angle in radians, canvas clockwise.
Definition Projection.h:49
double dpi
Screen DPI.
Definition Projection.h:51
Projection & operator=(Projection &&)=default
bool BoundingBoxToPixel(const GeoBox &boundingBox, ScreenBox &screenBox) const
double ConvertPixelToWidth(double pixel) const
Definition Projection.h:305
double GetMeterInPixel() const
Definition Projection.h:271
size_t GetWidth() const
Definition Projection.h:212
ScreenBox GetScreenBox() const
Definition Projection.h:231
virtual bool IsValid() const =0
GeoBox GetDimensions() const
Definition Projection.h:255
double meterInPixel
Number of on screen pixel for one meter on the ground.
Definition Projection.h:58
double meterInMM
Number of on screen millimeters for one meter on the ground.
Definition Projection.h:59
Projection(Projection &&)=default
double GetAngle() const
Definition Projection.h:204
GeoCoord GetCenter() const
Definition Projection.h:195
virtual bool CanBatch() const =0
virtual bool PixelToGeo(double x, double y, GeoCoord &coord) const =0
size_t GetHeight() const
Definition Projection.h:220
double ConvertWidthToPixel(double width) const
Definition Projection.h:292
Magnification GetMagnification() const
Definition Projection.h:242
virtual void GeoToPixel(const BatchTransformer &transformData) const =0
Magnification magnification
Current magnification.
Definition Projection.h:50
Projection(const Projection &)=default