Maria GDK 5.0.0.737
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::RasterProjector Class Reference

#include <MRasterProjector.h>

Inheritance diagram for Maria::RasterProjector:
Maria::IProjector Maria::Viewport

Public Member Functions

const BasicGeoTypes::DblTransform2DGetProjToImage () const
 
const BasicGeoTypes::DblTransform2DGetImageToProj () const
 
const BasicGeoTypes::RectXYRect () const
 
const BasicGeoTypes::PointDXY RectCenter () const
 
const BasicGeoTypes::RectD ProjRect () const
 
const BasicGeoTypes::PointXY Size () const
 
int Width () const
 
int Height () const
 
const BasicGeoTypes::GeoPosCenter () const
 
void GetCorners (BasicGeoTypes::GeoPos corners[]) const
 
std::vector< BasicGeoTypes::GeoPosGetCorners () const
 
std::shared_ptr< IProjectorGetGeoProjector () const
 
void GetRefinedBoundary (int subdivisions, std::vector< BasicGeoTypes::GeoPos > &boundaryPoints) const
 
BasicGeoTypes::PointDXY GetNorthVector (const BasicGeoTypes::GeoPos &pos) const
 Gets relative XY of point 1 m north of pos.
 
BasicGeoTypes::PointDXY GetNorthVector () const
 
BasicGeoTypes::PointDXY GetEastVector (const BasicGeoTypes::GeoPos &pos) const
 Gets relative XY of point 1 m east of pos.
 
BasicGeoTypes::PointDXY GetEastVector () const
 
BasicGeoTypes::PointDXY GetPixelSize (const BasicGeoTypes::GeoPos &pos) const
 
BasicGeoTypes::PointDXY GetPixelSize () const
 
bool Contains (const BasicGeoTypes::GeoPos &pos) const
 
bool Intersects (RasterProjector *rp) const
 
const char * GetId () const
 
const char * GetProjectionId () const
 
virtual bool LatLonToXY (const BasicGeoTypes::GeoPos &latlon, BasicGeoTypes::PointDXY &xy) const
 
virtual bool LatLonToXY (const BasicGeoTypes::GeoPos *latlon, BasicGeoTypes::PointDXY *xy, int count) const
 
virtual bool XYToLatLon (const BasicGeoTypes::PointDXY &xy, BasicGeoTypes::GeoPos &latlon) const
 
virtual bool XYToLatLon (const BasicGeoTypes::PointDXY *xy, BasicGeoTypes::GeoPos *latlon, int count) const
 
virtual bool IsProjection () const
 True if the IProjector transform contains a projection component, false if the transform is 'only' a datum converion.
 
virtual double UnitScale () const
 XY unit scale factor. If XY unit is 'Meters' and UnitScale is 1e3, actual XY values are in kilometers.
 
virtual DistanceUnit Unit () const
 Nominal unit in the XY plane.
 
BasicGeoTypes::GeoRect CalcQuickGeoRect () const
 
BasicGeoTypes::GeoRect CalcGeoRect () const
 
virtual bool Equals (RasterProjector *rp, double eps=1e-9) const
 
- Public Member Functions inherited from Maria::IProjector
 IProjector (const IProjector &)=delete
 
IProjectoroperator= (const IProjector &)=delete
 
 IProjector (IProjector &&)=delete
 
IProjectoroperator= (IProjector &&)=delete
 
virtual bool LatLonToXY (const BasicGeoTypes::GeoPos &latlon, BasicGeoTypes::PointDXY &xy) const =0
 
virtual bool LatLonToXY (const BasicGeoTypes::GeoPos *latlon, BasicGeoTypes::PointDXY *xy, int count) const =0
 
virtual bool XYToLatLon (const BasicGeoTypes::PointDXY &xy, BasicGeoTypes::GeoPos &latlon) const =0
 
virtual bool XYToLatLon (const BasicGeoTypes::PointDXY *xy, BasicGeoTypes::GeoPos *latlon, int count) const =0
 
virtual const char * GetId () const =0
 
virtual DistanceUnit Unit () const =0
 Nominal unit in the XY plane.
 
virtual double UnitScale () const =0
 XY unit scale factor. If XY unit is 'Meters' and UnitScale is 1e3, actual XY values are in kilometers.
 
virtual bool IsProjection () const =0
 True if the IProjector transform contains a projection component, false if the transform is 'only' a datum converion.
 

Protected Member Functions

