52 #ifndef __PCL_ProjectionBase_h
53 #define __PCL_ProjectionBase_h
121 DPoint pN = m_sph.CelestialToNative( pRD );
131 if ( Unproject( pN, pW ) )
135 pRD = m_sph.NativeToCelestial( pN );
144 virtual bool CheckBrokenLine(
const DPoint& cp1,
const DPoint& cp2 )
const noexcept
146 return DistanceFast( m_sph.CelestialToNative( cp1 ), m_sph.CelestialToNative( cp2 ) ) < 150;
169 double K = cosY1*sinY2 - sinY1*cosY2*cosX;
170 return Deg(
ArcTan(
Sqrt( cosY2*sinX*cosY2*sinX + K*K ), sinY1*sinY2 + cosY1*cosY2*cosX ) );
205 return Vector{ m_phi0, m_theta0 };
217 if ( m_lonpole.IsDefined() )
218 lonpole = m_lonpole();
222 lonpole = ((
Deg( m_dec0 ) < m_theta0) ? 180 : 0) + m_phi0;
223 if ( lonpole < -180 )
225 else if ( lonpole > 180 )
228 return Vector{ lonpole, m_latpole.OrElse( 90.0 ) };
A generic point in the two-dimensional space.
component x
Abscissa (horizontal, or X-axis coordinate).
component y
Ordinate (vertical, or Y-axis coordinate).
Generic vector of arbitrary length.
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
Base class of all projection systems.
virtual bool Inverse(DPoint &pRD, const DPoint &pW) const noexcept
ProjectionBase(const ProjectionBase &)=default
static IsoString WCSCodeToProjectionIdentifier(const IsoString &wcsCode)
static double DistanceFast(const DPoint &p1, const DPoint &p2)
Vector ReferenceCelestialCoordinates() const
Vector ReferenceNativeCoordinates() const
virtual DPoint ProjectionOrigin() const
virtual bool Unproject(DPoint &pN, const DPoint &pW) const noexcept=0
static IsoString ProjectionIdentifierToWCSCode(const IsoString &identifier)
virtual ~ProjectionBase()
virtual ProjectionBase * Clone() const =0
virtual IsoString Identifier() const =0
virtual IsoString Name() const =0
static double Distance(const DPoint &p1, const DPoint &p2)
Vector CelestialPoleNativeCoordinates() const
virtual IsoString ProjCode() const =0
virtual bool Project(DPoint &pW, const DPoint &pN) const noexcept=0
void InitFromRefPoint(double lng0, double lat0, const Optional< double > &lonpole=Optional< double >())
virtual void GetWCS(WCSKeywords &wcs) const
void InitFromWCS(const WCSKeywords &)
virtual bool Direct(DPoint &pW, const DPoint &pRD) const noexcept
Selectable projection system.
Rotation in spherical coordinates.
A structure for management of WCS FITS header keywords and associated image properties.
Complex< T > Sqrt(const Complex< T > &c) noexcept
T Abs(const Complex< T > &c) noexcept
Complex< T > Cos(const Complex< T > &c) noexcept
bool IsFinite(float x) noexcept
void SinCos(T x, T &sx, T &cx) noexcept
constexpr T ArcTan(T x) noexcept
constexpr T Rad(T x) noexcept
constexpr T ArcCos(T x) noexcept
constexpr T Deg(T x) noexcept