lsst.afw  15.0-21-g91b8abf62
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::geom::SpherePointEndpoint Class Referenceabstract

An endpoint for SpherePoint. More...

#include <Endpoint.h>

Inheritance diagram for lsst::afw::geom::SpherePointEndpoint:
lsst::afw::geom::BaseVectorEndpoint< SpherePoint > lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >

Public Types

using Array = std::vector< SpherePoint >
 
using Point = SpherePoint
 

Public Member Functions

 SpherePointEndpoint (SpherePointEndpoint const &)=default
 
 SpherePointEndpoint (SpherePointEndpoint &&)=default
 
SpherePointEndpoint & operator= (SpherePointEndpoint const &)=delete
 
SpherePointEndpoint & operator= (SpherePointEndpoint &&)=delete
 
 SpherePointEndpoint ()
 Construct a SpherePointEndpoint. More...
 
 SpherePointEndpoint (int nAxes)
 Construct a SpherePointEndpoint with nAxes specified; nAxes must equal 2. More...
 
virtual ~SpherePointEndpoint ()=default
 
virtual std::vector< double > dataFromPoint (Point const &point) const override
 
virtual ndarray::Array< double, 2, 2 > dataFromArray (Array const &arr) const override
 
virtual Point pointFromData (std::vector< double > const &data) const override
 Get a single point from raw data. More...
 
virtual Array arrayFromData (ndarray::Array< double, 2, 2 > const &data) const override
 Get an array of points from raw data. More...
 
virtual std::shared_ptr< ast::Frame > makeFrame () const override
 Create a Frame that can be used with this end point in a Transform. More...
 
virtual void normalizeFrame (std::shared_ptr< ast::Frame > framePtr) const override
 Check that framePtr points to a SkyFrame and set longitude axis to 0, latitude to 1. More...
 
virtual int getNPoints (Array const &arr) const override
 Return the number of points in an array. More...
 
int getNAxes () const
 
virtual bool operator== (BaseEndpoint const &other) const noexcept
 Determine whether two endpoints represent the same conversion. More...
 
bool operator!= (BaseEndpoint const &other) const noexcept
 Determine whether two endpoints do not represent the same conversion. More...
 
virtual std::vector< double > dataFromPoint (Point const &point) const=0
 Get raw data from a single point. More...
 
virtual ndarray::Array< double, 2, 2 > dataFromArray (Array const &arr) const=0
 Get raw data from an array of points. More...
 

Static Public Member Functions

static std::string getClassPrefix ()
 Get the class name prefix, e.g. "Point2" for "Point2Endpoint". More...
 

Protected Member Functions

void _assertNAxes (int nAxes) const
 
int _getNAxes (ndarray::Array< double, 2, 2 > const &data) const
 
int _getNAxes (ndarray::Array< double, 1, 1 > const &data) const
 
int _getNAxes (std::vector< double > const &data) const
 
int _getNPoints (ndarray::Array< double, 2, 2 > const &data) const
 

Detailed Description

An endpoint for SpherePoint.

A SpherePointEndpoint always has 2 axes: longitude, latitude

Definition at line 318 of file Endpoint.h.

Member Typedef Documentation

◆ Array

Definition at line 200 of file Endpoint.h.

◆ Point

Definition at line 201 of file Endpoint.h.

Constructor & Destructor Documentation

◆ SpherePointEndpoint() [1/4]

lsst::afw::geom::SpherePointEndpoint::SpherePointEndpoint ( SpherePointEndpoint const &  )
default

◆ SpherePointEndpoint() [2/4]

lsst::afw::geom::SpherePointEndpoint::SpherePointEndpoint ( SpherePointEndpoint &&  )
default

◆ SpherePointEndpoint() [3/4]

lsst::afw::geom::SpherePointEndpoint::SpherePointEndpoint ( )
inlineexplicit

Construct a SpherePointEndpoint.

Definition at line 328 of file Endpoint.h.

◆ SpherePointEndpoint() [4/4]

lsst::afw::geom::SpherePointEndpoint::SpherePointEndpoint ( int  nAxes)
explicit

Construct a SpherePointEndpoint with nAxes specified; nAxes must equal 2.

This constructor is primarily used by Transform; other users are encouraged to use the default constructor.

Parameters
[in]nAxesThe number of axes in a point; must equal 2
Exceptions
lsst.pex.exceptions.InvalidParameterErrorif nAxes != 2

Definition at line 169 of file Endpoint.cc.

◆ ~SpherePointEndpoint()

virtual lsst::afw::geom::SpherePointEndpoint::~SpherePointEndpoint ( )
virtualdefault

Member Function Documentation

◆ _assertNAxes()

void lsst::afw::geom::BaseEndpoint< Point, Array >::_assertNAxes ( int  nAxes) const
protectedinherited

Definition at line 74 of file Endpoint.cc.

◆ _getNAxes() [1/3]

int lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::_getNAxes ( ndarray::Array< double, 2, 2 > const &  data) const
inlineprotectedinherited

Definition at line 179 of file Endpoint.h.

◆ _getNAxes() [2/3]

int lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::_getNAxes ( ndarray::Array< double, 1, 1 > const &  data) const
inlineprotectedinherited

Definition at line 181 of file Endpoint.h.

◆ _getNAxes() [3/3]

int lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::_getNAxes ( std::vector< double > const &  data) const
inlineprotectedinherited

Definition at line 183 of file Endpoint.h.

◆ _getNPoints()

int lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::_getNPoints ( ndarray::Array< double, 2, 2 > const &  data) const
inlineprotectedinherited

Definition at line 185 of file Endpoint.h.

◆ arrayFromData()

std::vector< SpherePoint > lsst::afw::geom::SpherePointEndpoint::arrayFromData ( ndarray::Array< double, 2, 2 > const &  data) const
overridevirtual

Get an array of points from raw data.

Parameters
[in]dataRaw data for an array of points, as a 2-D ndarray array [nPoints, nAxes] in C order, so the in-memory view is, for example, x0, y0, x1, y1, x2, y2, ...
Returns
an array of points
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the array has the wrong nAxes dimension

Implements lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >.

Definition at line 205 of file Endpoint.cc.

◆ dataFromArray() [1/2]

virtual ndarray::Array<double, 2, 2> lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::dataFromArray ( Array const &  arr) const
pure virtualinherited

Get raw data from an array of points.

Parameters
[in]arrArray of points
Returns
the data as a 2-D ndarray array [nAxes, nPoints] in C order, so the in-memory view is, for example, x0, x1, x2, ..., y0, y1, y2, ...
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the array has the wrong nAxes dimension

◆ dataFromArray() [2/2]

ndarray::Array< double, 2, 2 > lsst::afw::geom::SpherePointEndpoint::dataFromArray ( Array const &  arr) const
overridevirtual

Definition at line 186 of file Endpoint.cc.

◆ dataFromPoint() [1/2]

virtual std::vector<double> lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::dataFromPoint ( Point const &  point) const
pure virtualinherited

Get raw data from a single point.

Parameters
[in]pointdata for a single point
Returns
the values in the point as a vector of size NAxess
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif the point has the wrong number of axes

◆ dataFromPoint() [2/2]

std::vector< double > lsst::afw::geom::SpherePointEndpoint::dataFromPoint ( Point const &  point) const
overridevirtual

Definition at line 177 of file Endpoint.cc.

◆ getClassPrefix()

static std::string lsst::afw::geom::SpherePointEndpoint::getClassPrefix ( )
inlinestatic

Get the class name prefix, e.g. "Point2" for "Point2Endpoint".

Definition at line 359 of file Endpoint.h.

◆ getNAxes()

int lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::getNAxes ( ) const
inlineinherited

Definition at line 79 of file Endpoint.h.

◆ getNPoints()

int lsst::afw::geom::BaseVectorEndpoint< Point >::getNPoints ( Array const &  arr) const
overridevirtualinherited

Return the number of points in an array.

Implements lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >.

Definition at line 83 of file Endpoint.cc.

◆ makeFrame()

std::shared_ptr< ast::Frame > lsst::afw::geom::SpherePointEndpoint::makeFrame ( ) const
overridevirtual

Create a Frame that can be used with this end point in a Transform.

Reimplemented from lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >.

Definition at line 217 of file Endpoint.cc.

◆ normalizeFrame()

void lsst::afw::geom::SpherePointEndpoint::normalizeFrame ( std::shared_ptr< ast::Frame >  framePtr) const
overridevirtual

Check that framePtr points to a SkyFrame and set longitude axis to 0, latitude to 1.

Reimplemented from lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >.

Definition at line 219 of file Endpoint.cc.

◆ operator!=()

bool lsst::afw::geom::BaseEndpoint< SpherePoint , std::vector< SpherePoint > >::operator!= ( BaseEndpoint< SpherePoint, std::vector< SpherePoint > > const &  other) const
inlinenoexceptinherited

Determine whether two endpoints do not represent the same conversion.

Returns
the inverse of operator==. See that operator's documentation for important caveats.

Definition at line 109 of file Endpoint.h.

◆ operator=() [1/2]

SpherePointEndpoint& lsst::afw::geom::SpherePointEndpoint::operator= ( SpherePointEndpoint const &  )
delete

◆ operator=() [2/2]

SpherePointEndpoint& lsst::afw::geom::SpherePointEndpoint::operator= ( SpherePointEndpoint &&  )
delete

◆ operator==()

bool lsst::afw::geom::BaseEndpoint< Point, Array >::operator== ( BaseEndpoint< SpherePoint, std::vector< SpherePoint > > const &  other) const
virtualnoexceptinherited

Determine whether two endpoints represent the same conversion.

Parameters
otherthe endpoint to compare
Returns
true iff this object and other are of exactly the same class and all visible properties are identical. This implementation requires that the objects have the same number of axes.
Warning
Two endpoints with different implementation classes will never compare equal, even if one class is conceptually equivalent to the other (e.g., a decorator). This may cause unexpected behavior when mixing related concrete endpoint classes.

Definition at line 64 of file Endpoint.cc.

◆ pointFromData()

SpherePoint lsst::afw::geom::SpherePointEndpoint::pointFromData ( std::vector< double > const &  data) const
overridevirtual

Get a single point from raw data.

Parameters
[in]dataData as a vector of length NAxes
Returns
the corresponding point

Implements lsst::afw::geom::BaseEndpoint< SpherePoint, std::vector< SpherePoint > >.

Definition at line 200 of file Endpoint.cc.


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