void InitMatrix (const BasicGeoTypes::PointDXY &ul, const BasicGeoTypes::PointDXY &lr)
 
 RasterProjector (std::shared_ptr< IProjector > proj, const BasicGeoTypes::DblTransform2D &projMatrix, int w, int h)
 
 RasterProjector (std::shared_ptr< IProjector > proj, const BasicGeoTypes::PointDXY &ul, const BasicGeoTypes::PointDXY &lr, int w, int h)
 
 RasterProjector (std::shared_ptr< IProjector > proj, const BasicGeoTypes::GeoPos &ul, const BasicGeoTypes::GeoPos &lr, int w, int h)
 
 RasterProjector (std::shared_ptr< IProjector > proj, const BasicGeoTypes::DblTransform2D &projMatrix, double x0, double y0, int w, int h)
 
 RasterProjector (std::shared_ptr< IProjector > proj, const BasicGeoTypes::DblTransform2D &projToImage, const BasicGeoTypes::DblTransform2D &imageToProj, const BasicGeoTypes::RectXY &rc, const BasicGeoTypes::GeoPos &center)
 

Protected Attributes

std::shared_ptr< IProjector_projector
 
BasicGeoTypes::DblTransform2D _dfwd
 
BasicGeoTypes::DblTransform2D _drev
 
BasicGeoTypes::RectXY _rc
 
BasicGeoTypes::GeoPos _center
 

Static Protected Attributes

static std::shared_ptr< IProjector_nullProj
 

Friends

class RasterProjectorFactory
 

Detailed Description

RasterProjector - Short description. Detailed description.

Member Function Documentation

◆ CalcGeoRect()

GeoRect RasterProjector::CalcGeoRect ( ) const

Enhanced version, also checking for the poles.

◆ CalcQuickGeoRect()

GeoRect RasterProjector::CalcQuickGeoRect ( ) const

Calculate geographical bounds. This method will calculate the geographical bounds of the raster projector by checking the corners and midpoints. This will account for projections with some curvature, but if you need even higher precision, you may have to do this with more sample points.

◆ Equals()

bool RasterProjector::Equals ( RasterProjector rp,
double  eps = 1e-9 
) const
virtual

Returns true if the given projector is equal to this within the given tolerance.

◆ GetId()

const char * Maria::RasterProjector::GetId ( ) const
inlinevirtual

Implements Maria::IProjector.

◆ GetPixelSize() [1/2]

BasicGeoTypes::PointDXY Maria::RasterProjector::GetPixelSize ( ) const
inline

Returns pixel size in meters at center of projector, separate X & Y sizes. Note: PixelSize().Length is NOT the pixel size NOTE: Do not use this method in performance critical code, it uses 3 projections

◆ GetPixelSize() [2/2]

PointDXY RasterProjector::GetPixelSize ( const BasicGeoTypes::GeoPos pos) const

Returns pixel size in meters at geopos, separate X & Y sizes. Note: PixelSize().Length is NOT the pixel size NOTE: Do not use this method in performance critical code, it uses 3 projections

◆ IsProjection()

virtual bool Maria::RasterProjector::IsProjection ( ) const
inlinevirtual

True if the IProjector transform contains a projection component, false if the transform is 'only' a datum converion.

Implements Maria::IProjector.

◆ LatLonToXY() [1/2]

bool RasterProjector::LatLonToXY ( const BasicGeoTypes::GeoPos latlon,
BasicGeoTypes::PointDXY xy 
) const
virtual

Implements Maria::IProjector.

◆ LatLonToXY() [2/2]

bool RasterProjector::LatLonToXY ( const BasicGeoTypes::GeoPos latlon,
BasicGeoTypes::PointDXY xy,
int  count 
) const
virtual

Implements Maria::IProjector.

◆ ProjRect()

const RectD RasterProjector::ProjRect ( ) const

Get bounding rectangle in projection coordinates. This will return the bounding rectangle of the raster projector in projection coordinates.

◆ Rect()

const BasicGeoTypes::RectXY & Maria::RasterProjector::Rect ( ) const
inline

Get viewport rectangle in pixels. This is typically the raster image size.

◆ Unit()

virtual DistanceUnit Maria::RasterProjector::Unit ( ) const
inlinevirtual

Nominal unit in the XY plane.

Implements Maria::IProjector.

◆ UnitScale()

virtual double Maria::RasterProjector::UnitScale ( ) const
inlinevirtual

XY unit scale factor. If XY unit is 'Meters' and UnitScale is 1e3, actual XY values are in kilometers.

Implements Maria::IProjector.

◆ XYToLatLon() [1/2]

bool RasterProjector::XYToLatLon ( const BasicGeoTypes::PointDXY xy,
BasicGeoTypes::GeoPos latlon 
) const
virtual

Implements Maria::IProjector.

◆ XYToLatLon() [2/2]

bool RasterProjector::XYToLatLon ( const BasicGeoTypes::PointDXY xy,
BasicGeoTypes::GeoPos latlon,
int  count 
) const
virtual

Implements Maria::IProjector.


The documentation for this class was generated from the following files: