#include <DF_Proj_Point.hpp>
DFLib::Proj::Point::Point |
( |
const std::vector< double > & |
uPosition, |
|
|
const std::vector< std::string > & |
projArgs |
|
) |
| |
Constructor.
- Parameters
-
uPosition | coordinates in user's coordinates |
projArgs | a vector of strings representing the Proj.4 description of the user's coordinate system. |
DFLib::Proj::Point::Point |
( |
const Point & |
right | ) |
|
DFLib::Proj::Point::~Point |
( |
| ) |
|
|
virtual |
Point * DFLib::Proj::Point::Clone |
( |
| ) |
|
|
virtual |
Clone Self.
Make a copy of yourself, and return a pointer to the copy. This is useful as a prototype: pass a pointer to any concrete implementation to a function, and that function has a way of making other objects of precisely the same type by cloning.
- Returns
- pointer to
Implements DFLib::Abstract::Point.
const std::vector< double > & DFLib::Proj::Point::getUserCoords |
( |
| ) |
|
|
virtual |
get user position
- Returns
- a vector<double> containing the coordinates of this point in the user's coordinate system.
This method works by converting the mercator coordinates of the point back to the user's coordinate system using the Proj.4 cartographic projection library if the mercator coordinates or user projection have changed since the last call.
Implements DFLib::Abstract::Point.
const std::vector< double > & DFLib::Proj::Point::getXY |
( |
| ) |
|
|
virtual |
get mercator projection (XY) position
- Returns
- vector of coordinates in mercator projection
Implements DFLib::Abstract::Point.
bool DFLib::Proj::Point::isUserProjLatLong |
( |
| ) |
const |
return true if user projection is a lat/lon system
Primarily useful for deciding how to display coordinates (as for example whether to display them in sexigesimal or decimal representation)
void DFLib::Proj::Point::mercToUser |
( |
| ) |
|
|
private |
Point & DFLib::Proj::Point::operator= |
( |
const Point & |
rhs | ) |
|
void DFLib::Proj::Point::setUserCoords |
( |
const std::vector< double > & |
uPosition | ) |
|
|
virtual |
set user position
Sets the coordinates of the point in user's coordinate system, marking the mercator coordinates invalid. Mercator coordinates will be updated by conversion with Proj.4 upon the next call to getXY().
- Parameters
-
uPosition | vector of doubles with user coordinates. |
Implements DFLib::Abstract::Point.
void DFLib::Proj::Point::setUserProj |
( |
const std::vector< std::string > & |
projArgs | ) |
|
set user projection information
- Parameters
-
projArgs | vector of strings representing the new projection |
This method can be used to change the coordinate system of a point. When called, the Mercator representation of the point is updated, then the user projection is changed. The next call to getUserCoords will therefore return the point's coordinates in the new coordinate system.
void DFLib::Proj::Point::setXY |
( |
const std::vector< double > & |
mPosition | ) |
|
|
virtual |
set mercator projection (XY) position
- Parameters
-
aPosition | coordinates in mercator projection |
Implements DFLib::Abstract::Point.
void DFLib::Proj::Point::userToMerc |
( |
| ) |
|
|
private |
bool DFLib::Proj::Point::mercDirty |
|
private |
projPJ DFLib::Proj::Point::mercProj |
|
private |
std::vector<double> DFLib::Proj::Point::theMerc |
|
private |
std::vector<double> DFLib::Proj::Point::theUserCoords |
|
private |
bool DFLib::Proj::Point::userDirty |
|
private |
projPJ DFLib::Proj::Point::userProj |
|
private |
The documentation for this class was generated from the following files: